Lines Matching refs:args

161     args = parser.parse_args()
162 if args.abc2program and (args.run_pgo or args.ark_aot):
164 return args
180 def excuting_npm_install(args):
182 if args.ark_frontend:
183 ark_frontend = args.ark_frontend
189 if args.ark_frontend_binary:
190 ark_frontend_binary = os.path.join(args.ark_frontend_binary)
211 def init(args):
221 get_all_skip_tests(args)
222 excuting_npm_install(args)
225 def get_all_skip_tests(args):
227 if args.ark_frontend and args.ark_frontend == ARK_FRONTEND_LIST[1]:
232 if args.skip_list:
233 SKIP_LIST_FILES.append(os.path.join("test262", args.skip_list[0]))
278 def __init__(self, args):
279 self.args = args
290 if self.args.run_jit:
293 elif self.args.sendable == "sendable":
300 if self.args.enable_rm and self.args.run_jit and not os.path.isfile(TEST262_JIT_LABEL):
321 if self.args.run_jit:
323 elif self.args.sendable == "sendable":
338 if self.args.dir:
339 if TEST_ES5_DIR in self.args.dir:
340 self.args.es51 = True
341 elif TEST_ES2015_DIR in self.args.dir:
342 self.args.es2015 = "es2015"
343 elif TEST_INTL_DIR in self.args.dir:
344 self.args.intl = "intl"
345 elif TEST_ES2021_DIR in self.args.dir:
346 self.args.es2021 = "all"
347 elif TEST_ES2022_DIR in self.args.dir:
348 self.args.es2022 = "all"
349 elif TEST_ES2023_DIR in self.args.dir:
350 self.args.es2023 = "all"
351 elif TEST_OTHERTESTS_DIR in self.args.dir:
352 self.args.other = "other"
354 if self.args.file:
355 if TEST_ES5_DIR in self.args.file:
356 self.args.es51 = True
357 elif TEST_ES2015_DIR in self.args.file:
358 self.args.es2015 = "es2015"
359 elif TEST_INTL_DIR in self.args.file:
360 self.args.intl = "intl"
361 elif TEST_ES2021_DIR in self.args.file:
362 self.args.es2021 = "all"
363 elif TEST_ES2022_DIR in self.args.file:
364 self.args.es2022 = "all"
365 elif TEST_ES2023_DIR in self.args.file:
366 self.args.es2023 = "all"
367 elif TEST_OTHERTESTS_DIR in self.args.file:
368 self.args.other = "other"
371 if self.args.es51:
373 elif self.args.es2015:
375 elif self.args.intl:
377 elif self.args.es2021:
379 elif self.args.es2022:
381 elif self.args.es2023:
383 elif self.args.ci_build:
385 elif self.args.sendable:
387 elif self.args.other:
393 if self.args.dir:
396 if self.args.es51:
397 self.args.dir = TEST_ES5_DIR
398 elif self.args.es2015:
399 self.args.dir = TEST_ES2015_DIR
400 elif self.args.intl:
401 self.args.dir = TEST_INTL_DIR
402 elif self.args.es2021:
403 self.args.dir = TEST_ES2021_DIR
404 elif self.args.sendable:
405 self.args.dir = TEST_SENDABLE_DIR
406 elif self.args.es2022:
407 self.args.dir = TEST_ES2022_DIR
408 elif self.args.es2023:
409 self.args.dir = TEST_ES2023_DIR
410 elif self.args.other:
411 self.args.dir = TEST_OTHERTESTS_DIR
412 elif self.args.ci_build:
413 self.args.dir = TEST_CI_DIR
415 self.args.dir = os.path.join(DATA_DIR, "test")
426 if self.args.es51:
428 elif self.args.es2015:
430 elif self.args.intl:
432 elif self.args.es2021:
434 elif self.args.sendable:
436 elif self.args.es2022:
438 elif self.args.es2023:
440 elif self.args.other:
442 elif self.args.ci_build:
454 if self.args.es51:
456 elif self.args.es2021 or self.args.es2022 or self.args.es2023:
470 if self.args.es2021 == "all":
474 if self.args.es2021 == "other":
483 if self.args.sendable == "sendable":
490 if self.args.es2022 == "all":
496 if self.args.es2022 == "other":
508 if self.args.es2023 == "all":
515 if self.args.es2023 == "other":
528 if self.args.intl:
535 if self.args.other:
542 if self.args.es2015:
549 if self.args.es51:
552 elif self.args.es2015:
555 elif self.args.intl:
558 elif self.args.other:
561 elif self.args.es2021:
564 elif self.args.es2022:
567 elif self.args.es2023:
570 elif self.args.sendable:
573 elif self.args.ci_build:
587 if self.args.es51:
590 elif self.args.es2015:
593 elif self.args.intl:
596 elif self.args.other:
599 elif self.args.es2021:
602 elif self.args.sendable:
605 elif self.args.es2022:
608 elif self.args.es2023:
611 elif self.args.ci_build:
614 elif self.args.esnext:
617 if self.args.run_jit:
622 if self.args.file:
623 mkdstdir(self.args.file, src_dir, self.out_dir)
627 if ':' in self.args.dir:
628 path = self.args.dir.split(':')
632 files = collect_files(self.args.dir)
656 def run_test262_mode(args):
657 if args.mode:
658 return modetype_to_string(args.mode)
662 def get_execute_arg(args) -> list[str]:
665 if args.file:
666 execute_args.append(args.file)
668 path = args.dir.split(':')
677 def get_host_path_type(args):
680 if args.engine:
681 host_path = args.engine
682 host_type = os.path.split(args.engine.strip())[1]
686 def get_timeout(args, threads):
688 if args.timeout:
689 timeout = args.timeout
693 def get_threads(args):
695 if args.threads:
696 threads = args.threads
700 def get_host_args_of_product_name(args):
701 product_name = args.product_name
715 def get_host_args_of_host_type(args, host_args, ark_tool, ark_aot_tool, libs_dir, ark_frontend,
720 if args.ark_aot:
722 if args.run_pgo:
724 if args.enable_litecg:
726 if args.run_jit:
728 if args.run_baseline_jit:
739 if args.abc2program:
741 if args.enable_arkguard:
747 def get_host_args_of_ark_arch(args, host_args):
748 host_args += f"--ark-arch={args.ark_arch} "
749 host_args += f"--ark-arch-root={args.ark_arch_root} "
754 def get_disable_force_gc(host_args, args):
760 def get_host_args_of_stub_file(args, host_args):
761 host_args += f"--stub-file={args.stub_file} "
766 def get_host_args(args, host_type):
781 if args.product_name:
782 ark_tool, libs_dir, ark_aot_tool, merge_abc_binary = get_host_args_of_product_name(args)
784 if args.hostArgs:
785 host_args = args.hostArgs
787 if args.ark_tool:
788 ark_tool = args.ark_tool
790 if args.ark_aot_tool:
791 ark_aot_tool = args.ark_aot_tool
793 if args.libs_dir:
794 libs_dir = args.libs_dir
796 if args.ark_frontend:
797 ark_frontend = args.ark_frontend
799 if args.ark_frontend_binary:
800 ark_frontend_binary = args.ark_frontend_binary
802 if args.opt_level:
803 opt_level = args.opt_level
805 if args.es2abc_thread_count:
806 es2abc_thread_count = args.es2abc_thread_count
808 if args.merge_abc_binary:
809 merge_abc_binary = args.merge_abc_binary
811 if args.merge_abc_mode:
812 merge_abc_mode = args.merge_abc_mode
815 host_args = get_host_args_of_host_type(args, host_args, ark_tool, ark_aot_tool, libs_dir, ark_frontend,
819 if args.ark_arch != ark_arch:
820 host_args = get_host_args_of_ark_arch(args, host_args)
822 if args.stub_file != stub_file:
823 host_args = get_host_args_of_stub_file(args, host_args)
825 if args.disable_force_gc:
826 host_args = get_disable_force_gc(host_args, args)
831 def run_test262_test(args):
832 execute_args = get_execute_arg(args)
833 host_path, host_type = get_host_path_type(args)
834 host_args = get_host_args(args, host_type)
835 threads = get_threads(args)
836 timeout = get_timeout(args, threads)
844 test_cmd.append(f"--mode={run_test262_mode(args)}")
854 if args.test_list:
857 if args.babel:
867 def prepare_test_list(args) -> List[str]:
868 if not os.path.exists(args.test_list):
869 args.test_list = os.path.join("test262", args.test_list)
870 test_list = TestPrepare.get_tests_from_file(args.test_list)
878 def reset_args(args):
879 args.es51 = None
880 args.es2015 = None
881 args.intl = None
882 args.other = None
883 args.es2021 = None
884 args.es2022 = None
885 args.es2023 = None
886 args.ci_build = None
887 args.esnext = None
888 args.dir = None
891 def prepare_file_from_test_list(args, test_prepare):
892 folders = prepare_test_list(args)
894 reset_args(args)
895 args.dir = folder
897 args.file = args.test_list
900 def run(args):
901 init(args)
903 test_prepare = TestPrepare(args)
905 if args.test_list:
906 prepare_file_from_test_list(args, test_prepare)
909 check = Check(True, run_test262_test, args)
913 def main(args):
916 run(args)