blob: d1178ebceea296072bbde5e35af4ef89a4242f66 (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#The base dir of agl-test
BASE_DIR = "/usr/AGL/agl-test/"
#The base dir of tmp files
BASE_TMP = "/var/run/agl-test/"
#The dir of test_suits
WORK_DIR = BASE_DIR + "tests/"
#The dir for saving log
BASE_LOGS_DIR = BASE_TMP + "logs/"
#The dir for tmp log
TMP_LOGS_DIR = BASE_LOGS_DIR + "tmp-log/"
#The dir for the file that will report
REPORT_LOGS_DIR = BASE_LOGS_DIR + "log-to-report/"
#The dir for tmp test report
TMP_TEST_REPORT = TMP_LOGS_DIR + "test-report/"
# The dir for template files
TPL_DIR = BASE_DIR + "template/"
#Defalut template file name for html result
HTML_TPL = "summary_result_tpl.html"
#Color for html format
BGCOLOR_DARK = "CCCBE4"
BGCOLOR_LIGHT = "E8E7F2"
BGCOLOR_TABLE_TITLE = "2400B0"
COLOR_TABLE_TITLE = "white"
#Get the log file for a test set :
# /var/run/agl-test/logs/tmp-log/${test_set_name}/log/${test_set_name}.log
def get_log_file(test_set_name):
log_file = get_tmp_log_dir(test_set_name) + test_set_name + ".log"
return log_file
#Get the log dir for a test set :
# /var/run/agl-test/logs/tmp-log/${test_set_name}/log/
def get_tmp_log_dir(test_set_name):
log_dir = TMP_LOGS_DIR + test_set_name + "/log/"
return log_dir
#Get template dir : /usr/AGL/agl-test/template
def get_tpl_dir():
return TPL_DIR
#Get template file name for html result
def get_default_html_tpl():
return HTML_TPL
#Get json file name :
# /var/run/agl-test/logs/tmp-log/${test_set_name}/report.json
def get_json_filename(test_set_name: str):
return TMP_LOGS_DIR + test_set_name + "/report.json"
#Get html file name for a test set :
# /var/run/agl-test/logs/tmp-log/test-report/${test_set_name}/report.html
def get_html_filename(test_set_name: str):
return TMP_TEST_REPORT + "/" + test_set_name + "/report.html"
#Get test-report log dir for a test set :
# /var/run/agl-test/logs/tmp-log/test-report/${test_set_name}/log
def get_log_dir(test_set_name: str):
return TMP_TEST_REPORT + "/" + test_set_name + "/log"
|