| /arkcompiler/ets_frontend/testTs/ |
| D | utils.py | 34 def mk_dir(path): argument 35 if not os.path.exists(path): 36 os.makedirs(path) 39 def remove_dir(path): argument 40 if os.path.exists(path): 41 shutil.rmtree(path) 44 def remove_file(path): argument 45 if os.path.exists(path): 46 os.remove(path) 49 def clean_file(path): argument [all …]
|
| 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.abspath(os.path.join(CUR_FILE_DIR, "../../..")) [all …]
|
| /arkcompiler/ets_frontend/legacy_bin/api8/ |
| D | manifest_tag.xml | 20 …<project name="ability_ability_lite" path="foundation/aafwk/aafwk_lite" revision="a68d6d7043d8455c… 21 …<project name="ability_ability_runtime" path="foundation/aafwk/standard" revision="2d1fae94bc520c9… 22 …<project name="accessibility" path="base/accessibility" revision="8b7e96589b672c590a65b9ec58241ec0… 23 …<project name="account_os_account" path="base/account/os_account" revision="3fd5f525cdcdaab2b92872… 24 …<project name="ai_engine" path="foundation/ai/engine" revision="ea2bf753964f265c2875d06e17b46544a9… 25 …<project name="applications_admin_provisioning" path="applications/standard/admin_provisioning" re… 26 …<project name="applications_call" path="applications/standard/call" revision="19077cc0474000320fe7… 27 …<project name="applications_camera" path="applications/standard/camera" revision="d14dd4df946144e7… 28 …<project name="applications_camera_sample_communication" path="applications/sample/camera/communic… 29 …<project name="applications_camera_screensaver_app" path="applications/sample/camera/screensaver" … [all …]
|
| /arkcompiler/ets_frontend/test262/ |
| 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.join(DATA_DIR, "test_es2015") 48 TEST_ES2021_DIR = os.path.join(DATA_DIR, "test_es2021") [all …]
|
| /arkcompiler/ets_frontend/arkguard/test/ut/utils/ |
| D | FileUtils.spec.ts | 25 let path = '/user/local/tester'; variable 26 assert.strictEqual(FileUtils.readFile(path), undefined); 30 let path = 'test/ut/utils/demo.txt'; variable 31 assert.strictEqual(FileUtils.readFile(path), 'hello world!'); 36 let path = 'test/ut/utils/demo.json'; variable 37 let obj = FileUtils.readFileAsJson(path); 42 let path = 'test/utils/demo_not_found.json'; variable 43 let obj = FileUtils.readFileAsJson(path); 48 let path = 'test/utils/error_json.txt'; variable 49 let obj = FileUtils.readFileAsJson(path); [all …]
|
| /arkcompiler/ets_frontend/ets2panda/util/ |
| D | path.cpp | 19 #include "path.h" 23 Path::Path() = default; 25 Path::Path(const util::StringView &absolutePath, ArenaAllocator *allocator) in Path() function in ark::es2panda::util::Path 30 void Path::Initializer(const std::string &path, ArenaAllocator *allocator) in Initializer() argument 34 path_ = util::UString(path, allocator).View(); in Initializer() 47 void Path::InitializeFileName() in InitializeFileName() 64 void Path::InitializeFileExtension() in InitializeFileExtension() 76 void Path::InitializeAbsoluteParentFolder() in InitializeAbsoluteParentFolder() 89 void Path::InitializeParentFolder() in InitializeParentFolder() 100 void Path::InitializeBasePath(std::string basePath) in InitializeBasePath() [all …]
|
| 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.substr(0, pos); in ParentPath() 79 return fs::path(path).parent_path().string(); in ParentPath() 83 static std::string MakeAbsolute(const std::string &path, const std::string &base) in MakeAbsolute() argument 85 return IsAbsolute(path) ? path : JoinPaths(base, path); in MakeAbsolute() [all …]
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/plugins/ets/utils/ |
| D | file_structure.py | 23 from pathlib import Path 29 path: Path 35 def __init__(self, path: Path, argument 41 self.path = path 44 self.name = str(path) 60 def iter_files(self, allowed_ext: Optional[List[str]] = None) -> Iterator[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… argument [all …]
|
| D | test_case.py | 18 from pathlib import Path 24 def is_negative(path: Path) -> bool: argument 25 return path.name.startswith(NEGATIVE_PREFIX) or path.name.startswith(NEGATIVE_EXECUTION_PREFIX) 28 def should_be_skipped(path: Path) -> bool: argument 29 return path.name.startswith(SKIP_PREFIX) 32 def strip_template(path: Path) -> Tuple[str, int]: argument 33 stem = path.stem 34 i = path.stem.rfind("_")
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/plugins/ets/ets_templates/ |
| D | ets_templates_generator.py | 21 from pathlib import Path 33 def __init__(self, root_path: Path, gen_path: Path) -> None: argument 41 def dfs(self, path: Path, seen: Set) -> None: argument 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: argument [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/benchmark/ |
| D | utils.py | 30 write_log_file(os.path.join(REPORT_DIR, LOG_FILE), log_str) 38 def traverse_dir(path): argument 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): argument 70 if os.path.exists(path): 71 shutil.rmtree(path) 72 os.mkdir(path) [all …]
|
| /arkcompiler/runtime_core/disassembler/tests/ |
| 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.exists(out_merged_dependency_proto_dir): 178 frontend_binary = os.path.join(args.build_dir, 'es2abc') [all …]
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/ |
| D | utils.py | 25 from os import makedirs, path, remove 27 from pathlib import Path 44 archive_file = path.join(path.sep, 'tmp', f'{name}.zip') 57 if path.exists(target_path): 62 arch.extractall(path.dirname(target_path)) 72 def generate(name: str, url: str, revision: str, generated_root: Path, *, argument 77 dest_path = path.join(generated_root, stamp_name) 79 stamp_file = path.join(dest_path, f'{stamp_name}.stamp') 81 if not force_download and path.exists(stamp_file): 84 temp_path = path.join(path.sep, 'tmp', name, f'{name}-{revision}') [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/bytecode_file_size_comparison/ |
| 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), 113 help='Path to the executable program es2abc', required=True) 114 …parser.add_argument('--java-bin-path', dest='java_bin_path', type=lambda arg : is_dir(parser, arg), 115 help='Path to java bin where exists java/jar/javac command, \ 117 parser.add_argument('--d8-path', dest='d8_path', type=lambda arg : is_file(parser, arg), [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/bytecode_file_size_comparison/test_cases/java_test_framework/ |
| 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), 47 help='Path to javac compiler', required=True) 48 parser.add_argument('--d8-path', dest='d8_path', type=lambda arg : is_file(parser, arg), 49 help='Path to the executable program d8', required=True) 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) [all …]
|
| D | run_javar8.py | 35 if not os.path.isfile(arg): 37 return os.path.abspath(arg) 40 if not os.path.isdir(arg): 42 return os.path.abspath(arg) 54 …parser.add_argument('--java-bin-path', dest='java_bin_path', type=lambda arg : is_dir(parser, arg), 55 help='Path to java root', required=True) 56 parser.add_argument('--r8-path', dest='r8_path', type=lambda arg : is_file(parser, arg), 57 help='Path to the executable program r8', required=True) 58 parser.add_argument('--rt-path', dest='rt_path', type=lambda arg : is_file(parser, arg), 59 help='Path to the jre/lib/rt.jar', required=True) [all …]
|
| /arkcompiler/runtime_core/static_core/tests/vm-benchmarks/src/vmb/ |
| D | unit.py | 21 from pathlib import Path 51 path: Union[str, Path], argument 52 src: Optional[Union[str, Path]] = None, argument 53 libs: Optional[Iterable[Union[str, Path]]] = None, argument 56 self.path: Path = Path(path) 57 self.__src: Optional[Path] = self.path.joinpath(src) if src else None 58 self.__libs: List[Path] = [ 59 self.path.joinpath(lib) for lib in libs] if libs else [] 60 self.name: str = remove_prefix(self.path.name, UNIT_PREFIX) 61 self.binaries: List[Path] = [] [all …]
|
| /arkcompiler/ets_frontend/test/scripts/auto_xts_test/ |
| 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_list[-1], "failures_report.html") 38 if (os.path.exists(failures_report)):
|
| /arkcompiler/ets_frontend/test/scripts/utils/download_sdk_and_image/ |
| 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] 186 update_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'update.py') 189 sdk_temp_file = os.path.join(file_path, 'sdk_temp') 196 dayu_temp_file = os.path.join(file_path, 'dayu200_xts') 207 download_temp_file = os.path.join(save_path, download_name) 208 if not os.path.exists(save_path): 218 save_path = os.path.join(save_path, 'dayu200_xts') 235 def unpack_sdk_file(path): argument [all …]
|
| /arkcompiler/runtime_core/verifier/tests/ |
| D | verify_sys_hap_abc.py | 28 "--hap-dir", required=True, help="Path to the HAP files directory.") 30 "--verifier-dir", required=True, help="Path to the ark_verifier directory.") 37 destination_path = os.path.join(out_folder, file_path.replace(".hap", ".zip")) 38 shutil.copy(os.path.join(hap_folder, file_path), destination_path) 66 abc_path = os.path.join(root, file) 70 failed_abc_list.append(os.path.relpath(abc_path, hap_folder)) 84 zip_path = os.path.join(hap_folder, file) 85 extract_folder = os.path.join(hap_folder, file.replace(".zip", "")) 88 ets_path = os.path.join(extract_folder, "ets") 89 if not os.path.exists(ets_path): [all …]
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/plugins/ets/ |
| D | ets_test_dir.py | 19 from pathlib import Path 25 self.__static_core_root = Path(static_core_root) 29 def tests(self) -> Path: 33 def ets_templates(self) -> Path: 37 def ets_func_tests(self) -> Path: 41 def stdlib_templates(self) -> Path: 45 def gc_stress(self) -> Path: 49 def ets_es_checked(self) -> Path: 53 def root(self) -> Path: 54 return Path(self.__root) if self.__root else self.__static_core_root / "plugins" / "ets"
|
| /arkcompiler/runtime_core/static_core/runtime/ |
| 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.substr(pos + 1U); in IsInPermitList() 64 bool RuntimeController::CanLoadPandaFile(const std::string &path) const in CanLoadPandaFile() 69 if (realpath(path.c_str(), buffer.data()) == nullptr) { in CanLoadPandaFile() 70 LOG(ERROR, RUNTIME) << "Failed to get realpath for " << path; in CanLoadPandaFile() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/extractortool/src/ |
| 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_TS, sizeof(EXT_NAME_TS) - 1)) { in FixExtName() 132 path.erase(path.length() - (sizeof(EXT_NAME_TS) - 1), sizeof(EXT_NAME_TS) - 1); in FixExtName() [all …]
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/code_coverage/ |
| D | coverage_dir.py | 19 from pathlib import Path 24 def __init__(self, general: GeneralOptions, work_dir: Path): argument 29 def html_report_dir(self) -> Path: 31 html_out_path = Path(self.__general.coverage.llvm_cov_html_out_path) 38 def info_file(self) -> Path: 42 def profdata_files_list_file(self) -> Path: 46 def profdata_merged_file(self) -> Path: 50 def root(self) -> Path: 56 def profdata_dir(self) -> Path: 58 profdata_out_path = Path(self.__general.coverage.llvm_profdata_out_path) [all …]
|
| /arkcompiler/ets_runtime/test/regresstest/ |
| 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.join(REGRESS_BASE_TEST_DIR, "regresstest_skip_tests.json") 41 REGRESS_TEST_OPTIONS = os.path.join(REGRESS_BASE_TEST_DIR, "regress_options.json")
|