| /arkcompiler/ets_runtime/ecmascript/compiler/tests/ |
| D | create_empty_file_test.cpp | 53 std::string file_path = temp_dir + "/dir1/dir2/entry.an"; in HWTEST_F_L0() local 54 filesystem::CreateEmptyFile(file_path); in HWTEST_F_L0() 56 EXPECT_TRUE(filesystem::Exists(file_path)); in HWTEST_F_L0() 61 std::string file_path = temp_dir + "/entry.an"; in HWTEST_F_L0() local 63 std::ofstream ofs(file_path); in HWTEST_F_L0() 67 auto old_size = filesystem::FileSize(file_path); in HWTEST_F_L0() 70 filesystem::CreateEmptyFile(file_path); in HWTEST_F_L0() 72 auto new_size = filesystem::FileSize(file_path); in HWTEST_F_L0() 74 EXPECT_TRUE(filesystem::Exists(file_path)); in HWTEST_F_L0() 82 std::string file_path = dir_path + "/entry.an"; in HWTEST_F_L0() local [all …]
|
| /arkcompiler/ets_frontend/test/scripts/utils/download_sdk_and_image/ |
| D | update.py | 57 def before_update_sdk(file_path): argument 61 def after_update_sdk(file_path, output_path): argument 65 modify_package_json(file_path, output_path) 68 def add_executable_permission(file_path): argument 69 current_mode = os.stat(file_path).st_mode 71 os.chmod(file_path, new_mode) 113 def modify_package_json(file_path, output_path): argument 120 *[file_path, 'ets', 'oh-uni-package.json'])) 135 async def update_sdk_to_output_path(file_path, output_path): argument 136 before_update_sdk(file_path) [all …]
|
| D | download.py | 140 def check_gzip_file(file_path): argument 142 with gzip.open(file_path, 'rb') as gzfile: 150 def check_zip_file(file_path): argument 152 if zipfile.is_zipfile(file_path): 153 with zipfile.ZipFile(file_path, 'r') as zip_file: 185 def copy_to_output_path(file_name, file_path, output_path_list): argument 189 sdk_temp_file = os.path.join(file_path, 'sdk_temp') 196 dayu_temp_file = os.path.join(file_path, 'dayu200_xts')
|
| /arkcompiler/runtime_core/static_core/scripts/clang-tidy/ |
| D | clang_tidy_check.py | 290 def need_to_ignore_file(file_path: str, panda_dir: str, build_dir: str) -> bool: 292 if not file_path.endswith(src_exts): 297 if regexp.search(file_path): 318 file_path = str(os.path.realpath(cmd["file"])) 319 if need_to_ignore_file(file_path, panda_dir, build_dir): 322 if regexp and not regexp.search(file_path): 333 file_list.append((file_path, compile_args)) 343 for file_path, keys in file_list: 345 filtered.append((file_path, keys)) 348 if filtered[-1][0] != file_path: [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/parse_command/ |
| D | parse_command.py | 112 file_path: str = None, parameters: list = None): 114 command_list = [executable_program_path, file_path] 120 if file_path: 121 command_list[1] = file_path 141 … self.crash_dict = {file_path : [SUCCESS_STATUS, SUCCESS_STATUS] for file_path in self.case_list} 288 for file_path in self.case_manager.case_list: 289 d8_case_path = file_path.replace('.js', '.mjs') 290 shutil.copyfile(file_path, d8_case_path) 295 self.output.append((file_path, instruction_number)) 303 for file_path in self.case_manager.case_list: [all …]
|
| /arkcompiler/ets_runtime/tools/ap_file_viewer/server/ |
| D | apdump_server.py | 106 def parse_ap_file(file_path): argument 107 encoded_path = file_path.encode('utf-8') 135 def parse_ap_file_safely(self, file_path): argument 137 return parse_ap_file(file_path) 182 file_path = os.path.join(save_path, filename) 185 fd = os.open(file_path, os.O_WRONLY | os.O_CREAT, 0o644) 188 ap_res = safe_handler.parse_ap_file_safely(file_path) 189 os.remove(file_path) 190 dir_path = os.path.dirname(file_path) 212 file_path = parse_result.path[3:] [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/benchmark/ |
| D | utils.py | 33 def write_log_file(file_path, log_str): argument 34 with open(file_path, mode='a+') as f: 41 file_path = os.path.join(path, file) 42 if os.path.isdir(file_path): 43 file_paths.update(traverse_dir(file_path)) 45 dir_name = os.path.dirname(file_path) 47 file_paths[dir_name] = [file_path] 49 file_paths[dir_name].append(file_path) 174 for file_path in file_paths: 175 if not file_path: [all …]
|
| D | run_benchmark.py | 111 for file_path in file_paths: 112 file_name = os.path.basename(file_path) 116 … case_execution_time, case_execution_times = self.run_single_benchmark(file_path, engine_type) 134 def run_single_benchmark(self, file_path, engine_type): argument 138 output_file = os.path.join(DEFAULT_OUTPUT_DIR, os.path.basename(file_path). 142 new_cmds += [file_path, "--output", output_file] 144 new_cmds += [output_file.replace(ABC_FILE_SUFFIX, HERMES_FILE_SUFFIX), file_path]
|
| /arkcompiler/ets_frontend/arkguard/scripts/ |
| D | grammar_test.py | 106 def get_file_suffix(file_path) -> FileSuffix: argument 108 if file_path.endswith(ext): 109 file_path_without_suffix = file_path[: -len(ext)] 111 return FileSuffix(file_path, "") 114 def should_run_with_node(file_path): argument 116 if file_path.endswith(one): 119 if file_path.endswith(EXTENTION_JS): 122 file_path.endswith(EXTENTION_TS) 123 and not file_path.endswith(EXTENTION_DETS) 124 and not file_path.endswith(EXTENTION_DTS) [all …]
|
| /arkcompiler/runtime_core/static_core/scripts/code_style/ |
| D | clang_tidy_rename.py | 106 def need_to_ignore_file(file_path): argument 108 if not file_path.endswith(src_exts): 113 if skip_dir in file_path: 134 file_path = str(os.path.realpath(cmd["file"])) 135 if need_to_ignore_file(file_path): 138 if file_path.startswith(build_dir): 141 if regexp is not None and not regexp.search(file_path): 148 file_list.append((file_path, compile_args))
|
| /arkcompiler/runtime_core/verifier/tests/ |
| D | verify_sys_hap_abc.py | 35 for file_path in os.listdir(hap_folder): 36 if file_path.endswith(".hap"): 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) 49 def verify_file(file_path, ark_verifier_path): argument 50 verification_command = [ark_verifier_path, "--input_file", file_path]
|
| /arkcompiler/ets_frontend/es2panda/test/bytecode_file_size_comparison/test_cases/java_test_framework/ |
| D | run_javar8.py | 114 for file_path in self.case_list: 115 child_path = file_path[:file_path.rfind('.')] 116 cmd_java2class = [javac_path, file_path, '-d', child_path] 117 case_name = self.get_case_name(file_path) 137 self.output[self.get_case_name(file_path)] = dex_file_size 138 self.source_output[self.get_case_name(file_path)] = os.path.getsize(file_path)
|
| D | run_java.py | 94 for file_path in self.case_list: 96 cmd_java2class.extend([file_path]) 98 case_root = os.path.dirname(file_path) 125 self.output[self.get_case_name(file_path)] = dex_file_size
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/plugins/ets/ets_templates/ |
| D | benchmark.py | 57 file_path = self.__output / f"{name}{OUT_EXTENSION}" 58 write_2_file(file_path=file_path, content=test_content) 59 tests.append(str(file_path))
|
| /arkcompiler/ets_runtime/script/ |
| D | metadata_generate.py | 47 def parse_type_enums(file_path): argument 48 with open(file_path, 'r') as f: 73 def generate_metadata_json(enum_list, metadata_list, type_layout, file_path, version): argument 77 with os.fdopen(os.open(file_path, os.O_RDWR | os.O_CREAT | os.O_TRUNC, 0o777), 'w+') as f:
|
| /arkcompiler/runtime_core/libpandafile/ |
| D | pgo.h | 32 void SetProfilePath(std::string &file_path) in SetProfilePath() argument 34 profile_file_path_ = std::move(file_path); in SetProfilePath()
|
| /arkcompiler/ets_runtime/tools/ap_file_viewer/test/ |
| D | test_ap.py | 56 file_path = os.path.normpath(path).replace("\\", "/") 57 file_input.send_keys(file_path) 105 file_path = os.path.normpath(path).replace("\\", "/") 106 file_input2.send_keys(file_path)
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/ |
| D | utils.py | 117 def read_file(file_path: Union[Path, str]) -> str: 118 with os.fdopen(os.open(file_path, os.O_RDONLY, 0o755), "r", encoding='utf8') as f_handle: 123 def write_2_file(file_path: Union[Path, str], content: str) -> None: 127 makedirs(path.dirname(file_path), exist_ok=True) 128 …with os.fdopen(os.open(file_path, os.O_RDWR | os.O_CREAT, 0o755), mode='w+', encoding="utf-8") as …
|
| /arkcompiler/ets_runtime/test/quickfix/ |
| D | generate_js_and_merge_file.py | 204 def is_file_in_list(file_path): argument 206 os.path.dirname(file_path) 207 if os.path.isfile(file_path) 208 else file_path
|
| /arkcompiler/ets_frontend/test/scripts/sdk_test/ |
| D | utils.py | 90 def add_executable_permission(file_path): argument 91 current_mode = os.stat(file_path).st_mode 93 os.chmod(file_path, new_mode)
|
| /arkcompiler/ets_runtime/test/aotjsperftest/ |
| D | run_js_test.py | 373 file_path = os.path.join(root, file) 374 results = file_path.split("/") 379 … test_data = run_js_case_via_ark(BINARY_PATH, file_path, class_name, api_name, report_file) 392 file_path = os.path.join(root, file) 393 results = file_path.split("/") 720 file_path = os.path.join(root, file) 721 file_list.append(file_path) 722 for _, file_path in enumerate(file_list): 723 results = file_path.split("/") 728 v_8_exec_time_dict = run_v_8_single_js_case(file_path, '', js_case_name) [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/bytecode_file_size_comparison/ |
| D | size_compare.py | 250 for file_path in self.case_list: 251 abc_file_path = ''.join([file_path[:file_path.rfind('.')], '.abc']) 254 cmd.extend([file_path]) 266 self.output[get_case_name(file_path)] = abc_file_size 267 self.source_output[get_case_name(file_path)] = os.path.getsize(file_path)
|
| /arkcompiler/ets_runtime/test/workloadtest/ |
| D | work_load.py | 155 def write_to_txt(file_path, text): argument 157 file_descriptor = os.open(file_path, args, stat.S_IRUSR | stat.S_IWUSR) 255 file_path = os.path.join(destination_dir, file_name) 256 if os.path.isfile(file_path): 257 os.remove(file_path)
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/code_coverage/ |
| D | coverage.py | 94 file_path = f"{self.coverage_dir.profdata_dir}/{pid}-{hash_code}" 95 profraw_file = os.extsep.join([file_path, 'profraw']) 96 profdata_file = os.extsep.join([file_path, 'profdata'])
|
| /arkcompiler/ets_runtime/test/jsperftest/ |
| D | run_js_test.py | 349 file_path = os.path.join(root, file) 350 results = file_path.split("/") 355 … test_data = run_js_case_via_ark(file_path, class_name, api_name, iterations, report_file) 368 file_path = os.path.join(root, file) 369 results = file_path.split("/") 737 file_path = os.path.join(root, file) 738 file_list.append(file_path) 739 for _, file_path in enumerate(file_list): 740 results = file_path.split("/") 745 v_8_exec_time_dict = run_v_8_single_js_case(file_path, '', js_case_name, iterations) [all …]
|