Adding refactored control files for platform_ExternalUsbPeriphals
autotests
- Removed 5 redundant files
- Leaving 3 files for long, short, and short with crash tracking sequence.
BUG:chromium:901037
TEST=None
Change-Id: I7cb1f2e0100e4f8d0dbf86875197d9fb8365f2d9
Reviewed-on: https://chromium-review.googlesource.com/1351355
Commit-Ready: Matt Nelson <matthewjoseph@chromium.org>
Tested-by: Matt Nelson <matthewjoseph@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_openlid b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.crash_check_short
similarity index 85%
copy from server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_openlid
copy to server/site_tests/platform_ExternalUsbPeripherals/control.detect.crash_check_short
index 576b4b7..1393864 100644
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_openlid
+++ b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.crash_check_short
@@ -1,11 +1,11 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.server import utils
AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_closelid_openlid"
+NAME = "platform_ExternalUsbPeripherals.detect.crash_check_short"
PURPOSE = "Servo based USB boot stress test"
CRITERIA = "This test will fail if any of the actions or checks fail."
TIME = "SHORT"
@@ -13,12 +13,11 @@
TEST_CLASS = "platform"
TEST_TYPE = "server"
ATTRIBUTES = "suite:usb_detect"
-DEPENDENCIES = "servo, usb_detect, use_lid"
-JOB_RETRIES = 2
+DEPENDENCIES = "servo, usb_detect"
DOC = """
This test uses servo to connect/disconnect servo USB hub before and
-after events like reboot, login, closelid, openlid etc.
+after events like reboot, login, suspend, resume etc.
The test fails if
- device is pingable when suspended
@@ -32,10 +31,7 @@
- USB headset
- USB HD Webcam - should be Logitech HD Pro Webcam C920
- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
+- etc
"""
args_dict = utils.args_to_dict(args)
@@ -46,7 +42,8 @@
repeat = int(args_dict.get("repeat", 1))
- default_actions = str("login,closelid,openlid")
+ default_actions = str("plug,unplug,login,plug,unplug,"
+ "suspend,plug,resume,suspend,unplug,resume")
action_sequence = str(args_dict.get("action_sequence", default_actions))
@@ -75,6 +72,6 @@
job.run_test("platform_ExternalUsbPeripherals", host=host,
disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks, tag="detect.login_closelid_openlid")
+ usb_list=usb_list, usb_checks=usb_checks, tag="detect.crash_check_short")
parallel_simple(run, machines)
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_openlid b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.lid_close_open_short
similarity index 88%
rename from server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_openlid
rename to server/site_tests/platform_ExternalUsbPeripherals/control.detect.lid_close_open_short
index 576b4b7..1a78968 100644
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_openlid
+++ b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.lid_close_open_short
@@ -1,11 +1,11 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.server import utils
AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_closelid_openlid"
+NAME = "platform_ExternalUsbPeripherals.detect.lid_close_open_short"
PURPOSE = "Servo based USB boot stress test"
CRITERIA = "This test will fail if any of the actions or checks fail."
TIME = "SHORT"
@@ -14,8 +14,7 @@
TEST_TYPE = "server"
ATTRIBUTES = "suite:usb_detect"
DEPENDENCIES = "servo, usb_detect, use_lid"
-JOB_RETRIES = 2
-
+JOB_RETRIES = 1
DOC = """
This test uses servo to connect/disconnect servo USB hub before and
after events like reboot, login, closelid, openlid etc.
@@ -32,10 +31,7 @@
- USB headset
- USB HD Webcam - should be Logitech HD Pro Webcam C920
- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
+- etc.
"""
args_dict = utils.args_to_dict(args)
@@ -46,7 +42,9 @@
repeat = int(args_dict.get("repeat", 1))
- default_actions = str("login,closelid,openlid")
+ default_actions = str("plug,unplug,login,plug,"
+ "closelid,unplug,openlid,"
+ "closelid,plug,openlid,unplug")
action_sequence = str(args_dict.get("action_sequence", default_actions))
@@ -75,6 +73,6 @@
job.run_test("platform_ExternalUsbPeripherals", host=host,
disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks, tag="detect.login_closelid_openlid")
+ usb_list=usb_list, usb_checks=usb_checks, tag="detect.lid_close_open_short")
parallel_simple(run, machines)
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_unplug_openlid_plug b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_unplug_openlid_plug
deleted file mode 100644
index 7e6efc9..0000000
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_closelid_unplug_openlid_plug
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from autotest_lib.server import utils
-
-AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_closelid_unplug_openlid_plug"
-PURPOSE = "Servo based USB boot stress test"
-CRITERIA = "This test will fail if any of the actions or checks fail."
-TIME = "SHORT"
-TEST_CATEGORY = "Functional"
-TEST_CLASS = "platform"
-TEST_TYPE = "server"
-ATTRIBUTES = "suite:usb_detect"
-DEPENDENCIES = "servo, usb_detect, use_lid"
-JOB_RETRIES = 2
-
-DOC = """
-This test uses servo to connect/disconnect servo USB hub before and
-after events like reboot, login, closelid, openlid etc.
-
-The test fails if
-- device is pingable when suspended
-- wrong action passed through action_sequence flag
-- USB detected peripherals are different than expected
-- there is no servo board attached
-- USB peripherals checks(usb_checks below) on command line fail
-Other detection checks can be added for each peripheral
-
-Set of four USB peripherals plugged
-- USB headset
-- USB HD Webcam - should be Logitech HD Pro Webcam C920
-- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
-"""
-
-args_dict = utils.args_to_dict(args)
-servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
-
-def run(machine):
- host = hosts.create_host(machine, servo_args=servo_args)
-
- repeat = int(args_dict.get("repeat", 1))
-
- default_actions = str("login,closelid,unplug,openlid,plug")
-
- action_sequence = str(args_dict.get("action_sequence", default_actions))
-
- usb_list = ["\"Kingston Technology Company Inc.\"",
- "\"Alcor Micro Corp.\"",
- "\"USB PnP Sound Device: USB Audio|C-Media Electronics, Inc.* Audio\"",
- ]
- usb_checks = {
- # USB Audio Output devices
- str("cras_test_client --dump_server_info | "
- "awk \"/Output Devices:/,/Output Nodes:/\" | grep -E ") :
- ["\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\"" ],
- # USB Audio Input devices
- str("loggedin:cras_test_client --dump_server_info | "
- "awk \"/Input Devices:/,/Input Nodes:/\" | grep -E ") :
- ["\"TeckNet: USB Audio|USB 2.0 PC Camera\"",
- "\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\""],
- # USB stick four partitions volumes
- "loggedin:ls -l /media/removable/ | grep -i " :
- ["ExFAT", "Ext4", "FAT", "NTFS"],
- # USB Web camera
- "cat /sys/class/video4linux/video*/name | grep -E " :
- ["\"TeckNet|USB 2.0 PC Camera\""],
- }
-
- job.run_test("platform_ExternalUsbPeripherals", host=host,
- disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
- action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks, tag="login_closelid_unplug_openlid_plug")
-
-parallel_simple(run, machines)
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_suspend_unplug_resume_plug b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_suspend_unplug_resume_plug
deleted file mode 100644
index 126a875..0000000
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_suspend_unplug_resume_plug
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from autotest_lib.server import utils
-
-AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_suspend_unplug_resume_plug"
-PURPOSE = "Servo based USB peripherals detection test"
-CRITERIA = "This test will fail if any of the actions or checks fail."
-TIME = "SHORT"
-TEST_CATEGORY = "Functional"
-TEST_CLASS = "platform"
-TEST_TYPE = "server"
-ATTRIBUTES = "suite:usb_detect"
-DEPENDENCIES = "servo, usb_detect"
-
-DOC = """
-This test uses servo to connect/disconnect servo USB hub before and
-after events like reboot, login, suspend, resume etc.
-
-The test fails if
-- device is pingable when suspended
-- wrong action passed through action_sequence flag
-- USB detected peripherals are different than expected
-- there is no servo board attached
-- USB peripherals checks(usb_checks below) on command line fail
-Other detection checks can be added for each peripheral
-
-Set of four USB peripherals plugged
-- USB headset
-- USB HD Webcam - should be Logitech HD Pro Webcam C920
-- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
-"""
-
-args_dict = utils.args_to_dict(args)
-servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
-
-def run(machine):
- host = hosts.create_host(machine, servo_args=servo_args)
-
- repeat = int(args_dict.get("repeat", 1))
-
- default_actions = str("login,suspend,unplug,resume,plug")
-
- action_sequence = str(args_dict.get("action_sequence", default_actions))
-
- usb_list = ["\"Kingston Technology Company Inc.\"",
- "\"Alcor Micro Corp.\"",
- "\"USB PnP Sound Device: USB Audio|C-Media Electronics, Inc.* Audio\"",
- ]
- usb_checks = {
- # USB Audio Output devices
- str("cras_test_client --dump_server_info | "
- "awk \"/Output Devices:/,/Output Nodes:/\" | grep -E ") :
- ["\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\"" ],
- # USB Audio Input devices
- str("loggedin:cras_test_client --dump_server_info | "
- "awk \"/Input Devices:/,/Input Nodes:/\" | grep -E ") :
- ["\"TeckNet: USB Audio|USB 2.0 PC Camera\"",
- "\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\""],
- # USB stick four partitions volumes
- "loggedin:ls -l /media/removable/ | grep -i " :
- ["ExFAT", "Ext4", "FAT", "NTFS"],
- # Skipping Camera checks
- # USB Web camera
- "cat /sys/class/video4linux/video*/name | grep -E " :
- ["\"TeckNet|USB 2.0 PC Camera\""],
- #"eval /usr/local/autotest/tests/camera_V4L2/media_v4l2_test --device=/dev/video$"
- #"(ls /dev/video* | tail -n1 | cut -b11) | grep -E " :
- # ["\"TestResolutions pass\""],
- }
-
- job.run_test("platform_ExternalUsbPeripherals", host=host,
- disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
- action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks,
- tag="detect.login_suspend_unplug_resume_plug")
-
-parallel_simple(run, machines)
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_closelid_plug_openlid b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_closelid_plug_openlid
deleted file mode 100644
index 543638a..0000000
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_closelid_plug_openlid
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from autotest_lib.server import utils
-
-AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_unplug_closelid_plug_openlid"
-PURPOSE = "Servo based USB boot stress test"
-CRITERIA = "This test will fail if any of the actions or checks fail."
-TIME = "SHORT"
-TEST_CATEGORY = "Functional"
-TEST_CLASS = "platform"
-TEST_TYPE = "server"
-ATTRIBUTES = "suite:usb_detect"
-DEPENDENCIES = "servo, usb_detect, use_lid"
-JOB_RETRIES = 2
-
-DOC = """
-This test uses servo to connect/disconnect servo USB hub before and
-after events like reboot, login, closelid, openlid etc.
-
-The test fails if
-- device is pingable when suspended
-- wrong action passed through action_sequence flag
-- USB detected peripherals are different than expected
-- there is no servo board attached
-- USB peripherals checks(usb_checks below) on command line fail
-Other detection checks can be added for each peripheral
-
-Set of four USB peripherals plugged
-- USB headset
-- USB HD Webcam - should be Logitech HD Pro Webcam C920
-- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
-"""
-
-args_dict = utils.args_to_dict(args)
-servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
-
-def run(machine):
- host = hosts.create_host(machine, servo_args=servo_args)
-
- repeat = int(args_dict.get("repeat", 1))
-
- default_actions = str("login,unplug,closelid,plug,openlid")
-
- action_sequence = str(args_dict.get("action_sequence", default_actions))
-
- usb_list = ["\"Kingston Technology Company Inc.\"",
- "\"Alcor Micro Corp.\"",
- "\"USB PnP Sound Device: USB Audio|C-Media Electronics, Inc.* Audio\"",
- ]
- usb_checks = {
- # USB Audio Output devices
- str("cras_test_client --dump_server_info | "
- "awk \"/Output Devices:/,/Output Nodes:/\" | grep -E ") :
- ["\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\"" ],
- # USB Audio Input devices
- str("loggedin:cras_test_client --dump_server_info | "
- "awk \"/Input Devices:/,/Input Nodes:/\" | grep -E ") :
- ["\"TeckNet: USB Audio|USB 2.0 PC Camera\"",
- "\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\""],
- # USB stick four partitions volumes
- "loggedin:ls -l /media/removable/ | grep -i " :
- ["ExFAT", "Ext4", "FAT", "NTFS"],
- # USB Web camera
- "cat /sys/class/video4linux/video*/name | grep -E " :
- ["\"TeckNet|USB 2.0 PC Camera\""],
- }
-
- job.run_test("platform_ExternalUsbPeripherals", host=host,
- disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
- action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks, tag="login_unplug_closelid_plug_openlid")
-
-parallel_simple(run, machines)
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_suspend_plug_resume b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_suspend_plug_resume
deleted file mode 100644
index 3fbe202..0000000
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_suspend_plug_resume
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from autotest_lib.server import utils
-
-AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_unplug_suspend_plug_resume"
-PURPOSE = "Servo based USB peripherals detection test"
-CRITERIA = "This test will fail if any of the actions or checks fail."
-TIME = "SHORT"
-TEST_CATEGORY = "Functional"
-TEST_CLASS = "platform"
-TEST_TYPE = "server"
-ATTRIBUTES = "suite:usb_detect"
-DEPENDENCIES = "servo, usb_detect"
-
-DOC = """
-This test uses servo to connect/disconnect servo USB hub before and
-after events like reboot, login, suspend, resume etc.
-
-The test fails if
-- device is pingable when suspended
-- wrong action passed through action_sequence flag
-- USB detected peripherals are different than expected
-- there is no servo board attached
-- USB peripherals checks(usb_checks below) on command line fail
-Other detection checks can be added for each peripheral
-
-Set of four USB peripherals plugged
-- USB headset
-- USB HD Webcam - should be Logitech HD Pro Webcam C920
-- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
-"""
-
-args_dict = utils.args_to_dict(args)
-servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
-
-def run(machine):
- host = hosts.create_host(machine, servo_args=servo_args)
-
- repeat = int(args_dict.get("repeat", 1))
-
- default_actions = str("login,unplug,suspend,plug,resume")
-
- action_sequence = str(args_dict.get("action_sequence", default_actions))
-
- usb_list = ["\"Kingston Technology Company Inc.\"",
- "\"Alcor Micro Corp.\"",
- "\"USB PnP Sound Device: USB Audio|C-Media Electronics, Inc.* Audio\"",
- ]
- usb_checks = {
- # USB Audio Output devices
- str("cras_test_client --dump_server_info | "
- "awk \"/Output Devices:/,/Output Nodes:/\" | grep -E ") :
- ["\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\"" ],
- # USB Audio Input devices
- str("loggedin:cras_test_client --dump_server_info | "
- "awk \"/Input Devices:/,/Input Nodes:/\" | grep -E ") :
- ["\"TeckNet: USB Audio|USB 2.0 PC Camera\"",
- "\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\""],
- # USB stick four partitions volumes
- "loggedin:ls -l /media/removable/ | grep -i " :
- ["ExFAT", "Ext4", "FAT", "NTFS"],
- # Skipping camera checks
- # USB Web camera
- "cat /sys/class/video4linux/video*/name | grep -E " :
- ["\"TeckNet|USB 2.0 PC Camera\""],
- #"eval /usr/local/autotest/tests/camera_V4L2/media_v4l2_test --device=/dev/video$"
- #"(ls /dev/video* | tail -n1 | cut -b11) | grep -E " :
- # ["\"TestResolutions pass\""],
- }
-
- job.run_test("platform_ExternalUsbPeripherals", host=host,
- disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
- action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks,
- tag="detect.login_unplug_suspend_plug_resume")
-
-parallel_simple(run, machines)
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_suspend_resume_plug b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_suspend_resume_plug
deleted file mode 100644
index 2bef27b..0000000
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_unplug_suspend_resume_plug
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from autotest_lib.server import utils
-
-AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_unplug_suspend_resume_plug"
-PURPOSE = "Servo based USB peripherals detection test"
-CRITERIA = "This test will fail if any of the actions or checks fail."
-TIME = "SHORT"
-TEST_CATEGORY = "Functional"
-TEST_CLASS = "platform"
-TEST_TYPE = "server"
-ATTRIBUTES = "suite:usb_detect"
-DEPENDENCIES = "servo, usb_detect"
-
-DOC = """
-This test uses servo to connect/disconnect servo USB hub before and
-after events like reboot, login, suspend, resume etc.
-
-The test fails if
-- device is pingable when suspended
-- wrong action passed through action_sequence flag
-- USB detected peripherals are different than expected
-- there is no servo board attached
-- USB peripherals checks(usb_checks below) on command line fail
-Other detection checks can be added for each peripheral
-
-Set of four USB peripherals plugged
-- USB headset
-- USB HD Webcam - should be Logitech HD Pro Webcam C920
-- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
-"""
-
-args_dict = utils.args_to_dict(args)
-servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
-
-def run(machine):
- host = hosts.create_host(machine, servo_args=servo_args)
-
- repeat = int(args_dict.get("repeat", 1))
-
- default_actions = str("login,unplug,suspend,resume,plug")
-
- action_sequence = str(args_dict.get("action_sequence", default_actions))
-
- usb_list = ["\"Kingston Technology Company Inc.\"",
- "\"Alcor Micro Corp.\"",
- "\"USB PnP Sound Device: USB Audio|C-Media Electronics, Inc.* Audio\"",
- ]
- usb_checks = {
- # USB Audio Output devices
- str("cras_test_client --dump_server_info | "
- "awk \"/Output Devices:/,/Output Nodes:/\" | grep -E ") :
- ["\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\"" ],
- # USB Audio Input devices
- str("loggedin:cras_test_client --dump_server_info | "
- "awk \"/Input Devices:/,/Input Nodes:/\" | grep -E ") :
- ["\"TeckNet: USB Audio|USB 2.0 PC Camera\"",
- "\"USB PnP Sound Device: USB Audio|C-Media USB Headphone Set: USB Audio\""],
- # USB stick four partitions volumes
- "loggedin:ls -l /media/removable/ | grep -i " :
- ["ExFAT", "Ext4", "FAT", "NTFS"],
- # USB Web camera
- "cat /sys/class/video4linux/video*/name | grep -E " :
- ["\"TeckNet|USB 2.0 PC Camera\""],
- }
-
- job.run_test("platform_ExternalUsbPeripherals", host=host,
- disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
- action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks,
- tag="detect.login_unplug_suspend_resume_plug")
-
-parallel_simple(run, machines)
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_suspend_resume b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.long_cycle
similarity index 80%
rename from server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_suspend_resume
rename to server/site_tests/platform_ExternalUsbPeripherals/control.detect.long_cycle
index 8bc0e2c..adef8d3 100644
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.detect.login_suspend_resume
+++ b/server/site_tests/platform_ExternalUsbPeripherals/control.detect.long_cycle
@@ -1,14 +1,14 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.server import utils
AUTHOR = "Chrome OS Team"
-NAME = "platform_ExternalUsbPeripherals.detect.login_suspend_resume"
-PURPOSE = "Servo based USB peripherals detection test"
+NAME = "platform_ExternalUsbPeripherals.detect.long_cycle"
+PURPOSE = "Servo based USB peripheral detection test"
CRITERIA = "This test will fail if any of the actions or checks fail."
-TIME = "SHORT"
+TIME = "MEDIUM"
TEST_CATEGORY = "Functional"
TEST_CLASS = "platform"
TEST_TYPE = "server"
@@ -31,10 +31,7 @@
- USB headset
- USB HD Webcam - should be Logitech HD Pro Webcam C920
- USB stick with four partitions named ExFAT Ext4 FAT NTFS
-- USB mouse
-- USB 3G modem
-- USB SD card reader(one microSD card plugged)
-- USB connected phone(optional)
+- etc.
"""
args_dict = utils.args_to_dict(args)
@@ -45,7 +42,13 @@
repeat = int(args_dict.get("repeat", 1))
- default_actions = str("login,suspend,resume")
+ default_actions = str("reboot,plug,unplug,"
+ "login,plug,unplug,"
+ "reboot,plug,login,unplug,plug,"
+ "reboot, unplug,login,plug"
+ "suspend,resume,"
+ "unplug,suspend,plug,resume,"
+ "suspend,unplug,resume,plug")
action_sequence = str(args_dict.get("action_sequence", default_actions))
@@ -66,18 +69,14 @@
# USB stick four partitions volumes
"loggedin:ls -l /media/removable/ | grep -i " :
["ExFAT", "Ext4", "FAT", "NTFS"],
- # Skipping camera checks
# USB Web camera
"cat /sys/class/video4linux/video*/name | grep -E " :
["\"TeckNet|USB 2.0 PC Camera\""],
- #"eval /usr/local/autotest/tests/camera_V4L2/media_v4l2_test --device=/dev/video$"
- #"(ls /dev/video* | tail -n1 | cut -b11) | grep -E " :
- # ["\"TestResolutions pass\""],
}
job.run_test("platform_ExternalUsbPeripherals", host=host,
disable_sysinfo=True, client_autotest="desktopui_SimpleLogin",
action_sequence=action_sequence, repeat=repeat,
- usb_list=usb_list, usb_checks=usb_checks, tag="detect.login_suspend_resume")
+ usb_list=usb_list, usb_checks=usb_checks, tag="detect.long_cycle")
parallel_simple(run, machines)