!1671 用例:usb断链回显

Merge pull request !1671 from liupeng298/master
This commit is contained in:
openharmony_ci 2024-11-21 07:01:46 +00:00 committed by Gitee
commit 1d82e6339c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -50,6 +50,14 @@ def test_list_targets():
assert check_hdc_cmd("shell mkdir data/local/tmp/it_send_dir")
def test_usb_disconnect():
assert check_hdc_targets()
cmd = 'shell "kill -9 `pidof hdcd`"'
check_hdc_cmd(f"{cmd}", "[Fail][E001003] USB communication abnormal, please check the USB communication link.")
time.sleep(2)
assert check_hdc_targets()
def test_list_targets_multi_usb_device():
devices_str = check_shell_any_device(f"{GP.hdc_exe} list targets", None, True)
time.sleep(3) # sleep 3s to wait for the device to connect channel