Add support for selection of verify suite in ctest/au_test.

BUG=chromium:234843
TEST=None

Change-Id: I57c26f456caa181cbe26fb1d38a1c6d525023cb7
Reviewed-on: https://gerrit.chromium.org/gerrit/62766
Tested-by: Mike Stipicevic <xusydoc@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Stipicevic <xusydoc@chromium.org>
diff --git a/au_test_harness/au_worker.py b/au_test_harness/au_worker.py
index c896e8a..727cfcb 100644
--- a/au_test_harness/au_worker.py
+++ b/au_test_harness/au_worker.py
@@ -37,7 +37,7 @@
     if options.quick_test:
       self.verify_suite = 'build_RootFilesystemSize'
     else:
-      self.verify_suite = 'suite:smoke'
+      self.verify_suite = 'suite:%s' % (options.verify_suite_name or 'smoke')
 
   def CleanUp(self):
     """Called at the end of every test."""
diff --git a/au_test_harness/cros_au_test_harness.py b/au_test_harness/cros_au_test_harness.py
index 1db940b..fc6a2f8 100755
--- a/au_test_harness/cros_au_test_harness.py
+++ b/au_test_harness/cros_au_test_harness.py
@@ -184,6 +184,8 @@
   parser.add_option('--whitelist_chrome_crashes', default=False,
                     dest='whitelist_chrome_crashes', action='store_true',
                     help='Treat Chrome crashes as non-fatal.')
+  parser.add_option('--verify_suite_name', default=None,
+                    help='Specify the verify suite to run.')
   (options, leftover_args) = parser.parse_args()
 
   CheckOptions(parser, options, leftover_args)
diff --git a/ctest/ctest.py b/ctest/ctest.py
index 64aa997..403914b 100755
--- a/ctest/ctest.py
+++ b/ctest/ctest.py
@@ -150,7 +150,7 @@
                     'cros_generate_update_payload for error handling.')
       sys.exit(1)
 
-  def RunAUTestHarness(self, full, only_verify):
+  def RunAUTestHarness(self, full, only_verify, suite):
     """Runs the auto update test harness.
 
     The auto update test harness encapsulates testing the auto-update mechanism
@@ -175,6 +175,9 @@
            '--jobs=%d' % self.jobs,
           ]
 
+    if suite:
+      cmd.append('--verify_suite_name=%s' % suite)
+
     if not full:
       if only_verify:
         cmd.append('--test_prefix=SimpleTestVerify')
@@ -223,6 +226,7 @@
                     help='For real tests, ip address of the target machine.')
   parser.add_option('--target_image', default=None,
                     help='Target image to test.')
+  parser.add_option('--suite', default=None, help='Test suite to run.')
   parser.add_option('--test_results_root', default=None,
                     help='Root directory to store test results.  Should '
                     'be defined relative to chroot root.')
@@ -258,7 +262,8 @@
   if not options.only_verify:
     ctest.GenerateUpdatePayloads(options.full_suite)
   try:
-    ctest.RunAUTestHarness(options.full_suite, options.only_verify)
+    ctest.RunAUTestHarness(options.full_suite, options.only_verify,
+                           options.suite)
   except TestException as e:
     if options.verbose:
       cros_build_lib.Die(str(e))