diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/agl_test_conf.py | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/plugins/agl_test_conf.py b/plugins/agl_test_conf.py index 83f19f5..767d971 100644 --- a/plugins/agl_test_conf.py +++ b/plugins/agl_test_conf.py @@ -1,8 +1,14 @@ +#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 = "/usr/AGL/agl-test/tests/" +WORK_DIR = BASE_DIR + "tests/" #The dir for saving log -BASE_LOGS_DIR = "/var/run/agl-test/logs/" +BASE_LOGS_DIR = BASE_TMP + "logs/" #The dir for tmp log TMP_LOGS_DIR = BASE_LOGS_DIR + "tmp-log/" @@ -13,7 +19,43 @@ REPORT_LOGS_DIR = BASE_LOGS_DIR + "log-to-report/" #The dir for tmp test report TMP_TEST_REPORT = TMP_LOGS_DIR + "test-report/" -#Get the log file -def get_log_file(THIS_TEST): - log_file = TMP_LOGS_DIR + THIS_TEST + "/log/" + THIS_TEST + ".log" +# 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 + "/" + testname + "/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" |