/test/testfwk/developer_test/local_coverage/keyword_registration/ |
H A D | keyword_filter.py | 50 file_path = os.path.join(root_path, file) 51 yield file_path 99 def get_coverage_content(file_path): 103 if not os.path.exists(file_path): 106 with open(file_path, "r", encoding="utf-8") as file: 344 def get_coverage_lines_by_branch(self, file_path, content=None): 349 content = self.get_coverage_content(file_path) 352 _, file_name = os.path.split(file_path) 500 def update_coverage_ratio_tag(self, file_path): 504 with open(file_path, " [all...] |
/test/testfwk/developer_test/libs/fuzzlib/ |
H A D | fuzzer_helper.py | 135 file_path = os.path.join(project_dir_path, 'project.xml') 136 if os.path.exists(file_path): 137 os.remove(file_path) 138 with os.fdopen(os.open(file_path, FLAGS, MODES), 'w') as filehandle: 141 file_path = os.path.join(project_dir_path, "%s.cpp" % args.project_name) 142 if os.path.exists(file_path): 143 os.remove(file_path) 144 with os.fdopen(os.open(file_path, FLAGS, MODES), 'w') as filehandle: 147 file_path = os.path.join(project_dir_path, "%s.h" % args.project_name) 148 if os.path.exists(file_path) [all...] |
/test/testfwk/xdevice/plugins/devicetest/utils/ |
H A D | util.py | 41 def clean_sys_resource(file_path=None, file_base_name=None): 44 :param file_path: sys path 48 if file_path in sys.path: 49 sys.path.remove(file_path) 74 def get_dir_path(file_path): 75 if isinstance(file_path, str): 76 if os.path.exists(file_path): 77 return os.path.dirname(file_path) 81 def import_from_file(file_path, file_base_name): 82 if file_path i [all...] |
H A D | file_util.py | 174 def os_open_file_write(file_path, content, mode="w"): 178 dir_path = os.path.dirname(file_path) 181 with os.fdopen(os.open(file_path, flags, modes), mode) as fout: 189 def os_open_file_read(file_path, mode="r"): 193 with os.fdopen(os.open(file_path, flags, modes), mode) as fout: 196 err_msg = ErrorMessage.Common.Code_0201001.format(ErrorCategory.Environment, file_path) 205 def save_file(file_path, content): 206 os_open_file_write(file_path, content, "wb")
|
/test/testfwk/developer_test/local_coverage/restore_comment/ |
H A D | after_lcov_branch.py | 35 file_path = os.path.join(root, file_name) 38 file_path_list_append(file_path) 78 file_path = os.path.join(root_path, path_str) 79 if os.path.exists(file_path): 80 cpp_list = get_source_file_list(file_path) 83 print("The directory does not exist.", file_path)
|
H A D | build_before_generate.py | 37 file_path = os.path.join(root, file_name) 40 file_path_list_append(file_path) 92 file_path = os.path.join(root_path, path_str) 93 if os.path.exists(file_path): 94 source_file_path = get_source_file_list(file_path) 97 print("The directory does not exist.", file_path)
|
/test/testfwk/developer_test/local_coverage/interface_coverage/ |
H A D | interface_coverage_gcov_lcov.py | 102 for file_path in files: 103 if "" == file_path or -1 != file_path.find(__file__): 106 pos = file_path.rfind(os.sep) 107 file_name = file_path[pos + 1:] 108 file_path = os.path.join(dirs[0], file_path) 110 print("Skipped %s" % file_path) 112 file_list.append(file_path) 226 file_path [all...] |
/test/testfwk/developer_test/local_coverage/automate_execute/ |
H A D | install_coverage_tools.py | 42 file_path = "/etc/lcovrc" 43 os.chmod(file_path, 0o777) 44 with open(file_path, "r", encoding="utf-8") as f: 47 with open(file_path, "w", encoding="utf-8") as f1:
|
/test/testfwk/developer_test/aw/python/distributed/common/ |
H A D | drivers.py | 53 file_path = os.path.join(longcommand_path, sh_file_name) 55 with os.fdopen(os.open(file_path, FLAGS, MODES), 'a') as file_desc: 58 print(f"Error for make long command file: {file_path}") 59 return sh_file_name, file_path 146 sh_file_name, file_path = make_long_command_file(command, 149 self.device.push_file(file_path, DEVICE_TEST_PATH)
|
/test/testfwk/developer_test/libs/benchmark/report/ |
H A D | generate_report.py | 61 for file_path in files: 62 if "" != file_path and -1 == file_path.find(__file__): 63 pos = file_path.rfind(os.sep) 64 file_name = file_path[pos + 1:] 65 file_path = os.path.join(dirs[0], file_path) 67 print(SETTING_RED_STYLE % ("Skipped %s" % file_path)) 69 file_list.append(file_path)
|
/test/testfwk/developer_test/aw/python/distributed/distribute/ |
H A D | distribute.py | 206 def _write_device_config(device_info, file_path): 207 file_dir, file_name = os.path.split(file_path) 211 if os.path.exists(file_path): 212 os.remove(file_path) 213 with os.fdopen(os.open(file_path, FLAGS, MODES), 'w') as file_desc: 215 os.rename(file_path, final_file)
|
/test/testfwk/xdevice/plugins/devicetest/controllers/tools/ |
H A D | screen_agent.py | 200 def resize_image(cls, file_path, max_height=480, file_type="image"): 204 if os.path.exists(file_path): 207 img = Image.open(file_path) 213 video_info = cv2.VideoCapture(file_path)
|
/test/testfwk/xdevice/src/xdevice/_core/ |
H A D | utils.py | 55 def get_filename_extension(file_path): 56 _, fullname = os.path.split(file_path) 294 file_path = os.path.join(path, alt_dir, _input) 295 if os.path.exists(file_path): 296 return os.path.abspath(file_path) 298 file_path = os.path.join(path, _input) 299 if os.path.exists(file_path): 300 return os.path.abspath(file_path)
|
/test/testfwk/xdevice/src/xdevice/_core/config/ |
H A D | config_manager.py | 58 self.file_path = config_file 68 self.file_path = os.path.abspath(os.path.join( 72 LOG.debug("User config path: %s" % self.file_path) 73 if os.path.exists(self.file_path): 74 tree = ElementTree.parse(self.file_path)
|
/test/xts/hats/ |
H A D | check_hvigor.py | 25 def get_file_md5(file_path): 27 with open(file_path, "rb") as f:
|
/test/testfwk/xdevice/plugins/ohos/src/ohos/testkit/ |
H A D | kit.py | 290 def __download_web_resource(self, device, file_path): 302 file_path = file_path.replace("\\", "/") 305 if re.match(pattern, file_path) is None: 307 file_path = re.sub(pattern, "", file_path) 309 request_config.get(ConfigConst.resource_path), file_path) 312 url = self.__query_resource_url(device, web_resource_url, "resource/" + file_path) 329 LOG.error(f"download the resource of '{file_path}' failed. {e}") 335 def __query_resource_url(self, device, query_url, file_path) [all...] |
H A D | kit_lite.py | 291 file_path = get_file_absolute_path(source, self.paths) 292 if os.path.isdir(file_path): 293 for root, _, files in os.walk(file_path): 299 file_local_paths.append(file_path)
|
/test/xts/acts/ |
H A D | check_hvigor.py | 25 def get_file_md5(file_path): 27 with open(file_path, "rb") as f:
|
H A D | get_dependency.py | 47 file_path = os.path.join(root, file) 49 with open(file_path, 'r', encoding='utf-8') as f:
|
/test/testfwk/xdevice/plugins/ohos/src/ohos/drivers/ |
H A D | oh_yara_driver.py | 358 def _do_parse_json(file_path): 360 if not os.path.exists(file_path): 361 raise ParamError(ErrorMessage.Common.Code_0301015.format(file_path)) 364 with os.fdopen(os.open(file_path, flags, modes), 368 raise ParamError(ErrorMessage.Config.Code_0302012.format(file_path))
|
/test/xts/tools/build/ |
H A D | suite.py | 159 for file_path in copyfiles: 160 subprocess.call(["cp", "-rf", file_path, suite_path]) 384 def _check_file_exist(self, file_path): 385 if not os.path.exists(file_path): 386 raise Exception("File [%s] does not exist!" % file_path)
|
/test/testfwk/developer_test/src/core/config/ |
H A D | resource_manager.py | 66 def find_node_by_target(file_path, targe_tname): 69 if os.path.exists(file_path): 70 tree = ElementTree.parse(file_path)
|
/test/xts/tools/lite/build/ |
H A D | suite.py | 159 def _check_file_exist(file_path): 160 if not os.path.exists(file_path): 161 raise Exception("File [%s] does not exist!" % file_path)
|
/test/testfwk/xdevice/plugins/ohos/src/ohos/environment/ |
H A D | device_lite.py | 62 file_path = "" 66 file_path = os.path.abspath(os.path.join( 70 if os.path.exists(file_path): 71 return file_path
|
/test/testfwk/xdevice/src/xdevice/_core/executor/ |
H A D | source.py | 310 def _make_test_descriptor(file_path, test_type_key): 316 filename, _ = get_filename_extension(file_path) 320 os.path.join(os.path.dirname(file_path), filename)) 329 source=TestSource(file_path, "", config_file, filename,
|