-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigs.py
More file actions
32 lines (25 loc) · 994 Bytes
/
configs.py
File metadata and controls
32 lines (25 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import datetime
import os
from all_configs import configExample
def build_config(module):
"""Normalize a config module into the dict main.py expects."""
return {
"TEST_NAME": getattr(module, "TEST_NAME", "run"),
"server": module.server,
"ap_name": module.ap_name,
"append": getattr(module, "append", False),
"show_stdout": getattr(module, "show_stdout", True),
"tests": module.tests,
"devices": module.devices,
"temps_pool_interval": getattr(module, "temps_pool_interval", 1),
"upload_folder": getattr(module, "upload_folder", None),
"pmlib_manager": getattr(module, "pmlib_manager", None),
}
# Base path for all test outputs
TESTS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "all_configs", "results")
# Group name for this run
TESTS_NAME = datetime.datetime.now().strftime("%Y-%m-%d_%H.%M")
#Can run multiple configs
configs = {
"example": build_config(configExample),
}