• Home
  • Raw
  • Download

Lines Matching refs:f

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" \
143 + f"{'device name'.rjust(20, ' ')}: {cls.device_name}\n" \
144 + f"{'connect type'.rjust(20, ' ')}: {cls.tmode}\n" \
145 + f"{'hdc head'.rjust(20, ' ')}: {cls.hdc_head}\n" \
146 + f"{'changed testcase'.rjust(20, ' ')}: {cls.changed_testcase}\n" \
147 + f"{'testcase path'.rjust(20, ' ')}: {cls.testcase_path}\n" \
148 + f"{'loaded testcase'.rjust(20, ' ')}: {cls.loaded_testcase}\n"
154 …res = subprocess.check_output(f"{cls.hdc_exe} tconn {cls.remote_ip}:{cls.remote_port}".split()).de…
163 if opt := input(f"Default hdc execution? [{cls.hdc_exe}]\n").strip():
165 if opt := input(f"Default local storage path? [{cls.local_path}]\n").strip():
167 if opt := input(f"Default remote storage path? [{cls.remote_path}]\n").strip():
169 if opt := input(f"Default remote ip? [{cls.remote_ip}]\n").strip():
171 if opt := input(f"Default remote port? [{cls.remote_port}]\n").strip():
173 if opt := input(f"Default device name? [{cls.device_name}], opts: {cls.targets}\n").strip():
175 if opt := input(f"Default connect type? [{cls.tmode}], opt: [usb, tcp]\n").strip():
182 cls.hdc_head = f"{cls.hdc_exe} -t {cls.remote_ip}:{cls.remote_port}"
184 print(f"tconn {cls.remote_ip}:{cls.remote_port} failed")
191 if opt := input(f"Change default testcase?(Y/n) [{cls.changed_testcase}]\n").strip():
195 if opt := input(f"Use default testcase path?(Y/n) [{cls.testcase_path}]\n").strip():
211 subprocess.call(f"del {path}".split())
213 subprocess.call(f"del /Q {path}".split())
215 subprocess.call(f"rm -rf {path}".split())
225 return f"{GP.remote_path}/{path}"
230 with open(local, "rb") as f:
231 for byte_block in iter(lambda: f.read(4096), b""):
237 cmd = f"{GP.hdc_head} {cmd}"
238 print(f"\nexecuting command: {cmd}")
242 print(f"--> pattern [{pattern}] {'FOUND' if res else 'NOT FOUND'} in output")
246 print(f"--> output: {output}")
253 cmd = f"shell md5sum {remote}"
260 cmd = f"shell bm {dump} -a"
265 cmd = f"{GP.hdc_head} list targets"
272 remote_path = f"{GP.remote_path}/{remote}"
273 cmd = f"file send {local_path} {remote_path}"
279 remote_path = f"{GP.remote_path}/{remote}"
280 cmd = f"file recv {remote_path} {local_path}"
286 install_cmd = f"install {args} {app}"
291 uninstall_cmd = f"uninstall {args} {bundle}"
323 GP.hdc_head = f"{GP.hdc_exe} -t {GP.device_name}"
337 print(f"fetch remote ip: {GP.remote_ip}")
338 ret = check_hdc_cmd(f"tmode port {GP.remote_port}")
341 res = check_hdc_cmd(f"tconn {GP.remote_ip}:{GP.remote_port}", "Connect OK")
343 GP.hdc_head = f"{GP.hdc_exe} -t {GP.remote_ip}:{GP.remote_port}"
373 print(f"in prepare {GP.local_path},wait for 2 mins.")
441 print(f"\n\n{library_name} is not installed.\n\n")
442 print(f"try to use command below:")
443 print(f"pip install {library_name}")