[toolchain-utils] Update rotating testers to use new configs.

This CL updates the rotating testers to use the new chromes_configs
for building trybots & running HW tests.

BUG=chromium:653296
TEST=Ran scripts in my directory; it worked.

Change-Id: Ia60af8b921a966c86b335ef51db5372bf740ed95
Reviewed-on: https://chrome-internal-review.googlesource.com/293775
Commit-Ready: Caroline Tice <cmtice@google.com>
Tested-by: Caroline Tice <cmtice@google.com>
Reviewed-by: Yunlian Jiang <yunlian@google.com>
diff --git a/buildbot_test_llvm.py b/buildbot_test_llvm.py
index 343a7d4..69932e5 100755
--- a/buildbot_test_llvm.py
+++ b/buildbot_test_llvm.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python2
 """Script for running llvm validation tests on ChromeOS.
 
 This script launches a buildbot to build ChromeOS with the llvm on
@@ -40,23 +40,10 @@
     'peach_pit',
     'peppy',
     'link',
-    'veyron_jaq',
-    'lumpy',
     'sentry',
     'chell',
     'nyan_big',
-]
-
-TEST = [
-    'bvt-inline',
-    'bvt-cq',
-    'toolchain-tests',
-    'security',
-    #'kernel_per-build_regression',
-    #'kernel_per-build_benchmarks',
-    'kernel_daily_regression',
-    'kernel_daily_benchmarks',
-    #'stress',
+    'daisy',
 ]
 
 
@@ -70,7 +57,7 @@
     self._ce = command_executer.GetCommandExecuter()
     self._l = logger.GetLogger()
     self._compiler = compiler
-    self._build = '%s-release' % board
+    self._build = '%s-%s-toolchain' % (board, compiler)
     self._patches = patches.split(',')
     self._patches_string = '_'.join(str(p) for p in self._patches)
 
@@ -90,27 +77,6 @@
     if ret_val != 0:
       raise RuntimeError('chmod for testing_rsa failed')
 
-  def _TestImages(self, image):
-    to_file = ''
-    for test in TEST:
-      # Do not run the kernel tests with the LLVM compiler.
-      if self._compiler == 'gcc' or not 'kernel' in test:
-        command = ('test_that --board {board} :lab: suite:{test} '
-                   '-i {image} --fast --autotest_dir '
-                   '~/trunk/src/third_party/autotest/files '
-                   '--web  cautotest.corp.google.com'.format(
-                       board=self._board, test=test, image=image))
-        ret_val = self._ce.ChrootRunCommand(self._chromeos_root, command)
-        timestamp = datetime.datetime.strftime(datetime.datetime.now(),
-                                               '%Y-%m-%d_%H:%M:%S')
-        if ret_val:
-          out = 'FAILED'
-        else:
-          out = '      '
-        to_file += out + ' ' + test + ' ' + timestamp + '\n'
-        with open(self._reports, 'w') as f:
-          f.write(to_file)
-
   def DoAll(self):
     """Main function inside ToolchainComparator class.
 
@@ -120,13 +86,9 @@
     date_str = datetime.date.today()
     description = 'master_%s_%s_%s' % (self._patches_string, self._build,
                                        date_str)
-    trybot_image = buildbot_utils.GetTrybotImage(
-        self._chromeos_root,
-        self._build,
-        self._patches,
-        description,
-        other_flags=['--hwtest'],
-        build_toolchain=True)
+    trybot_image = buildbot_utils.GetTrybotImage(self._chromeos_root,
+                                                 self._build, self._patches,
+                                                 description)
     if len(trybot_image) == 0:
       self._l.LogError('Unable to find trybot_image for %s!' % description)
       return 1
@@ -134,7 +96,6 @@
     if os.getlogin() == ROLE_ACCOUNT:
       self._FinishSetup()
 
-    self._TestImages(trybot_image)
     return 0
 
 
@@ -191,7 +152,7 @@
   parser.add_argument(
       '--compiler',
       dest='compiler',
-      help='Which compiler (llvm or gcc) to use for '
+      help='Which compiler (llvm, llvm-next or gcc) to use for '
       'testing.')
 
   options = parser.parse_args(argv[1:])
@@ -199,7 +160,7 @@
     print('Please specify the ChromeOS root directory.')
     return 1
   if not options.compiler:
-    print('Please specify which compiler to test (gcc or llvm).')
+    print('Please specify which compiler to test (gcc, llvm, or llvm-next).')
     return 1
   if options.patches:
     patches = options.patches
diff --git a/cros_utils/buildbot_utils.py b/cros_utils/buildbot_utils.py
index 2ba165e..5828efc 100644
--- a/cros_utils/buildbot_utils.py
+++ b/cros_utils/buildbot_utils.py
@@ -124,6 +124,8 @@
     # For release builds, get logs from the 'release' builder.
     if builder.endswith('-release'):
       commands += ' -b release'
+    elif builder.endswith('-toolchain'):
+      commands += ' -b etc'
     else:
       commands += ' -b %s' % builder
   _, buildinfo, _ = ce.RunCommandWOutput(commands, print_to_console=False)
@@ -136,9 +138,8 @@
   ce = command_executer.GetCommandExecuter()
   command = ('gsutil ls gs://chromeos-image-archive/trybot-%s/*b%s'
              '/chromiumos_test_image.tar.xz' % (build, build_id))
-  _, out, _ = ce.ChrootRunCommandWOutput(chromeos_root,
-                                         command,
-                                         print_to_console=False)
+  _, out, _ = ce.ChrootRunCommandWOutput(
+      chromeos_root, command, print_to_console=False)
   #
   # If build_id is not unique, there may be multiple archive images
   # to choose from; sort them & pick the first (newest).