Organize HW Test variables to use a single object rather many independent vars.

BUG=chromium:223783
TEST=All unittests, cbuildbot --dump, trybots on the way.

Change-Id: I0671b861f8be162850b481ab26076c16e347e093
Reviewed-on: https://gerrit.chromium.org/gerrit/46740
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index c6f764b..396d9bc 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -378,15 +378,16 @@
 
     # We can not run hw tests without archiving the payloads.
     if self.options.archive:
-      for suite in config['hw_tests']:
-        if suite == constants.HWTEST_AU_SUITE:
-          stage_list.append([stages.AUTestStage, board, archive_stage, suite])
+      for suite_config in config['hw_tests']:
+        if suite_config.async:
+          stage_list.append([stages.ASyncHWTestStage, board, archive_stage,
+                             suite_config])
+        elif suite_config.suite == constants.HWTEST_AU_SUITE:
+          stage_list.append([stages.AUTestStage, board, archive_stage,
+                             suite_config])
         else:
-          stage_list.append([stages.HWTestStage, board, archive_stage, suite])
-
-      for suite in config['async_hw_tests']:
-        stage_list.append([stages.ASyncHWTestStage, board, archive_stage,
-                           suite])
+          stage_list.append([stages.HWTestStage, board, archive_stage,
+                             suite_config])
 
     stage_objs = [self._GetStageInstance(*x, config=config) for x in stage_list]
     self._RunParallelStages(stage_objs + [archive_stage])