• Home
  • Raw
  • Download

Lines Matching full:args

36 def init_log_file(args):  argument
37 …logging.basicConfig(filename=args.out_log, format=RegressTestConfig.DEFAULT_LOG_FORMAT, level=logg…
61 def check_args(args): argument
63 if args.ark_frontend_binary is None:
67 current_frontend_binary = os.path.join(current_dir, args.ark_frontend_binary)
68 …test_tool_frontend_binary = os.path.join(RegressTestConfig.TEST_TOOL_FILE_DIR, args.ark_frontend_b…
73 args.ark_frontend_binary = current_frontend_binary if os.path.exists(
76 if args.ark_tool is None:
80 current_ark_tool = os.path.join(current_dir, args.ark_tool)
81 test_tool_ark_tool = os.path.join(RegressTestConfig.TEST_TOOL_FILE_DIR, args.ark_tool)
86args.ark_tool = current_ark_tool if os.path.exists(current_ark_tool) else test_tool_ark_tool
87 if args.ld_library_path is None:
88 args.ld_library_path = RegressTestConfig.DEFAULT_LIBS_DIR
89 if args.icu_path is None:
90 args.icu_path = RegressTestConfig.ICU_PATH
91 if args.out_dir is None:
92 args.out_dir = RegressTestConfig.PROJECT_BASE_OUT_DIR
94 args.out_dir = os.path.join(RegressTestConfig.CURRENT_PATH, args.out_dir)
95 if not args.out_dir.endswith("/"):
96 args.out_dir = f"{args.out_dir}/"
97 args.regress_out_dir = os.path.join(args.out_dir, "regresstest")
98 args.out_result = os.path.join(args.regress_out_dir, 'result.txt')
99 args.out_log = os.path.join(args.regress_out_dir, 'test.log')
100 args.test_case_out_dir = os.path.join(args.regress_out_dir, RegressTestConfig.REGRESS_GIT_REPO)
178 def __init__(self, args, skip_test_cases): argument
179 self.args = args
180 self.out_dir = args.regress_out_dir
221 out_dir = self.args.test_case_out_dir
224 output_file = os.path.join(self.args.test_case_out_dir, output_test_case_path)
225 command = [self.args.ark_frontend_binary]
229 … out_file_path = os.path.join(self.args.test_case_out_dir, test_case_path.replace('.js', '.out'))
245 if self.args.test_file is not None and len(self.args.test_file) > 0:
246 … test_file_list = os.path.join(RegressTestConfig.REGRESS_TEST_CASE_DIR, self.args.test_file)
249 elif self.args.test_dir is not None and len(self.args.test_dir) > 0:
250 … test_file_list = os.path.join(RegressTestConfig.REGRESS_TEST_CASE_DIR, self.args.test_dir)
289 def run_regress_test_prepare(args): argument
290 remove_dir(args.regress_out_dir)
292 os.makedirs(args.regress_out_dir)
293 init_log_file(args)
295 test_prepare = RegressTestPrepare(args, skip_tests_case)
314 args = os.O_RDWR | os.O_CREAT | os.O_APPEND
316 args = os.O_RDWR | os.O_CREAT
317 file_descriptor = os.open(file_path, args, stat.S_IRUSR | stat.S_IWUSR)
390 def run_test_case_dir(args, test_abc_files, force_gc_files, timeout=RegressTestConfig.DEFAULT_TIMEO… argument
393 result_file = open_write_file(args.out_result, False)
398 test_case_file = test_file.replace('abc', 'js').replace(f'{args.out_dir}', '')
399 assert_file = os.path.join(args.test_case_out_dir, RegressTestConfig.TEST_TOOL_FILE_NAME)
401 ld_library_path = args.ld_library_path
410 icu_path = f"--icu-data-path={args.icu_path}"
411 command = [args.ark_tool, asm_arg1, icu_path, test_case]
422 def run_regress_test_case(args): argument
423 test_cast_list = get_regress_test_files(args.test_case_out_dir, 'abc')
425 return run_test_case_dir(args, test_cast_list, force_gc_files)
450 def main(args): argument
451 if not check_args(args):
455 run_regress_test_prepare(args)
456 pass_count, fail_count = run_regress_test_case(args)
458 print_result(args, pass_count, fail_count, end_time, start_time)
461 def print_result(args, pass_count, fail_count, end_time, start_time): argument
462 result_file = open_write_file(args.out_result, True)