autotest: Add skylab_staging_test suite

Separate out suite:skylab_staging_test from suite:push_to_prod. This is
the equivalent suite for Skylab. In particular, it does not (yet) run
autotest_SyncCount because that uses a feature not yet supported on
Skylab.

BUG=chromium:873220
TEST=TBD

Change-Id: I746e7f067d57c438bac39e3d4b0e3a4f758dae79
Reviewed-on: https://chromium-review.googlesource.com/1171588
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/client/site_tests/dummy_Fail/control b/client/site_tests/dummy_Fail/control
index 8f2a2b2..9fae46f 100644
--- a/client/site_tests/dummy_Fail/control
+++ b/client/site_tests/dummy_Fail/control
@@ -6,7 +6,10 @@
 NAME = "dummy_Fail"
 PURPOSE = "Demonstrate failure methods of autotests."
 CRITERIA = "This test will never succeed."
-ATTRIBUTES = "suite:another_suite, suite:dummy, suite:push_to_prod"
+ATTRIBUTES = (
+        "suite:another_suite, suite:dummy, suite:push_to_prod,"
+        " suite:skylab_staging_test"
+)
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "dummy"
diff --git a/client/site_tests/dummy_Fail/control.dependency b/client/site_tests/dummy_Fail/control.dependency
index 7681ede..7be4804 100644
--- a/client/site_tests/dummy_Fail/control.dependency
+++ b/client/site_tests/dummy_Fail/control.dependency
@@ -9,7 +9,7 @@
 suite job result.
 """
 CRITERIA = "This test will never succeed."
-ATTRIBUTES = "suite:push_to_prod"
+ATTRIBUTES = "suite:push_to_prod, suite:skylab_staging_test"
 DEPENDENCIES = "no_such_dependency"
 TIME = "SHORT"
 TEST_CATEGORY = "General"
diff --git a/client/site_tests/dummy_Fail/control.retry_alwaysfail b/client/site_tests/dummy_Fail/control.retry_alwaysfail
index f68d4d7..01ebd17 100644
--- a/client/site_tests/dummy_Fail/control.retry_alwaysfail
+++ b/client/site_tests/dummy_Fail/control.retry_alwaysfail
@@ -6,7 +6,7 @@
 NAME = "dummy_Fail.retry_alwaysfail"
 PURPOSE = "Demonstrate failure methods of autotests."
 CRITERIA = "This test will never succeed."
-ATTRIBUTES = "suite:dummyflake, suite:push_to_prod"
+ATTRIBUTES = "suite:dummyflake, suite:push_to_prod, suite:skylab_staging_test"
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "dummy"
diff --git a/client/site_tests/dummy_Fail/control.retry_alwaysflake b/client/site_tests/dummy_Fail/control.retry_alwaysflake
index de09895..3bb03a5 100644
--- a/client/site_tests/dummy_Fail/control.retry_alwaysflake
+++ b/client/site_tests/dummy_Fail/control.retry_alwaysflake
@@ -6,7 +6,7 @@
 NAME = "dummy_Fail.retry_alwaysflake"
 PURPOSE = "Demonstrate failure methods of autotests."
 CRITERIA = "This test will never succeed."
-ATTRIBUTES = "suite:dummyflake, suite:push_to_prod"
+ATTRIBUTES = "suite:dummyflake, suite:push_to_prod, suite:skylab_staging_test"
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "dummy"
diff --git a/client/site_tests/dummy_Pass/control b/client/site_tests/dummy_Pass/control
index a76dc65..4e51a96 100644
--- a/client/site_tests/dummy_Pass/control
+++ b/client/site_tests/dummy_Pass/control
@@ -6,7 +6,10 @@
 NAME = "dummy_Pass"
 PURPOSE = "Demonstrate success methods of autotests."
 CRITERIA = "This test will always succeed."
-ATTRIBUTES = "suite:dummy, suite:dummyclientretries, suite:push_to_prod, suite:something_else"
+ATTRIBUTES = (
+        "suite:dummy, suite:dummyclientretries, suite:push_to_prod,"
+        " suite:skylab_staging_test, suite:something_else"
+)
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "dummy"
diff --git a/client/site_tests/dummy_Pass/control.actionable b/client/site_tests/dummy_Pass/control.actionable
index 77e8e22..35bf803 100644
--- a/client/site_tests/dummy_Pass/control.actionable
+++ b/client/site_tests/dummy_Pass/control.actionable
@@ -6,7 +6,10 @@
 NAME = "dummy_Pass.actionable"
 PURPOSE = "Demonstrate success methods of autotests."
 CRITERIA = "This test will always succeed."
-ATTRIBUTES = "suite:dummy, suite:dummyclientretries, suite:push_to_prod, suite:something_else"
+ATTRIBUTES = (
+        "suite:dummy, suite:dummyclientretries, suite:push_to_prod,"
+        " suite:skylab_staging_test, suite:something_else"
+)
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "dummy"
diff --git a/client/site_tests/dummy_Pass/control.bluetooth b/client/site_tests/dummy_Pass/control.bluetooth
index 0bcc27e..5cf4f17 100755
--- a/client/site_tests/dummy_Pass/control.bluetooth
+++ b/client/site_tests/dummy_Pass/control.bluetooth
@@ -7,7 +7,7 @@
 PURPOSE = "Demonstrate DEPENDENCIES in autotests."
 CRITERIA = "This test will always succeed."
 DEPENDENCIES = "bluetooth"
-ATTRIBUTES = "suite:dummy, suite:push_to_prod"
+ATTRIBUTES = "suite:dummy, suite:push_to_prod, suite:skylab_staging_test"
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "dummy"
diff --git a/client/site_tests/login_LoginSuccess/control b/client/site_tests/login_LoginSuccess/control
index a71178a..6b9e036 100644
--- a/client/site_tests/login_LoginSuccess/control
+++ b/client/site_tests/login_LoginSuccess/control
@@ -4,7 +4,10 @@
 
 AUTHOR = "cmasone, achuith"
 NAME = "login_LoginSuccess"
-ATTRIBUTES = "suite:bvt-inline, suite:push_to_prod, suite:smoke"
+ATTRIBUTES = (
+        "suite:bvt-inline, suite:push_to_prod, suite:skylab_staging_test,"
+        " suite:smoke"
+)
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "login"
diff --git a/server/site_tests/dummy_PassServer/control.ssp b/server/site_tests/dummy_PassServer/control.ssp
index e316eaf..833d104 100644
--- a/server/site_tests/dummy_PassServer/control.ssp
+++ b/server/site_tests/dummy_PassServer/control.ssp
@@ -6,7 +6,7 @@
 NAME = "dummy_PassServer.ssp"
 PURPOSE = "Demonstrate success methods of autotests."
 CRITERIA = "This test will always succeed when running in a container."
-ATTRIBUTES = "suite:push_to_prod, suite:dummy_server"
+ATTRIBUTES = "suite:dummy_server, suite:push_to_prod, suite:skylab_staging_test"
 TIME = "SHORT"
 TEST_CATEGORY = "General"
 TEST_CLASS = "dummy"
@@ -20,4 +20,4 @@
     job.run_test('dummy_PassServer', host=hosts.create_host(machine),
                  force_ssp=True)
 
-parallel_simple(run, machines)
\ No newline at end of file
+parallel_simple(run, machines)
diff --git a/server/site_tests/provision_AutoUpdate/control.double b/server/site_tests/provision_AutoUpdate/control.double
index 368b022..da573be 100644
--- a/server/site_tests/provision_AutoUpdate/control.double
+++ b/server/site_tests/provision_AutoUpdate/control.double
@@ -15,7 +15,7 @@
 # is terminated early, you will see a line in status.log "Job aborted by
 # autotest_system". You can double-check the "Max runtime" for the job in the
 # Autotest web frontend.
-ATTRIBUTES = "suite:bvt-inline, suite:push_to_prod"
+ATTRIBUTES = "suite:bvt-inline, suite:push_to_prod, suite:skylab_staging_test"
 JOB_RETRIES = 2
 
 DOC = """
diff --git a/site_utils/attribute_whitelist.txt b/site_utils/attribute_whitelist.txt
index adaf440..7be29b5 100644
--- a/site_utils/attribute_whitelist.txt
+++ b/site_utils/attribute_whitelist.txt
@@ -175,6 +175,7 @@
 suite:sb65-presubmit
 suite:security
 suite:security_weekly
+suite:skylab_staging_test
 suite:smoke
 suite:something_else
 suite:ssdqual
diff --git a/test_suites/control.skylab_staging_test b/test_suites/control.skylab_staging_test
new file mode 100644
index 0000000..3334d5b
--- /dev/null
+++ b/test_suites/control.skylab_staging_test
@@ -0,0 +1,50 @@
+# Copyright 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "skylab_staging_test"
+PURPOSE = "Test Skylab (and lucifer, autotest) before push to prod."
+
+TIME = "LONG"
+TEST_CATEGORY = "General"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+This suite is designed to test various aspect of Skylab.
+It is run as part of staging tests. See also ./control.push_to_prod
+
+@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.client.common_lib.cros import dev_server
+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': ['skylab_staging_test'],
+    'owner': '',
+    'status': None,
+    'summary': None,
+    'title': None,
+    'cc': []
+}
+
+args_dict['max_runtime_mins'] = 30
+args_dict['file_bugs'] = False
+args_dict['name'] = 'skylab_staging_test'
+args_dict['job'] = job
+args_dict['add_experimental'] = True
+args_dict['bug_template'] = _BUG_TEMPLATE
+
+dynamic_suite.reimage_and_run(**args_dict)