/arkcompiler/ets_frontend/testTs/ |
H A D | utils.py | 34 def mk_dir(path):
35 if not os.path.exists(path):
36 os.makedirs(path)
39 def remove_dir(path):
40 if os.path.exists(path):
41 shutil.rmtree(path)
44 def remove_file(path):
45 if os.path [all...] |
H A D | config.py | 28 EXPECT_DIR = os.path.join("testTs", "expect")
29 OUT_DIR = os.path.join("out")
30 OUT_TEST_DIR = os.path.join("out", "testTs")
31 OUT_RESULT_FILE = os.path.join("out", "testTs", "result.txt")
32 TEST_DIR = os.path.join("testTs")
33 TS_CASES_DIR = os.path.join(".", "testTs", "test")
34 SKIP_FILE_PATH = os.path.join("testTs", "skip_tests.json")
35 CUR_FILE_DIR = os.path.dirname(__file__)
36 IMPORT_FILE_PATH = os.path.join(CUR_FILE_DIR, "import_tests.json")
37 CODE_ROOT = os.path [all...] |
/arkcompiler/ets_frontend/test262/ |
H A D | config.py | 30 DATA_DIR = os.path.join("test262", "data") 31 ESHOST_DIR = os.path.join("test262", "eshost") 32 HARNESS_DIR = os.path.join("test262", "harness") 34 BASE_OUT_DIR = os.path.join("out", "test262") 36 CUR_FILE_DIR = os.path.dirname(__file__) 37 CODE_ROOT = os.path.abspath(os.path.join(CUR_FILE_DIR, "../../..")) 45 TEST_FULL_DIR = os.path.join(DATA_DIR, "test") 46 TEST_ES5_DIR = os.path.join(DATA_DIR, "test_es51") 47 TEST_ES2015_DIR = os.path [all...] |
/arkcompiler/ets_frontend/test/scripts/performance_test/ |
H A D | performance_config.py | 31 # Set the path of your deveco studio 33 self.cmd_prefix = os.path.join(self.deveco_path, 'tools', 'hvigor', 'bin', 'hvigorw.js') 34 self.node_js_path = os.path.join(self.deveco_path, 'tools', 'node', 'node.exe') 35 self.jbr_path = os.path.join(self.deveco_path, 'jbr') 136 setattr(config, 'name', os.path.basename(config.project_path)) 168 mail_data_path = os.path.join( 169 os.path.dirname(os.path.abspath(__file__)), 173 html_file_path = os.path.join( 178 attach_path = os.path [all...] |
/arkcompiler/ets_frontend/test/scripts/sdk_test/ |
H A D | preparation.py | 34 java_home = os.path.join(deveco_path, 'jbr') 35 tool_home = os.path.join(deveco_path) 36 sdk_home = os.path.join(tool_home, 'sdk') 37 node_js_path = os.path.join(deveco_path, 'tools', 'node') 39 node_js_path = os.path.join(node_js_path, 'bin') 40 tool_home = os.path.join(tool_home, 'Contents ') 41 java_path = os.path.join(java_home, 'bin') 42 ohpm_path = os.path.join(tool_home, 'tools', 'ohpm', 'bin') 43 hvigor_path = os.path.join(tool_home, 'tools', 'hvigor', 'bin') 54 java_path = os.path [all...] |
/arkcompiler/ets_frontend/test/scripts/auto_xts_test/ |
H A D | result.py | 26 path = data['path_xts_report'] variable 27 file_list = os.listdir(path) 29 summary_report = os.path.join(path, file_list[-1], "summary_report.html") 30 if (os.path.exists(summary_report)): 33 details_report = os.path.join(path, file_list[-1], "details_report.html") 34 if (os.path.exists(details_report)): 37 failures_report = os.path.join(path, file_lis [all...] |
/arkcompiler/ets_frontend/ets2panda/public/headers_parser/ |
H A D | main.py | 22 import os.path namespace 59 if not os.path.exists(os.path.dirname(dest_path)): 60 os.makedirs(os.path.dirname(dest_path)) 84 for path in paths_list: 85 if os.path.isdir(path): 87 if path.rstrip("/") == result_folder.rstrip("/"): 90 nested_paths = [os.path.join(path, dir_fil [all...] |
/arkcompiler/ets_frontend/ets2panda/util/ |
H A D | arktsconfig.cpp | 55 static bool IsAbsolute(const std::string &path) in IsAbsolute() argument 58 return !path.empty() && path[0] == '/'; in IsAbsolute() 60 return fs::path(path).is_absolute(); in IsAbsolute() 69 return (fs::path(a) / b).string(); in JoinPaths() 73 std::string ParentPath(const std::string &path) in ParentPath() argument 76 auto pos = path.find('/'); in ParentPath() 77 return pos == std::string::npos ? path : path in ParentPath() 83 MakeAbsolute(const std::string &path, const std::string &base) MakeAbsolute() argument 288 ReadConfig(const std::string &path) ReadConfig() argument 304 auto path = options->get()->GetValue<JsonObject::StringT>(key); ParseRelDir() local 388 TrimPath(const std::string &path) TrimPath() argument 414 MatchExcludes(const fs::path &path, const std::vector<ArkTsConfig::Pattern> &excludes) MatchExcludes() argument [all...] |
/arkcompiler/ets_runtime/test/regresstest/ |
H A D | regress_test_config.py | 28 TEST_TOOL_FILE_DIR = os.path.dirname(__file__) 29 CODE_ROOT = os.path.abspath(os.path.join(TEST_TOOL_FILE_DIR, "../../../..")) 30 PROJECT_ROOT = os.path.abspath(os.path.join(TEST_TOOL_FILE_DIR, "../..")) 36 PROJECT_BASE_OUT_DIR = os.path.join(PROJECT_ROOT, "out") 37 REGRESS_BASE_TEST_DIR = os.path.join(PROJECT_ROOT, "test", "regresstest") 38 REGRESS_TEST_CASE_DIR = os.path.join(REGRESS_BASE_TEST_DIR, REGRESS_GIT_REPO) 39 REGRESS_TEST_TOOL_DIR = os.path.join(REGRESS_TEST_CASE_DIR, TEST_TOOL_FILE_JS_NAME) 40 SKIP_LIST_FILE = os.path [all...] |
/arkcompiler/runtime_core/disassembler/tests/ |
H A D | gen_pa_file.py | 32 '--testcase-list', help='the file path of testcase list', required=True) 36 '--output-dir', help='the output path', required=True) 41 if os.path.isabs(out_dir) and not os.path.exists(out_dir): 105 return os.path.join(root, f) 118 if os.path.basename(tc_file) is not specifier: 154 merge_abc_binary = os.path.join(build_dir, 'merge_abc') 161 out_dependency_dir = os.path.join(output_dir, 'disassember_tests', 'module') 163 out_merged_dependency_proto_dir = os.path.join(out_dependency_dir, tc_name_pre) 164 if not os.path [all...] |
/arkcompiler/ets_runtime/ecmascript/extractortool/src/ |
H A D | file_path_utils.cpp | 30 char* realpath(const char* path, char* resolvedPath) in realpath() argument 32 if (_access(path, 0) < 0) { in realpath() 35 if (strcpy_s(resolvedPath, PATH_MAX, path) != 0) { in realpath() 119 void FixExtName(std::string& path) in FixExtName() argument 121 if (path.empty()) { in FixExtName() 125 if (StringEndWith(path, EXT_NAME_ABC, sizeof(EXT_NAME_ABC) - 1)) { in FixExtName() 129 if (StringEndWith(path, EXT_NAME_ETS, sizeof(EXT_NAME_ETS) - 1)) { in FixExtName() 130 path.erase(path.length() - (sizeof(EXT_NAME_ETS) - 1), sizeof(EXT_NAME_ETS) - 1); in FixExtName() 131 } else if (StringEndWith(path, EXT_NAME_T in FixExtName() 207 char path[PATH_MAX]; MakeNewJsModulePath() local 218 char path[PATH_MAX]; FindNpmPackageInPath() local 263 std::string path = moduleInstallPath + NPM_PATH_SEGMENT + '/' + std::to_string(level) + '/' + npmPackage; FindNpmPackageInTopLevel() local 299 std::string path = FindNpmPackage() local [all...] |
/arkcompiler/ets_frontend/es2panda/test/benchmark/ |
H A D | utils.py | 30 write_log_file(os.path.join(REPORT_DIR, LOG_FILE), log_str) 38 def traverse_dir(path): 40 for file in os.listdir(path): 41 file_path = os.path.join(path, file) 42 if os.path.isdir(file_path): 45 dir_name = os.path.dirname(file_path) 69 def clear_folder_shutil(path): 70 if os.path.exists(path) [all...] |
H A D | config.py | 21 CUR_FILE_DIR = os.path.dirname(__file__) 22 DEFAULT_ES2ABC_TOOL = os.path.join(CUR_FILE_DIR, 'es2abc') 23 REPORT_DIR = os.path.join(CUR_FILE_DIR, 'output') 25 DEFAULT_OUTPUT_DIR = os.path.join(CUR_FILE_DIR, 'es2abc_output') 26 HERMES_CODE_PATH = os.path.join(CUR_FILE_DIR, 'hermes_workingdir') 27 DEFAULT_HERMES_PATH = os.path.join(HERMES_CODE_PATH, 'build', "bin", 'hermes') 28 HERMES_BUILD_PATH = os.path.join(HERMES_CODE_PATH, "build") 29 HERMES_BUILD_LOG_PATH = os.path.join(HERMES_CODE_PATH, "build.log") 30 HERMES_CLONE_PATH = os.path.join(HERMES_CODE_PATH, "hermes")
|
/arkcompiler/runtime_core/static_core/runtime/ |
H A D | runtime_controller.cpp | 40 static bool StartsWithData(std::string_view path) in StartsWithData() argument 42 if (path.empty() || (path[0] != '/')) { in StartsWithData() 45 return StartsWith(path, DIR_DATA_DATA) || StartsWith(path, DIR_DATA_USER); in StartsWithData() 48 static bool IsInPermitList(std::string_view path) in IsInPermitList() argument 50 size_t pos = path.rfind('/'); in IsInPermitList() 52 LOG(ERROR, RUNTIME) << "Failed to get file name from path: " << path; in IsInPermitList() 55 std::string_view fileName = path in IsInPermitList() [all...] |
/arkcompiler/ets_runtime/ecmascript/platform/common/ |
H A D | filesystem.cpp | 28 bool CreateDirectory(const std::string& path) in CreateDirectory() argument 30 if (path.empty()) { in CreateDirectory() 33 auto pos = path.find_last_of('/'); in CreateDirectory() 35 if (!CreateDirectory(path.substr(0, pos))) { in CreateDirectory() 39 panda::os::CreateDirectories(path); in CreateDirectory() 40 if (!Exists(path)) { in CreateDirectory() 46 bool Exists(const std::string& path) in Exists() argument 48 return panda::ecmascript::FileExist(path.c_str()); in Exists() 60 std::size_t FileSize(const std::string& path) in FileSize() argument 63 stat(path in FileSize() 67 RemoveAll(const std::string& path) RemoveAll() argument [all...] |
/arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/plugins/ets/ets_templates/ |
H A D | ets_templates_generator.py | 41 def dfs(self, path: Path, seen: Set) -> None: 42 if not path.exists() or path in seen: 44 seen.add(path) 46 if path.is_dir(): 47 for i in sorted(path.iterdir()): 49 elif path.suffix == TEMPLATE_EXTENSION: 50 self.__generate_test(path) 68 def __generate_test(self, path: Path) -> None: 69 test_full_name = os.path [all...] |
/arkcompiler/ets_frontend/es2panda/test/bytecode_file_size_comparison/test_cases/java_test_framework/ |
H A D | run_java.py | 31 if not os.path.isfile(arg): 33 return os.path.abspath(arg) 46 parser.add_argument('--javac-path', dest='javac_path', type=lambda arg : is_file(parser, arg), 48 parser.add_argument('--d8-path', dest='d8_path', type=lambda arg : is_file(parser, arg), 58 self.test_root = os.path.dirname(os.path.abspath(__file__)) 70 if not os.path.isabs(case_path): 71 case_path = os.path.join(self.test_root, case_path) 72 abs_case_path = os.path.abspath(case_path) 77 if not os.path [all...] |
/arkcompiler/ets_frontend/test/scripts/utils/download_sdk_and_image/ |
H A D | download.py | 49 config_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../config.yaml') 57 path = parsed_url.path 58 file_full_name = path.split("/")[-1] 140 if os.path.exists(temp_file): 141 existing_size = os.path.getsize(temp_file) 150 free_space = shutil.disk_usage(os.path.dirname(temp_file)).free 218 update_file_path = os.path [all...] |
/arkcompiler/ets_frontend/es2panda/test/bytecode_file_size_comparison/ |
H A D | size_compare.py | 27 TEST_ROOT = os.path.dirname(os.path.abspath(__file__)) 91 if not os.path.isfile(arg): 93 return os.path.abspath(arg) 97 if not os.path.isdir(arg): 99 return os.path.abspath(arg) 112 parser.add_argument('--es2abc-path', dest='es2abc_path', type=lambda arg : is_file(parser, arg), 114 parser.add_argument('--java-bin-path', dest='java_bin_path', type=lambda arg : is_dir(parser, arg), 117 parser.add_argument('--d8-path', dest='d8_path', type=lambda arg : is_file(parser, arg), 119 parser.add_argument('--r8-path', des [all...] |
/arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/plugins/ets/utils/ |
H A D | test_case.py | 24 def is_negative(path: Path) -> bool: 25 return path.name.startswith(NEGATIVE_PREFIX) or path.name.startswith(NEGATIVE_EXECUTION_PREFIX) 28 def should_be_skipped(path: Path) -> bool: 29 return path.name.startswith(SKIP_PREFIX) 32 def strip_template(path: Path) -> Tuple[str, int]: 33 stem = path.stem 34 i = path.stem.rfind("_")
|
H A D | file_structure.py | 29 path: Path 35 def __init__(self, path: Path, 41 self.path = path 44 self.name = str(path) 61 for filename in os.listdir(str(self.path)): 62 filepath: Path = self.path / filename 79 return len(os.listdir(str(self.path))) == 0 82 def walk_test_subdirs(path: Path, parent: Optional[TestDirectory] = None) -> Iterator[TestDirectory]: 88 for name in os.listdir(str(path)) [all...] |
/arkcompiler/runtime_core/verifier/tests/ |
H A D | verify_es2panda_test_abc.py | 41 yield os.path.join(root, file) 45 if not os.path.exists(dest_dir): 49 dest_path = os.path.join(dest_dir, os.path.basename(file_path)) 54 temp_files_dir = os.path.join(script_dir, "temp_files") 55 temp_js_ts_dir = os.path.join(temp_files_dir, "temp_js_ts") 56 temp_abc_dir = os.path.join(temp_files_dir, "temp_abc") 58 if os.path.exists(temp_files_dir): 68 base_name = os.path.splitext(os.path [all...] |
H A D | verify_sys_hap_abc.py | 41 destination_path = os.path.join(out_folder, file_path.replace(".hap", ".zip")) 42 shutil.copy(os.path.join(hap_folder, file_path), destination_path) 68 file_size = os.path.getsize(file_path) 90 abc_path = os.path.join(root, file) 97 failed_abc_list.append(os.path.relpath(abc_path, directory)) 113 zip_path = os.path.join(hap_folder, file) 114 extract_folder = os.path.join(hap_folder, file.replace(".zip", "")) 118 ets_path = os.path.join(extract_folder, "ets") 119 if not os.path.exists(ets_path): 122 modules_abc_path = os.path [all...] |
/arkcompiler/ets_frontend/es2panda/test/ |
H A D | runner.py | 18 from os import path namespace 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 [all...] |
/arkcompiler/ets_frontend/ets2panda/evaluate/ |
H A D | pathResolver.cpp | 41 for (const auto &[path, entity] : optOverloadSet->second) { in FindImportedFunctions() 43 FindExportedFunctions(overloadSet, path, entity); in FindImportedFunctions() 61 for (const auto &[path, entity] : optOverloadSet->second) { in FindExportedFunctions() 63 if (path.empty()) { in FindExportedFunctions() 66 FindExportedFunctions(overloadSet, path, entity); in FindExportedFunctions() 75 for (const auto &[path, entity] : optReExportAll->second) { in FindExportedFunctions() 80 FindExportedFunctions(overloadSet, path, entityName); in FindExportedFunctions() 100 for (const auto &[path, entity] : optEntity->second) { in FindNamedImportAll() 102 return path; in FindNamedImportAll() 130 auto [path, entit in FindImportedEntity() [all...] |