Add kernel_usb_set1 test suite

It will run against four boards in chromeos1 lab, replacing manual
test runs for ToT builds.

BUG=None
TEST=None

Change-Id: I8a9fd530c97f79b8a124dcfa0658f065b73c6c06
Reviewed-on: https://chromium-review.googlesource.com/234570
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
Commit-Queue: Kalin Stoyanov <kalin@chromium.org>
Tested-by: Kalin Stoyanov <kalin@chromium.org>
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/control.set1 b/server/site_tests/platform_ExternalUsbPeripherals/control.set1
index 3934ad8..621ee98 100644
--- a/server/site_tests/platform_ExternalUsbPeripherals/control.set1
+++ b/server/site_tests/platform_ExternalUsbPeripherals/control.set1
@@ -12,7 +12,7 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "platform"
 TEST_TYPE = "server"
-SUITE = ""
+SUITE = "kernel_usb_set1"
 DEPENDENCIES = "servo"
 
 DOC = """
@@ -54,10 +54,6 @@
                 "Kingston Technology Company Inc.",
                ]
     usb_checks = {
-        # Audio thread - active USB audio
-        str("loggedin:cras_test_client --dump_audio_thread | "
-            "awk '/devices/,/stream_dump/'") :
-            ["output dev.*USB Audio", "input dev.*USB Audio"],
         # USB Audio Output devices
         str("cras_test_client --dump_server_info | "
             "awk '/Output Devices:/,/Output Nodes:/'") :
diff --git a/server/site_tests/platform_ExternalUsbPeripherals/platform_ExternalUsbPeripherals.py b/server/site_tests/platform_ExternalUsbPeripherals/platform_ExternalUsbPeripherals.py
index 484a16b..9e476ad 100644
--- a/server/site_tests/platform_ExternalUsbPeripherals/platform_ExternalUsbPeripherals.py
+++ b/server/site_tests/platform_ExternalUsbPeripherals/platform_ExternalUsbPeripherals.py
@@ -359,7 +359,7 @@
             for action in actions:
                 step += 1
                 action = action.strip()
-                self.action_step = '--- %d.%d. %s---' % (iteration, step, action)
+                self.action_step = 'STEP %d.%d. %s' % (iteration, step, action)
                 logging.info(self.action_step)
 
                 if action == 'RESUME':
diff --git a/suite_scheduler.ini b/suite_scheduler.ini
index 64e0bff..e1b784c 100644
--- a/suite_scheduler.ini
+++ b/suite_scheduler.ini
@@ -349,6 +349,13 @@
 pool: kernel_usb
 file_bugs: True
 
+[NightlyKernelUsbSet1]
+run_on: nightly
+suite: kernel_usb_set1
+branch_specs: ==tot
+pool: kernel_usb_set1
+file_bugs: True
+
 [Gizmo]
 run_on: nightly
 suite: bvt-cq
diff --git a/test_suites/control.kernel_usb_set1 b/test_suites/control.kernel_usb_set1
new file mode 100644
index 0000000..dd4a837
--- /dev/null
+++ b/test_suites/control.kernel_usb_set1
@@ -0,0 +1,52 @@
+# Copyright (c) 2014 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "kernel_usb_set1"
+PURPOSE = "USB peripherals detection."
+CRITERIA = "All tests with SUITE=kernel_usb_set should pass."
+
+TIME = "LONG"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+This is the kernel_usb test suite.
+
+This suite is meant to cover boards on different platform/architecture
+family. E2E USB detection tests will be exercizing in stress scenarios.
+Consistent failure to detect peripherals will indicate kernel
+regression.
+Consistent failure to restart, suspend or resume the device will indicate power
+regression.
+Consistent crash failure will indicate regression on processes or kernel.
+
+
+@param build: The name of the image to test.
+              Ex: x86-mario-release/R17-1412.33.0-a1-b29
+@param board: The board to test on.  Ex: x86-mario
+@param pool: The pool of machines to utilize for scheduling. If pool=None
+             board is used.
+@param check_hosts: require appropriate live hosts to exist in the lab.
+@param SKIP_IMAGE: (optional) If present and True, don't re-image devices.
+"""
+
+import common
+from autotest_lib.server.cros import provision
+from autotest_lib.server.cros.dynamic_suite import dynamic_suite
+
+_BUG_TEMPLATE = {
+    'labels': ['OS-Chrome', 'Cr-OS-Kernel', 'KernelUsbSet1-Bug'],
+    'owner': 'kalin@chromium.org',
+}
+
+
+dynamic_suite.reimage_and_run(
+    build=build, board=board, name='kernel_usb_set1', job=job, pool=pool,
+    check_hosts=check_hosts, add_experimental=True, num=num,
+    file_bugs=file_bugs, priority=priority, timeout_mins=timeout_mins,
+    devserver_url=devserver_url, version_prefix=provision.CROS_VERSION_PREFIX,
+    wait_for_results=wait_for_results, job_retry=job_retry,
+    bug_template=_BUG_TEMPLATE)