| /developtools/profiler/device/plugins/ftrace_plugin/tools/device_kernel_version/default/ |
| D | ftrace_cpp_generator.py | 128 with open(parser_src_file, "w", encoding="utf-8") as f: 129 f.write(Common.cpp_copyright_header) 130 f.write('#include "sub_event_parser.h"\n') 131 f.write("\n") 132 f.write("FTRACE_NS_BEGIN\n") 133 f.write("namespace {\n") 134 f.write("using namespace OHOS::Developtools::Profiler;\n") 135 self.generate_parse_functions(category, f) 136 f.write("} // namespace\n") 137 f.write("FTRACE_NS_END\n") [all …]
|
| /developtools/hdc/scripts/ |
| D | dev_hdc_test.py | 74 targets = subprocess.check_output(f"{cls.hdc_exe} list targets".split()).split() 88 print(f"{i+1}. {t}") 99 cls.hdc_head = f"{cls.hdc_exe} -t {cls.device_name}" 120 with open(".hdctester.conf") as f: 121 content = json.load(f) 138 + f"{'hdc execution'.rjust(20, ' ')}: {cls.hdc_exe}\n" \ 139 + f"{'local storage path'.rjust(20, ' ')}: {cls.local_path}\n" \ 140 + f"{'remote storage path'.rjust(20, ' ')}: {cls.remote_path}\n" \ 141 + f"{'remote ip'.rjust(20, ' ')}: {cls.remote_ip}\n" \ 142 + f"{'remote port'.rjust(20, ' ')}: {cls.remote_port}\n" \ [all …]
|
| D | hdc_normal_test.py | 40 assert check_hdc_cmd(f"file send {get_local_path('empty')} {get_remote_path('it_empty')}") 41 assert check_hdc_cmd(f"file recv {get_remote_path('it_empty')} {get_local_path('empty_recv')}") 46 assert check_hdc_cmd(f"file send {get_local_path('small')} {get_remote_path('it_small')}") 47 assert check_hdc_cmd(f"file recv {get_remote_path('it_small')} {get_local_path('small_recv')}") 52 assert check_hdc_cmd(f"file send {get_local_path('large')} {get_remote_path('it_large')}") 53 assert check_hdc_cmd(f"file recv {get_remote_path('it_large')} {get_local_path('large_recv')}") 58 assert check_hdc_cmd(f"install -r {get_local_path('entry-default-signed-debug.hap')}", 98 fport = f"tcp:{i+100} tcp:{i+200}" 99 rport = f"tcp:{i+300} tcp:{i+400}" 100 localabs = f"tcp:{i+500} localabstract:{f'helloworld.com.app.{i+600}'}" [all …]
|
| /developtools/integration_verification/tools/fotff/utils/ |
| D | log.go | 42 CallerPrettyfier: func(f *runtime.Frame) (function string, file string) { 43 funcName := strings.Split(f.Function, ".") 45 _, filename := filepath.Split(f.File) 46 return fmt.Sprintf("%s()", fn), fmt.Sprintf("%s:%d", filename, f.Line) 65 var f *os.File 68 f, err = os.OpenFile(file, os.O_RDWR|os.O_APPEND, 0666) 70 f, err = os.Create(file) 77 logrus.SetOutput(f) 81 LogFile = f 84 f, err = os.OpenFile(stdout, os.O_RDWR|os.O_APPEND, 0666) [all …]
|
| /developtools/integration_verification/tools/fotff/rec/ |
| D | fotff_test.go | 64 func (f *FotffMocker) TaskName() string { 68 func (f *FotffMocker) Prepare(pkgDir string, device string, ctx context.Context) error { 72 func (f *FotffMocker) DoTestTask(device string, ctx context.Context) ([]tester.Result, error) { 79 return []tester.Result{{TestCaseName: f.TestCaseName(), Status: tester.ResultFail}}, nil 82 func (f *FotffMocker) DoTestCase(device string, testcase string, ctx context.Context) (tester.Resul… 89 f.lock.Lock() 90 _, pkgPrefix, _ := strings.Cut(f.runningPkg[device], "_") 92 f.lock.Unlock() 93 if pkgOrder >= f.FirstFail { 101 func (f *FotffMocker) DoTestCases(device string, testcases []string, ctx context.Context) ([]tester… [all …]
|
| /developtools/smartperf_host/trace_streamer/ |
| D | format-code.sh | 46 for f in $(find $d -type f -not -name '*sql.c' -regex '.*\.\(cpp\|hpp\|c\|h\)'); do 47 dos2unix $f 48 chmod -x $f 49 clang-format --verbose -i $f 51 for f in $(find $d -type f -not -name '*sql.c' -regex '.*\.\(gn\|gni\)'); do 52 ./prebuilts/$target_os/gn format $f
|
| /developtools/profiler/device/plugins/ftrace_plugin/tools/ |
| D | ftrace_proto_generator.py | 139 with open(bundle_proto_path, "w+") as f: 140 f.writelines(bundle_proto_head + bundle_proto_body) 144 with open(protos_gni_path, "w+") as f: 145 f.write(Common.gn_copyright_header) 147 f.write("auto_generated_ftrace_proto_sources = [\n") 149 f.write(' "{}",\n'.format(os.path.basename(proto_path))) 150 f.write("]\n") 153 with open(proto_path, "w+") as f: 154 f.write(Common.proto_common_header) 155 f.write("// category: {}\n".format(category)) [all …]
|
| /developtools/integration_verification/tools/rom_ram_analyzer/lite_small/src/ |
| D | rom_analysis.py | 59 for f in future_list: 60 f.result() 62 with open(gn_info_file, 'w', encoding='utf-8') as f: 63 json.dump(result_dict, f, indent=4) 108 f"product_name '{product_name}' not found in the config.yaml") 116 f"'relative_dir' of {product_name} not found in the config.yaml") 126 logging.warning(f"dir '{v}' not exist") 148 with open(configs[product_name]["product_infofile"], 'w', encoding='utf-8') as f: 149 json.dump(product_dict, f, indent=4) 184 logging.info(f"fuzzy match: {file_name}") [all …]
|
| /developtools/integration_verification/cases/smoke/basic/screenshot32/xdevice_smoke/testcases/ |
| D | ACLCheck.py | 24 with open(self.native_sa, 'w') as f: 25 f.write('') 29 with open(self.native_sa, mode='r', encoding='utf-8', errors='ignore') as f: 30 f.seek(0) 31 acl_result = f.read()
|
| D | APLCheck.py | 24 with open(self.apl_path, 'w') as f: 25 f.write('') 29 with open(self.apl_path, mode='r', encoding='utf-8', errors='ignore') as f: 30 f.seek(0) 31 apl_result = f.read()
|
| /developtools/global_resource_tool/src/ |
| D | resource_directory.cpp | 28 FileEntry f(resourcesDir); in ScanResources() local 29 if (!f.Init()) { in ScanResources() 33 for (const auto &it : f.GetChilds()) { in ScanResources() 67 FileEntry f(resourceTypeDir); in ScanResourceLimitKeyDir() local 68 if (!f.Init()) { in ScanResourceLimitKeyDir() 71 for (const auto &it : f.GetChilds()) { in ScanResourceLimitKeyDir()
|
| /developtools/hapsigner/autosign/ |
| D | autosign.py | 120 with open("log.txt", mode='a+', encoding='utf-8') as f: 122 f.writelines(' '.join(cmd) + "\r\n") 124 f.writelines(str(line.strip()) + "\r\n") 128 with open("error.txt", mode='a+', encoding='utf-8') as f: 130 f.writelines(' '.join(cmd) + "\r\n") 134 f.writelines(str(line.strip()) + "\r\n") 231 with open(config_file, 'r', encoding='utf-8') as f: 232 for line in f.readlines(): 279 with open(app_cert_file, 'r', encoding='utf-8') as f: 280 app_cert_temp = f.read() [all …]
|
| /developtools/integration_verification/tools/rom_ram_analyzer/standard/ |
| D | rom_analyzer.py | 49 with open(gn, 'r', encoding='utf-8') as f: 50 content = f.read() 59 for f in files: 60 f = f.split('/')[-1] 61 self.result_dict[f] = { 69 grep_cmd = f"grep -rn '{grep_kw}' --include=BUILD.gn {self.project_path}" 96 with open(system_module_info_json, 'r', encoding='utf-8') as f: 97 product_list = json.loads(f.read()) 266 with open("rom_ram_baseline.json", 'w', encoding='utf-8') as f: 267 json.dump(rom_baseline_dict, f, indent=4) [all …]
|
| /developtools/integration_verification/tools/fotff/pkg/gitee_common/ |
| D | get_newer_dir.go | 37 f := files[len(files)-1] 38 if f.Name() != cur { 39 logrus.Infof("new package found, name: %s", f.Name()) 40 return f.Name()
|
| /developtools/integration_verification/tools/deps_guard/elf_file_mgr/sa/ |
| D | sa.py | 34 with open(full_name, "r") as f: 35 profile = json.load(f) 60 for f in os.listdir(path): 61 full_name = os.path.join(path, f) 62 if os.path.isfile(full_name) and f.endswith(".json"):
|
| /developtools/smartperf_host/ide/server/ |
| D | smarperfServer.py | 54 …cmd_res = subprocess.run(f"netstat -ano -p tcp | findstr {port_number}", capture_output=True, text… 70 subprocess.run(f"taskkill /F /PID {pid} /T", shell=True) 94 print(f'upload') 97 print(f'download-file') 115 file_name = f"upload/{datetime.now().strftime('%Y%m%d%H%M%S%f')}{suffixStr}" 118 with open(file_name, "wb") as f: 119 f.write(content) 120 written = f.tell() 150 print(f"{now} delete -> {file_path}") 163 fileName = f"{now}.txt" [all …]
|
| /developtools/integration_verification/tools/rom_ram_analyzer/standard/pkgs/ |
| D | rom_ram_baseline_collector.py | 50 cmd=f"find {oh_path} -name bundle.json", post_processor=post_handler) 53 with open(bundle, 'r', encoding='utf-8') as f: 54 content: Dict[str, Any] = json.loads(f.read()) 57 logging.warning(f"{bundle} has no field of 'component'.") 65 … f"subsystem=\"{subsystem_name}\", rom=\"{rom_baseline}\", ram=\"{ram_baseline}\" in {bundle}")
|
| D | basic_tool.py | 47 … os.path.join(root, f) if real_path else os.path.join(root, f))) if apply_abs else os.path.relpath( 48 …os.path.realpath(os.path.join(root, f) if real_path else os.path.join(root, f))) for f in file_nam… 49 if p_filter(os.path.join(root, f))])
|
| /developtools/integration_verification/tools/rom_ram_analyzer/lite_small/pkgs/ |
| D | rom_ram_baseline_collector.py | 54 …bundle_list = BasicTool.execute(cmd=f"find {oh_path} -name bundle.json", post_processor=post_handl… 57 with open(bundle, 'r', encoding='utf-8') as f: 58 content: Dict[str, Any] = json.loads(f.read()) 61 logging.warning(f"{bundle} has no field of 'component'.") 68 …logging.warning(f"subsystem=\"{subsystem_name}\", rom=\"{rom_baseline}\", ram=\"{ram_baseline}\" i…
|
| /developtools/integration_verification/DeployDevice/src/util/ |
| D | find_fail_task.py | 32 print(f'发现失败任务:{task_name}') 33 fw.write(f'失败任务路径:{dir_path}\n') 42 fw.write(f'总共检索日志:{total_count}个\n') 43 fw.write(f'其中存在失败的日志:{fail_count}个\n')
|
| D | log_info.py | 55 f = sys._getframe(2) 56 filename = os.path.basename(f.f_code.co_filename) 57 lineno_str = str(f.f_lineno) 71 with open(self.log_file_path, 'a', encoding='utf-8') as f: 72 f.write(log_message + '\n')
|
| /developtools/hdc/hdc_rust/src/common/ |
| D | filemanager.rs | 44 Ok(f) => { in open() 45 self.file = Some(f); in open() 59 if let Some(f) = &self.file { in file_size() 60 return f.metadata().unwrap().len(); in file_size()
|
| /developtools/integration_verification/cases/smoke/basic/screenshot32/acls_check/ |
| D | read_acl_whitelist.py | 30 with open(path, 'r') as f: 31 file = f.read() 41 f = json.loads(file) 42 for it in f:
|
| /developtools/integration_verification/cases/smoke/basic/screenshot32/xdevice_smoke/acls_check/ |
| D | read_acl_whitelist.py | 30 with open(path, 'r') as f: 31 file = f.read() 41 f = json.loads(file) 42 for it in f:
|
| /developtools/integration_verification/tools/deps_guard/elf_file_mgr/hdi/ |
| D | hdi_parser.py | 31 with open(out_file) as f: 32 lines = f.readlines() 36 with open(out_file) as f: 37 lines = f.readlines()
|