• Home
  • Raw
  • Download

Lines Matching full:args

45 def init_log_file(args):  argument
46 …logging.basicConfig(filename=args.out_log, format=RegressTestConfig.DEFAULT_LOG_FORMAT, level=logg…
108 def check_ark_frontend_binary(args) -> bool: argument
109 if args.ark_frontend_binary is None:
115 def check_frontend_library(args) -> bool: argument
117 current_frontend_binary = os.path.join(current_dir, str(args.ark_frontend_binary))
118 …test_tool_frontend_binary = os.path.join(RegressTestConfig.TEST_TOOL_FILE_DIR, args.ark_frontend_b…
122 args.ark_frontend_binary = current_frontend_binary if os.path.exists(
124 args.ark_frontend_binary = os.path.abspath(args.ark_frontend_binary)
128 def check_ark_tool(args) -> bool: argument
130 if args.ark_tool is None:
134 current_ark_tool = os.path.join(current_dir, str(args.ark_tool))
135 test_tool_ark_tool = os.path.join(RegressTestConfig.TEST_TOOL_FILE_DIR, args.ark_tool)
140 args.ark_tool = current_ark_tool if os.path.exists(current_ark_tool) else test_tool_ark_tool
141 args.ark_tool = os.path.abspath(args.ark_tool)
145 def check_ark_aot(args) -> bool: argument
146 if args.ark_aot:
148 current_ark_aot_tool = os.path.join(current_dir, str(args.ark_aot_tool))
149 … test_tool_ark_aot_tool = os.path.join(RegressTestConfig.TEST_TOOL_FILE_DIR, args.ark_aot_tool)
151 output(f'entered ark_aot_tool "{args.ark_aot_tool}" does not exist. Please check')
153args.ark_aot_tool = current_ark_aot_tool if os.path.exists(current_ark_aot_tool) else test_tool_ar…
154 args.ark_aot_tool = os.path.abspath(args.ark_aot_tool)
156 if args.run_pgo and not args.ark_aot:
162 def check_stub_path(args) -> bool: argument
163 if args.stub_path:
165 stub_path = os.path.join(current_dir, str(args.stub_path))
167 output(f'entered stub-file "{args.stub_path}" does not exist. Please check')
169 args.stub_path = os.path.abspath(args.stub_path)
180 def check_ignore_list(args) -> bool: argument
181 if args.ignore_list:
182 if os.path.isabs(args.ignore_list):
183 return is_ignore_file_present(args.ignore_list)
184 args.ignore_list = str(os.path.join(RegressTestConfig.TEST_TOOL_FILE_DIR, args.ignore_list))
185 return is_ignore_file_present(args.ignore_list)
189 def check_args(args): argument
190 result = check_ark_frontend_binary(args)
191 result = result and check_frontend_library(args)
192 result = result and check_ark_tool(args)
193 result = result and check_ark_aot(args)
194 result = result and check_stub_path(args)
195 result = result and check_ignore_list(args)
200 if args.ld_library_path is not None:
201 libs = args.ld_library_path.split(":")
204 args.ld_library_path = ":".join(libs)
206 args.ld_library_path = RegressTestConfig.DEFAULT_LIBS_DIR
207 if args.icu_path is None:
208 args.icu_path = RegressTestConfig.ICU_PATH
209 if args.out_dir is None:
210 args.out_dir = RegressTestConfig.PROJECT_BASE_OUT_DIR
212 args.out_dir = os.path.abspath(os.path.join(RegressTestConfig.CURRENT_PATH, args.out_dir))
213 if not args.out_dir.endswith("/"):
214 args.out_dir = f"{args.out_dir}/"
215 args.regress_out_dir = os.path.join(args.out_dir, "regresstest")
216 args.out_result = os.path.join(args.regress_out_dir, 'result.txt')
217 args.junit_report = os.path.join(args.regress_out_dir, 'report.xml')
218 args.out_log = os.path.join(args.regress_out_dir, 'test.log')
219 args.test_case_out_dir = os.path.join(args.regress_out_dir, RegressTestConfig.REGRESS_GIT_REPO)
296 def __init__(self, args, name): argument
298 self.args = args
305 def run(args, test_reports: Optional[List[TestReport]] = None) -> List[TestReport]: argument
323 def __init__(self, args): argument
324 RegressTestStep.__init__(self, args, "Repo preparation")
325 self.test_list: List[str] = self.read_test_list(args.test_list)
339 def run(args, test_reports: Optional[List[TestReport]] = None) -> List[TestReport]: argument
340 repo = RegressTestRepoPrepare(args)
414 if self.args.force_clone:
415 remove_dir(self.args.regress_out_dir)
417 os.makedirs(self.args.regress_out_dir, exist_ok=True)
419 init_log_file(self.args)
423 if self.args.test_file is not None and len(self.args.test_file) > 0:
424 … test_file_list = os.path.join(RegressTestConfig.REGRESS_TEST_CASE_DIR, self.args.test_file)
427 elif self.args.test_dir is not None and len(self.args.test_dir) > 0:
428 … test_file_list = os.path.join(RegressTestConfig.REGRESS_TEST_CASE_DIR, self.args.test_dir)
441 def __init__(self, args, test_reports: List[TestReport]): argument
442 RegressTestStep.__init__(self, args, "Regress test compilation")
443 self.out_dir = args.out_dir
449 def run(args, test_reports: Optional[List[TestReport]] = None) -> List[TestReport]: argument
453 test_prepare = RegressTestCompile(args, test_reports)
482 with multiprocessing.Pool(processes=self.args.processes) as pool:
500 self.args.ark_frontend_binary,
507 Utils.exec_command(command, test_report.test_id, step_result, self.args.timeout,
518 def __init__(self, args): argument
519 RegressTestStep.__init__(self, args, "Regress Test PGO ")
522 def run(args, test_reports: Optional[List[TestReport]] = None) -> List[TestReport]: argument
523 pgo = RegressTestPgo(args)
536 os.environ["LD_LIBRARY_PATH"] = self.args.ld_library_path
538 if self.args.ark_arch == RegressTestConfig.ARK_ARCH_LIST[1]:
543 self.args.ark_arch_root
545 gen_ap_cmd.append(self.args.ark_tool)
547 gen_ap_cmd.append(f"--icu-data-path={self.args.icu_path}")
562 Utils.exec_command(command, test_report.test_id, step, self.args.timeout,
569 with multiprocessing.Pool(processes=self.args.processes) as pool:
669 def __init__(self, args): argument
670 RegressTestStep.__init__(self, args, "Regress Test AOT mode")
673 def run(args, test_reports: Optional[List[TestReport]] = None) -> List[TestReport]: argument
674 aot = RegressTestAot(args)
687 compiler_opt_track_field = self.args.compiler_opt_track_field
688 os.environ["LD_LIBRARY_PATH"] = self.args.ld_library_path
689 if self.args.ark_arch == RegressTestConfig.ARK_ARCH_LIST[1]:
693 self.args.ark_arch_root,
694 self.args.ark_aot_tool,
700 self.args.ark_aot_tool,
719 if self.args.run_pgo:
721 if self.args.enable_litecg:
731 Utils.exec_command(command, test_report.test_id, step, self.args.timeout,
738 with multiprocessing.Pool(processes=self.args.processes) as pool:
779 def __init__(self, args): argument
780 RegressTestStep.__init__(self, args, "Regress Test Run ")
784 def run(args, test_reports: Optional[List[TestReport]] = None) -> List[TestReport]: argument
785 runner = RegressTestRun(args)
811 with multiprocessing.Pool(processes=self.args.processes, initializer=init_worker,
812 initargs=(self.args,)) as pool:
821 self.args = worker_wrapper_args
822 if self.args is None or test_report is None or not test_report.passed:
834 os.environ["LD_LIBRARY_PATH"] = self.args.ld_library_path
840 if self.args.ark_arch == RegressTestConfig.ARK_ARCH_LIST[1]:
843 qemu_arg2 = self.args.ark_arch_root
845 command.append(self.args.ark_tool)
846 command.append(f"--icu-data-path={self.args.icu_path}")
848 if self.args.ark_aot:
849 command.append(f"--stub-file={self.args.stub_path}")
851 if self.args.disable_force_gc:
872 Utils.exec_command(command, test_report.test_id, step, self.args.timeout,
876 Utils.exec_command(command, test_report.test_id, step, self.args.timeout,
881 def __init__(self, args, test_reports: List[TestReport]): argument
882 self.args = args
889 if self.args.ignore_list is None:
891 … with os.fdopen(os.open(self.args.ignore_list, os.O_RDWR, stat.S_IRUSR), "r+") as file_object:
911 result_file = open_write_file(self.args.out_result, False)
933 tree.write(self.args.junit_report, xml_declaration=True, encoding="UTF-8")
936 def print_result(self, args, steps): argument
937 result_file = open_write_file(args.out_result, True)
995 args = os.O_RDWR | os.O_CREAT | os.O_APPEND
997 args = os.O_RDWR | os.O_CREAT
998 file_descriptor = os.open(file_path, args, stat.S_IRUSR | stat.S_IWUSR)
1038 def init_worker(args): argument
1040 worker_wrapper_args = args
1047 def main(args): argument
1048 if not check_args(args):
1055 if args.ark_aot:
1056 if args.run_pgo:
1063 test_reports = step.run(args, test_reports)
1065 stats = Stats(args, test_reports)
1067 stats.print_result(args, steps)