Adding new named suites and control files for multi-machine stress.

Adding new suite names to suite_scheduler.ini and control files for
kernel_TPMStress test for each of these suites, since thats the only way
currently to schedule the same test to run against the multiple units of
the same device type.

BUG=chromium:421177
TEST=None
DEPLOY=test_importer

Change-Id: I5320358caddf194524593dc2bb42d0cd5538013c
Reviewed-on: https://chromium-review.googlesource.com/230313
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Yusuf Mohsinally <mohsinally@chromium.org>
Commit-Queue: Yusuf Mohsinally <mohsinally@chromium.org>
diff --git a/client/site_tests/kernel_TPMStress/control.stress2 b/client/site_tests/kernel_TPMStress/control.stress2
new file mode 100644
index 0000000..6218bbd
--- /dev/null
+++ b/client/site_tests/kernel_TPMStress/control.stress2
@@ -0,0 +1,22 @@
+# Copyright (c) 2010 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.
+
+NAME = "kernel_TPMStress"
+AUTHOR = "The Chromium OS Authors"
+PURPOSE = "Stress test of communication with the TPM"
+CRITERIA = "Fails if there are communication errors with the TPM"
+SUITE = "stress2"
+TIME = "MEDIUM"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "kernel"
+TEST_TYPE = "client"
+
+DOC = """
+    Sends commands to the TPM in a tight loop for some length of time, in
+    an attempt to reproduce possible communication errors, either over LPC
+    or I2C bus depending on platform.  Uses the "tpmc" command, so tcsd
+    is stopped during execution of this test.
+"""
+
+job.run_test('kernel_TPMStress')
diff --git a/client/site_tests/kernel_TPMStress/control.stress3 b/client/site_tests/kernel_TPMStress/control.stress3
new file mode 100644
index 0000000..b4a8526
--- /dev/null
+++ b/client/site_tests/kernel_TPMStress/control.stress3
@@ -0,0 +1,22 @@
+# Copyright (c) 2010 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.
+
+NAME = "kernel_TPMStress"
+AUTHOR = "The Chromium OS Authors"
+PURPOSE = "Stress test of communication with the TPM"
+CRITERIA = "Fails if there are communication errors with the TPM"
+SUITE = "stress3"
+TIME = "MEDIUM"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "kernel"
+TEST_TYPE = "client"
+
+DOC = """
+    Sends commands to the TPM in a tight loop for some length of time, in
+    an attempt to reproduce possible communication errors, either over LPC
+    or I2C bus depending on platform.  Uses the "tpmc" command, so tcsd
+    is stopped during execution of this test.
+"""
+
+job.run_test('kernel_TPMStress')
diff --git a/client/site_tests/kernel_TPMStress/control.stress4 b/client/site_tests/kernel_TPMStress/control.stress4
new file mode 100644
index 0000000..5d18727
--- /dev/null
+++ b/client/site_tests/kernel_TPMStress/control.stress4
@@ -0,0 +1,22 @@
+# Copyright (c) 2010 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.
+
+NAME = "kernel_TPMStress"
+AUTHOR = "The Chromium OS Authors"
+PURPOSE = "Stress test of communication with the TPM"
+CRITERIA = "Fails if there are communication errors with the TPM"
+SUITE = "stress4"
+TIME = "MEDIUM"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "kernel"
+TEST_TYPE = "client"
+
+DOC = """
+    Sends commands to the TPM in a tight loop for some length of time, in
+    an attempt to reproduce possible communication errors, either over LPC
+    or I2C bus depending on platform.  Uses the "tpmc" command, so tcsd
+    is stopped during execution of this test.
+"""
+
+job.run_test('kernel_TPMStress')
diff --git a/client/site_tests/kernel_TPMStress/control.stress5 b/client/site_tests/kernel_TPMStress/control.stress5
new file mode 100644
index 0000000..6b12f0c
--- /dev/null
+++ b/client/site_tests/kernel_TPMStress/control.stress5
@@ -0,0 +1,22 @@
+# Copyright (c) 2010 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.
+
+NAME = "kernel_TPMStress"
+AUTHOR = "The Chromium OS Authors"
+PURPOSE = "Stress test of communication with the TPM"
+CRITERIA = "Fails if there are communication errors with the TPM"
+SUITE = "stress5"
+TIME = "MEDIUM"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "kernel"
+TEST_TYPE = "client"
+
+DOC = """
+    Sends commands to the TPM in a tight loop for some length of time, in
+    an attempt to reproduce possible communication errors, either over LPC
+    or I2C bus depending on platform.  Uses the "tpmc" command, so tcsd
+    is stopped during execution of this test.
+"""
+
+job.run_test('kernel_TPMStress')
diff --git a/suite_scheduler.ini b/suite_scheduler.ini
index 3415ace..bd9fd47 100644
--- a/suite_scheduler.ini
+++ b/suite_scheduler.ini
@@ -316,28 +316,28 @@
 
 [NightlyStressPool2]
 run_on: nightly
-suite: stress
+suite: stress2
 branch_specs: ==tot
 pool: stress2
 file_bugs: True
 
 [NightlyStressPool3]
 run_on: nightly
-suite: stress
+suite: stress3
 branch_specs: ==tot
 pool: stress3
 file_bugs: True
 
 [NightlyStressPool4]
 run_on: nightly
-suite: stress
+suite: stress4
 branch_specs: ==tot
 pool: stress4
 file_bugs: True
 
 [NightlyStressPool5]
 run_on: nightly
-suite: stress
+suite: stress5
 branch_specs: ==tot
 pool: stress5
 file_bugs: True
diff --git a/test_suites/control.stress2 b/test_suites/control.stress2
new file mode 100644
index 0000000..6fd2fbd
--- /dev/null
+++ b/test_suites/control.stress2
@@ -0,0 +1,48 @@
+# 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 = "stress2"
+PURPOSE = "Stress test functionality and devices."
+CRITERIA = "All tests with SUITE=stress2 must pass."
+
+TIME = "LONG"
+TEST_CATEGORY = "Stress"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+This is the stress2 test suite.
+
+All tests should pass for devices to be considered shippable. This suite is
+meant to cover the full gamut of stress long running stress tests. Other stress
+related suites will focus on more specific aspects, which can be run as
+diagnosis tools.
+
+@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', 'StressRack-Bug'],
+    'owner': 'mohsinally@chromium.org',
+}
+
+
+dynamic_suite.reimage_and_run(
+    build=build, board=board, name='stress2', 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)
diff --git a/test_suites/control.stress3 b/test_suites/control.stress3
new file mode 100644
index 0000000..7cecb1e
--- /dev/null
+++ b/test_suites/control.stress3
@@ -0,0 +1,48 @@
+# 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 = "stress3"
+PURPOSE = "Stress test functionality and devices."
+CRITERIA = "All tests with SUITE=stress3 must pass."
+
+TIME = "LONG"
+TEST_CATEGORY = "Stress"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+This is the stress3 test suite.
+
+All tests should pass for devices to be considered shippable. This suite is
+meant to cover the full gamut of stress long running stress tests. Other stress
+related suites will focus on more specific aspects, which can be run as
+diagnosis tools.
+
+@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', 'StressRack-Bug'],
+    'owner': 'mohsinally@chromium.org',
+}
+
+
+dynamic_suite.reimage_and_run(
+    build=build, board=board, name='stress3', 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)
diff --git a/test_suites/control.stress4 b/test_suites/control.stress4
new file mode 100644
index 0000000..d4fe482
--- /dev/null
+++ b/test_suites/control.stress4
@@ -0,0 +1,48 @@
+# 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 = "stress4"
+PURPOSE = "Stress test functionality and devices."
+CRITERIA = "All tests with SUITE=stress4 must pass."
+
+TIME = "LONG"
+TEST_CATEGORY = "Stress"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+This is the stress4 test suite.
+
+All tests should pass for devices to be considered shippable. This suite is
+meant to cover the full gamut of stress long running stress tests. Other stress
+related suites will focus on more specific aspects, which can be run as
+diagnosis tools.
+
+@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', 'StressRack-Bug'],
+    'owner': 'mohsinally@chromium.org',
+}
+
+
+dynamic_suite.reimage_and_run(
+    build=build, board=board, name='stress4', 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)
diff --git a/test_suites/control.stress5 b/test_suites/control.stress5
new file mode 100644
index 0000000..021cb3c
--- /dev/null
+++ b/test_suites/control.stress5
@@ -0,0 +1,48 @@
+# 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 = "stress5"
+PURPOSE = "Stress test functionality and devices."
+CRITERIA = "All tests with SUITE=stress5 must pass."
+
+TIME = "LONG"
+TEST_CATEGORY = "Stress"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+This is the stress5 test suite.
+
+All tests should pass for devices to be considered shippable. This suite is
+meant to cover the full gamut of stress long running stress tests. Other stress
+related suites will focus on more specific aspects, which can be run as
+diagnosis tools.
+
+@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', 'StressRack-Bug'],
+    'owner': 'mohsinally@chromium.org',
+}
+
+
+dynamic_suite.reimage_and_run(
+    build=build, board=board, name='stress5', 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)