Adding the chameleon_audio suite.

- new suite control file
- new scheduler item for nightly run
- adding SUITE and DEPENDENCIES to tests control files
- adding tests to ebuild file

BUG=chromium:485212
TEST=None

Change-Id: Ie13fd4e4d7f1d297704c5942769400a3f1d30473
Reviewed-on: https://chromium-review.googlesource.com/271622
Tested-by: Kalin Stoyanov <kalin@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
Commit-Queue: Kalin Stoyanov <kalin@chromium.org>
diff --git a/server/site_tests/audio_AudioAfterSuspend/control.external_mic b/server/site_tests/audio_AudioAfterSuspend/control.external_mic
index 16fdf43..3651996 100644
--- a/server/site_tests/audio_AudioAfterSuspend/control.external_mic
+++ b/server/site_tests/audio_AudioAfterSuspend/control.external_mic
@@ -14,7 +14,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board, audio_box"
 
 DOC = """
 This test remotely tests external_mic audio function against DUT after suspend.
diff --git a/server/site_tests/audio_AudioAfterSuspend/control.headphone b/server/site_tests/audio_AudioAfterSuspend/control.headphone
index e33d1ac..98060ed 100644
--- a/server/site_tests/audio_AudioAfterSuspend/control.headphone
+++ b/server/site_tests/audio_AudioAfterSuspend/control.headphone
@@ -14,7 +14,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board, audio_box"
 
 DOC = """
 This test remotely tests headphone audio function against DUT after suspend.
diff --git a/server/site_tests/audio_AudioAfterSuspend/control.internal_mic b/server/site_tests/audio_AudioAfterSuspend/control.internal_mic
index f0e94ed..30f0dbf 100644
--- a/server/site_tests/audio_AudioAfterSuspend/control.internal_mic
+++ b/server/site_tests/audio_AudioAfterSuspend/control.internal_mic
@@ -14,7 +14,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board, audio_box"
 
 DOC = """
 This test remotely tests internal_mic audio function against DUT after suspend.
diff --git a/server/site_tests/audio_AudioAfterSuspend/control.internal_speaker b/server/site_tests/audio_AudioAfterSuspend/control.internal_speaker
index a38b96b..b9fd054 100644
--- a/server/site_tests/audio_AudioAfterSuspend/control.internal_speaker
+++ b/server/site_tests/audio_AudioAfterSuspend/control.internal_speaker
@@ -14,7 +14,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board, audio_box"
 
 DOC = """
 This test remotely tests internal_speaker audio function against DUT after suspend.
diff --git a/server/site_tests/audio_AudioBasicExternalMicrophone/control b/server/site_tests/audio_AudioBasicExternalMicrophone/control
index b3dcc2e..f2d43b0 100644
--- a/server/site_tests/audio_AudioBasicExternalMicrophone/control
+++ b/server/site_tests/audio_AudioBasicExternalMicrophone/control
@@ -12,7 +12,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board"
 
 DOC = """
 This test remotely tests external microphone audio function.
diff --git a/server/site_tests/audio_AudioBasicHeadphone/control b/server/site_tests/audio_AudioBasicHeadphone/control
index 4b8a34d..a97e70a 100644
--- a/server/site_tests/audio_AudioBasicHeadphone/control
+++ b/server/site_tests/audio_AudioBasicHeadphone/control
@@ -12,7 +12,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board"
 
 DOC = """
 This test remotely tests headphone audio function.
diff --git a/server/site_tests/audio_AudioBasicInternalMicrophone/control b/server/site_tests/audio_AudioBasicInternalMicrophone/control
index cb08654..e57a8dc 100644
--- a/server/site_tests/audio_AudioBasicInternalMicrophone/control
+++ b/server/site_tests/audio_AudioBasicInternalMicrophone/control
@@ -12,7 +12,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon, audio_board, audio_box'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board, audio_box"
 
 DOC = """
 This test remotely tests internal microphone audio function.
diff --git a/server/site_tests/audio_AudioBasicInternalSpeaker/control b/server/site_tests/audio_AudioBasicInternalSpeaker/control
index 835ba7a..2e8298c 100644
--- a/server/site_tests/audio_AudioBasicInternalSpeaker/control
+++ b/server/site_tests/audio_AudioBasicInternalSpeaker/control
@@ -12,7 +12,8 @@
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "audio"
 TEST_TYPE = "server"
-DEPENDENCIES = 'chameleon, audio_board, audio_box'
+SUITE = "chameleon_audio"
+DEPENDENCIES = "chameleon, audio_board, audio_box"
 
 DOC = """
 This test remotely tests internal speaker audio function.
diff --git a/suite_scheduler.ini b/suite_scheduler.ini
index b1dadc5..a3687ee 100644
--- a/suite_scheduler.ini
+++ b/suite_scheduler.ini
@@ -41,6 +41,13 @@
 branch_specs: ==tot
 pool: suites
 
+[ChameleonAudio]
+run_on: nightly
+suite: chameleon_audio
+branch_specs: >=tot-1
+pool: chameleon
+file_bugs: True
+
 [ChameleonDp]
 run_on: nightly
 suite: chameleon_dp
diff --git a/test_suites/control.chameleon_audio b/test_suites/control.chameleon_audio
new file mode 100644
index 0000000..15f47f9
--- /dev/null
+++ b/test_suites/control.chameleon_audio
@@ -0,0 +1,60 @@
+# Copyright 2015 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 = "chromeos-chameleon"
+NAME = "chameleon_audio"
+PURPOSE = "A Chameleon test suite for audio."
+CRITERIA = "All tests with SUITE=chameleon_audio must pass."
+
+TIME = "LENGTHY"
+TEST_CATEGORY = "General"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+Audio tests which require chameleon and audio boards connected .
+The Chameleon board can emulate a monitor such that the test can control
+its behaviors in order to test the Chrome OS audio stack.
+Audio board can record and play DUT’s audio signal from 3.5mm jack,
+SPKs/MICs and BT(A2DP). Details on go/audioboard.
+Together with DUT and external peripherals they are bundled in
+audio-box environment for end-to-end testing. Details on
+go/audiobox, go/ab-care-and-feed, and go/chameleon-audio-conf
+
+@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
+
+# Values specified in this bug template will override default values when
+# filing bugs on tests that are a part of this suite. If left unspecified
+# the bug filer will fallback to it's defaults.
+_BUG_TEMPLATE = {
+    'labels': ['OS-Chrome', 'Cr-OS-Kernel-Audio', 'Chameleon'],
+    'owner': 'cychiang@chromium.org',
+    'status': None,
+    'summary': None,
+    'title': None,
+    'cc': ['tyanh@chromium.org', 'kalin@chromium.org', 'yuli@chromium.org',
+           'conradlo@chromium.org', 'chromeos-audio-bugs@google.com']
+}
+
+dynamic_suite.reimage_and_run(
+    build=build, board=board, name=NAME, job=job, pool=pool,
+    check_hosts=check_hosts, add_experimental=True, num=num,
+    file_bugs=file_bugs, priority=priority,
+    suite_dependencies=suite_dependencies, timeout_mins=timeout_mins,
+    max_runtime_mins=240, bug_template=_BUG_TEMPLATE,
+    devserver_url=devserver_url,
+    version_prefix=provision.CROS_VERSION_PREFIX,
+    wait_for_results=wait_for_results, job_retry=job_retry,
+    max_retries=max_retries)