123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- """
- @Authors: yangzihao(yangzihao@china-icv.cn)
- @Data: 2024/01/30
- @Last Modified: 2024/01/30
- @Summary: Evaluateion functions
- """
- import os
- import sys
- import time
- from multiple_case_eval import multiple_cases_eval
- import log
- if __name__ == "__main__":
- from warnings import simplefilter
-
- simplefilter(action="ignore")
- if len(sys.argv) >= 5:
- configPath = sys.argv[1]
- singleReportPath = sys.argv[2]
- reportPath = sys.argv[3]
- logPath = sys.argv[4]
- log.setup_logger(logPath)
- logger = log.get_logger()
- if not os.path.exists(configPath):
- print('Invalid configPath!')
- logger.error("MULTIPLE_CASES_EVAL: Invalid configPath!")
- sys.exit(-1)
- elif not os.path.exists(singleReportPath):
- print('Invalid singleReportPath!')
- logger.error("MULTIPLE_CASES_EVAL: Invalid singleReportPath!")
- sys.exit(-1)
- else:
- try:
- logger.info("MULTIPLE_CASES_EVAL: Start evaluating:")
- print("MULTIPLE_CASES_EVAL程序开始运行:")
- print(f" configPath: {configPath},\n singleReportPath: {singleReportPath},\n reportPath: {reportPath}")
- t1 = time.time()
- multiple_cases_eval(configPath, singleReportPath, reportPath)
- t2 = time.time()
- print(f"程序结束,执行时间:{int(t2 - t1)} s")
- logger.info("MULTIPLE_CASES_EVAL: End.")
- sys.exit(0)
- except Exception as e:
- print("异常,退出...")
- print(repr(e))
- sys.exit(-1)
- else:
- print('No enough arguments!')
- logPath = sys.argv[4]
- log.setup_logger(logPath)
- logger = log.get_logger()
- logger.error("MULTIPLE_CASES_EVAL: No enough arguments!")
- sys.exit(-1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|