summaryrefslogtreecommitdiffstats
path: root/plugins/agl_test_conf.py
blob: afffa68368c967593052f82518e99277b2368e83 (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
#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"

#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"