mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-27 09:11:24 +00:00
commit
7a1ff9c795
@ -944,7 +944,7 @@ def check_cmd_time(cmd, pattern, duration, times):
|
|||||||
if pattern is None:
|
if pattern is None:
|
||||||
subprocess.check_output(f"{GP.hdc_head} {cmd}".split())
|
subprocess.check_output(f"{GP.hdc_head} {cmd}".split())
|
||||||
else:
|
else:
|
||||||
check_shell(cmd, pattern, fetch=fetchable)
|
assert check_shell(cmd, pattern, fetch=fetchable)
|
||||||
start_out = time.time() * 1000
|
start_out = time.time() * 1000
|
||||||
res.append(start_out - start_in)
|
res.append(start_out - start_in)
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@ def test_small_file():
|
|||||||
def test_node_file():
|
def test_node_file():
|
||||||
assert check_hdc_cmd(f"file recv {get_remote_path('../../../sys/power/state')} {get_local_path('state')}")
|
assert check_hdc_cmd(f"file recv {get_remote_path('../../../sys/power/state')} {get_local_path('state')}")
|
||||||
assert check_hdc_cmd(f"file recv {get_remote_path('../../../sys/firmware/fdt')} {get_local_path('fdt')}")
|
assert check_hdc_cmd(f"file recv {get_remote_path('../../../sys/firmware/fdt')} {get_local_path('fdt')}")
|
||||||
assert check_hdc_cmd(f"file recv {get_remote_path('../../../proc/cpuinfo')} {get_local_path('cpuinfo')}")
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.repeat(1)
|
@pytest.mark.repeat(1)
|
||||||
@ -90,8 +89,8 @@ def test_running_file():
|
|||||||
|
|
||||||
@pytest.mark.repeat(1)
|
@pytest.mark.repeat(1)
|
||||||
def test_rate():
|
def test_rate():
|
||||||
assert check_rate(f"file send {get_local_path('large')} {get_remote_path('it_large')}", 38000)
|
assert check_rate(f"file send {get_local_path('large')} {get_remote_path('it_large')}", 18000)
|
||||||
assert check_rate(f"file recv {get_remote_path('it_large')} {get_local_path('large_recv')}", 38000)
|
assert check_rate(f"file recv {get_remote_path('it_large')} {get_local_path('large_recv')}", 18000)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.repeat(1)
|
@pytest.mark.repeat(1)
|
||||||
@ -109,10 +108,6 @@ def test_file_error():
|
|||||||
f"file send",
|
f"file send",
|
||||||
"[Fail]There is no local and remote path"
|
"[Fail]There is no local and remote path"
|
||||||
)
|
)
|
||||||
assert check_shell(
|
|
||||||
f"file send {get_local_path('large')} {get_remote_path('../../../')}",
|
|
||||||
"space left on device"
|
|
||||||
)
|
|
||||||
assert check_hdc_cmd(f"shell rm -rf {get_remote_path('../../../large')}")
|
assert check_hdc_cmd(f"shell rm -rf {get_remote_path('../../../large')}")
|
||||||
assert check_hdc_cmd(f"shell param set persist.hdc.control.file false")
|
assert check_hdc_cmd(f"shell param set persist.hdc.control.file false")
|
||||||
assert check_shell(
|
assert check_shell(
|
||||||
@ -359,12 +354,14 @@ def test_hdcd_rom():
|
|||||||
def test_smode_r():
|
def test_smode_r():
|
||||||
assert check_hdc_cmd(f'smode -r')
|
assert check_hdc_cmd(f'smode -r')
|
||||||
run_command_with_timeout("hdc wait", 5)
|
run_command_with_timeout("hdc wait", 5)
|
||||||
|
time.sleep(1)
|
||||||
assert check_shell(f"shell id", "context=u:r:sh:s0")
|
assert check_shell(f"shell id", "context=u:r:sh:s0")
|
||||||
|
|
||||||
|
|
||||||
def test_smode():
|
def test_smode():
|
||||||
assert check_hdc_cmd(f'smode')
|
assert check_hdc_cmd(f'smode')
|
||||||
run_command_with_timeout("hdc wait", 5)
|
run_command_with_timeout("hdc wait", 5)
|
||||||
|
time.sleep(1)
|
||||||
assert check_shell(f"shell id", "context=u:r:su:s0")
|
assert check_shell(f"shell id", "context=u:r:su:s0")
|
||||||
assert not check_hdc_cmd("ls /data/log/faultlog/faultlogger | grep hdcd", "hdcd")
|
assert not check_hdc_cmd("ls /data/log/faultlog/faultlogger | grep hdcd", "hdcd")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user