Lines Matching refs:path

18 from os import path
32 if not path.isdir(arg):
35 return path.abspath(arg)
39 if not path.isfile(arg):
42 return path.abspath(arg)
45 third_party_tsc = path.join(test_root, "TypeScript")
46 ohos_third_party_tsc = path.join(test_root, "../../../../third_party/typescript")
48 if not path.isdir(third_party_tsc):
49 if (path.isdir(ohos_third_party_tsc)):
50 return path.abspath(ohos_third_party_tsc)
147 help='the path of js vm runtime')
151 '--tsc-path', dest='tsc_path', default=None, type=lambda arg: is_directory(parser, arg),
152 help='the path of tsc')
204 self.path = test_path
216 if self.path.find(".d.ts") == -1:
217 return "%s-expected.txt" % (path.splitext(self.path)[0])
218 return "%s-expected.txt" % (self.path[:self.path.find(".d.ts")])
221 test_abc_name = ("%s.abc" % (path.splitext(self.path)[0])).replace("/", "_")
222 test_abc_path = path.join(runner.build_dir, test_abc_name)
226 cmd.append(self.path)
243 if os.path.exists(test_abc_path):
257 with open(self.path, "r", encoding="latin1") as f:
291 cmd.append(self.path)
310 self.path = ''
330 if self.remove_file != '' and os.path.exists(self.remove_file):
336 abc_path = path.join(os.getcwd(), 'test_aop.abc')
337 if os.path.exists(abc_path):
348 self.test_root = path.dirname(path.abspath(__file__))
354 self.es2panda = path.join(args.build_dir, 'es2abc')
362 self.ark_js_vm = path.join(args.js_runtime_path, 'ark_js_vm')
363 self.ark_aot_compiler = path.join(args.js_runtime_path, 'ark_aot_compiler')
374 if not path.isfile(self.es2panda):
404 path_str = test.path
407 err_str = test.error.split('[')[0] if "patchfix" not in test.path else " patchfix throw error failed"
408 err_col = {"path" : [path_str], "status": ["fail"], "error" : [test.error], "type" : [err_str]}
410 err_col = {"path" : [path_str], "status": ["fail"], "error" : ["Segmentation fault"],
429 test_list = pd.DataFrame(columns=["path", "status", "error", "type"])
431 suc_col = {"path" : [test.path], "status": ["success"], "error" : ["success"], "type" : ["success"]}
436 print(self.test_path(test.path))
466 glob_expression = path.join(
483 glob_expression = path.join(
491 return os.path.basename(src)
500 output_abc_file = ("%s.abc" % (path.splitext(self.path)[0])).replace("/", "_")
506 gen_abc_cmd.append(self.path)
512 if not os.path.exists(output_abc_file):
551 ts_suite_dir = path.join(self.tsc_path, 'tests/cases')
553 glob_expression = path.join(
559 test_name = path.basename(f.split(".ts")[0])
560 negative_references = path.join(
562 is_negative = path.isfile(path.join(negative_references,
569 if path.isfile(path.join(negative_references,
577 with open(path.join(self.test_root, 'test_tsc_ignore_list.txt'), 'r') as failed_references:
579 if path.relpath(f, self.tsc_path) in failed_references.read():
594 projects_path = path.join(self.test_root, directory)
596 glob_expression = path.join(projects_path, project, "**/*.%s" % (extension))
601 glob_expression = path.join(
616 input_file_path = self.path
617 arkguard_root_dir = os.path.join(runner.test_root, "../../arkguard")
618 arkgurad_entry_path = os.path.join(arkguard_root_dir, "lib/cli/SecHarmony.js")
619 config_path = os.path.join(arkguard_root_dir, "test/compilerTestConfig.json")
625 '--config-path',
641 test_abc_name = ("%s.abc" % (path.splitext(self.path)[0])).replace("/", "_")
642 test_abc_path = path.join(runner.build_dir, test_abc_name)
646 es2abc_cmd.append(self.path)
667 if os.path.exists(test_abc_path):
676 if os.path.exists(test_abc_path):
683 if os.path.exists(test_abc_path):
721 self.files_info_path = os.path.join(os.path.join(self.projects_path, self.project), 'filesInfo.txt')
725 self.generated_abc_inputs_path = os.path.join(os.path.join(self.projects_path, self.project), "abcinputs_gen")
727 self.record_names_path = os.path.join(os.path.join(self.projects_path, self.project), 'recordnames.txt')
728 self.abc_inputs_path = os.path.join(os.path.join(self.projects_path, self.project), 'abcinputs')
732 if path.exists(project_path):
734 if path.exists(self.files_info_path):
736 if path.exists(self.generated_abc_inputs_path):
740 sub_path = self.path[len(self.projects_path):]
741 file_relative_path = path.split(sub_path)[0]
742 file_name = path.split(sub_path)[1]
748 self.path = test_path
750 if not path.exists(file_absolute_path):
753 test_abc_name = ("%s.abc" % (path.splitext(file_name)[0]))
754 test_abc_path = path.join(file_absolute_path, test_abc_name)
758 es2abc_cmd.append(self.path)
770 if path.exists(self.record_names_path):
779 record_name = os.path.relpath(test_path, os.path.dirname(self.files_info_path)).split('.')[0]
788 if not path.exists(self.abc_inputs_path):
790 if not path.exists(self.generated_abc_inputs_path):
799 with open(path.join(self.abc_inputs_path, filename)) as abc_inputs_fp:
806 filename = os.path.relpath(test_path, os.path.dirname(self.files_info_path))
815 abc_input_path = path.join(self.generated_abc_inputs_path, abc_files_info_name)
834 if (os.path.basename(test_path).startswith("commonjs")):
837 if (os.path.basename(test_path).startswith("sharedmodule")):
840 os.path.relpath(test_path, self.projects_path), record_name,
863 abc_input_files_info_path = path.join(self.generated_abc_inputs_path, files_info_name)
864 abc_input_merged_abc_path = path.join(self.generated_abc_inputs_path,
882 if (os.path.exists(self.generated_abc_inputs_path)):
891 self.path = test_path
892 if (self.path.endswith("-exec.ts")) or (self.path.endswith("-exec.js")):
893 exec_file_path = self.path
895 if not path.exists(file_absolute_path):
897 test_abc_name = ("%s.abc" % (path.splitext(file_name)[0]))
898 output_abc_name = path.join(file_absolute_path, test_abc_name)
901 if "merge_abc_consistence_check" in self.path:
908 compile_context_info_path = path.join(path.join(self.projects_path, self.project), "compileContextInfo.json")
909 if path.exists(compile_context_info_path):
912 self.path = exec_file_path
916 if "merge_abc_consistence_check" in self.path and "--merge-abc" not in self.flags:
924 if "merge_abc_consistence_check" in self.path:
959 self.path = test_path
960 if self.path.endswith("-exec.ts"):
963 entry_point_name = path.splitext(file_name)[0]
965 test_abc_path = path.join(file_absolute_path, test_abc_name)
999 file_name = self.path[:self.path.find(".d.ts")]
1006 self.ts2abc = path.join(self.test_root, '..', 'scripts', 'ts2abc.js')
1091 glob_expression = path.join(
1107 glob_expression = path.join(
1123 return "%s-transformed-expected.txt" % (path.splitext(self.path)[0])
1128 cmd.append(self.path)
1155 symbol_table_file = os.path.join(self.path, 'base.map')
1157 origin_output_abc = os.path.join(self.path, 'base.abc')
1159 modified_output_abc = os.path.join(self.path, 'patch.abc')
1165 if 'record-name-with-dots' in os.path.basename(self.path):
1169 gen_base_cmd.extend([os.path.join(self.path, origin_input_file)])
1185 patch_test_cmd.extend([os.path.join(self.path, modified_input_file)])
1186 if 'record-name-with-dots' in os.path.basename(self.path):
1195 if name in os.path.basename(self.path):
1220 expected_path = os.path.join(self.path, 'expected.txt')
1235 if (os.path.exists(modified_output_abc)):
1245 dirs = os.listdir(path.join(self.test_root, "patch"))
1250 name_dir = os.path.join(self.test_root, "patch", target_version_path, name)
1251 if not os.path.exists(name_dir):
1257 test_base_path = os.path.join(name_dir, sub_path)
1260 test_path = os.path.join(test_base_path, test_dir)
1268 return os.path.basename(src)
1301 cmd.extend([os.path.join(self.path, input_file_name)])
1312 expected_path = os.path.join(self.path, 'expected.txt')
1324 if os.path.exists("base.abc"):
1333 self.test_directory = path.join(self.test_root, "debugger")
1338 self.tests.append(DebuggerTest(os.path.join(self.test_directory, "debugger-in-debug"), "debug-mode"))
1339 self.tests.append(DebuggerTest(os.path.join(self.test_directory, "debugger-in-release"), "release-mode"))
1352 cmd.extend([os.path.join(self.path, input_file_name)])
1354 input_file = os.path.join(self.path, "input.txt")
1363 version = os.path.basename(self.path)
1367 input_file = os.path.join(self.path, "input.txt")
1379 version = os.path.basename(self.path)
1394 expected_path = os.path.join(self.path, 'expected.txt')
1412 self.test_directory = path.join(self.test_root, "base64")
1417 self.tests.append(Base64Test(os.path.join(self.test_directory, "inputFile"), "file"))
1418 self.tests.append(Base64Test(os.path.join(self.test_directory, "inputString"), "string"))
1423 self.tests.append(Base64Test(os.path.join(self.test_directory, "availableTargetApiVersion", str(version)),
1427 return os.path.basename(src)
1435 glob_expression = path.join(
1449 self.local_path = path.join(self.build_dir, "ark_js_vm_version")
1474 if not os.path.exists(self.local_path):
1482 self.test_root = path.dirname(path.abspath(__file__))
1483 self.es2panda = path.join(args.build_dir, "es2abc")
1496 test_directory = path.join(self.test_root, directory)
1497 glob_expression = path.join(test_directory, "*.%s" % (extension))
1506 path.splitext(source_path)[0],
1539 if path.exists(abc_path):
1551 glob_expression = path.join(self.test_root, directory, "*.%s" % (extension))
1572 glob_expression = path.join(self.test_root, directory, "*.%s" % (extension))
1584 glob_expression_ts = path.join(self.test_root, module_dir, "*.%s" % ("ts"))
1585 glob_expression_js = path.join(self.test_root, module_dir, "*.%s" % ("js"))
1630 base_name = os.path.basename(self.path)
1631 return os.path.splitext(base_name)[0]
1640 expected_name = path.splitext(self.path)[0].split("_version_API")[0]
1671 "%s_target_%s%s.abc" % (path.splitext(self.path)[0], target_api_version, target_api_sub_version)
1673 self.target_abc_path = path.join(runner.build_dir, target_abc_name)
1675 runner, self.path, self.target_abc_path, target_api_version, target_api_sub_version
1681 input_api_versions = self.extract_api_versions(path.split(self.path)[1])
1698 format_content = self.path
1701 format_content = self.path
1726 ark_js_vm_dir = os.path.join(
1731 ld_library_path = os.path.join(ark_js_vm_dir, "lib")
1733 ark_js_vm_path = os.path.join(ark_js_vm_dir, "ark_js_vm")
1775 if path.exists(abc_path):
1829 from_dir = os.path.normpath(from_dir)
1830 to_dir = os.path.normpath(to_dir)
1831 from_dir = os.path.abspath(from_dir)
1832 to_dir = os.path.abspath(to_dir)
1842 relative_path = os.path.join(*relative_parts)
1855 basename = os.path.basename(module_path)
1856 module_abc_name = "%s.abc" % (path.splitext(basename)[0])
1857 relative_path = self.get_relative_path(path.split(self.path)[0], path.split(module_path)[0])
1858 module_abc_dir = path.join(runner.build_dir, relative_path)
1859 if not os.path.exists(module_abc_dir):
1861 module_abc_path = path.join(module_abc_dir, module_abc_name)
1878 if path.exists(module_abc_path):
1897 path.splitext(self.path)[0],
1907 path.splitext(self.path)[0])
1919 if path.exists(path_expected):
1934 if path.exists(path_expected):
1947 cmd.append(self.path)
1950 test_abc_name = ("%s.abc" % (path.splitext(self.path)[0])).replace("/", "_")
1951 self.test_abc_path = path.join(runner.build_dir, test_abc_name)
1976 ark_js_vm_dir = os.path.join(
1981 ld_library_path = os.path.join(ark_js_vm_dir, "lib")
1983 ark_js_vm_path = os.path.join(ark_js_vm_dir, "ark_js_vm")
2048 if path.exists(self.test_abc_path):
2068 self.directory = os.path.sep.join([prefiex_dir, self.directory])
2074 tmp_path = os.path.join(test_root, tmp_dir_name)
2075 if not os.path.exists(tmp_path):
2084 src_dir = os.path.join(test_root, test_dir)
2085 target_dir = os.path.join(tmp_path, test_dir)
2086 if os.path.exists(target_dir):
2391 aop_file_path = path.join(runner.test_root, "aop")
2404 cpp_file = path.join(aop_file_path, msg[0])
2412 if not os.path.exists(lib_file):
2421 js_file = path.join(aop_file_path, "test_aop.js")