aboutsummaryrefslogtreecommitdiff
path: root/buildbot_test_llvm.py
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-06-24 15:59:01 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-27 11:31:17 -0700
commit314ea5683c0b4c7658f6c3f659cb5c53218a613c (patch)
treebbdd127fc2cc95dd5afbefb9a981b00924729be8 /buildbot_test_llvm.py
parent83558f81695925a40d5066c24404903b29976686 (diff)
downloadtoolchain-utils-314ea5683c0b4c7658f6c3f659cb5c53218a613c.tar.gz
[toolchain-utils] Update rotating tester to allow GCC tests, too.
BUG=None TEST=Tested on chrotomation2 with role account. Change-Id: I232df188f05a13cdc59a53173b7c46f9b1b1b282 Reviewed-on: https://chrome-internal-review.googlesource.com/266966 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'buildbot_test_llvm.py')
-rwxr-xr-xbuildbot_test_llvm.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/buildbot_test_llvm.py b/buildbot_test_llvm.py
index 2219e2a6..036867b9 100755
--- a/buildbot_test_llvm.py
+++ b/buildbot_test_llvm.py
@@ -67,12 +67,14 @@ class ToolchainVerifier(object):
board,
chromeos_root,
weekday,
- patches):
+ patches,
+ compiler):
self._board = board
self._chromeos_root = chromeos_root
self._base_dir = os.getcwd()
self._ce = command_executer.GetCommandExecuter()
self._l = logger.GetLogger()
+ self._compiler = compiler
self._build = '%s-release' % board
self._patches = patches.split(',')
self._patches_string = '_'.join(str(p) for p in self._patches)
@@ -136,10 +138,9 @@ class ToolchainVerifier(object):
self._FinishSetup()
self._TestImages(trybot_image)
- self._SendEmail()
return 0
-def SendEmail(start_board):
+def SendEmail(start_board, compiler):
"""Send out the test results for all the boards."""
results = ""
for i in range(len(TEST_BOARD)):
@@ -160,7 +161,7 @@ def SendEmail(start_board):
ce = command_executer.GetCommandExecuter()
if os.path.exists(os.path.expanduser(MAIL_PROGRAM)):
- email_title = 'llvm validation test results'
+ email_title = '%s validation test results' % compiler
command = ('cat %s | %s -s "%s" -team' %
(output, MAIL_PROGRAM, email_title))
ce.RunCommand(command)
@@ -188,19 +189,26 @@ def Main(argv):
help='The patches to use for the testing, '
"seprate the patch numbers with ',' "
'for more than one patches.')
+ parser.add_argument('--compiler',
+ dest='compiler',
+ help='Which compiler (llvm or gcc) to use for '
+ 'testing.')
options = parser.parse_args(argv[1:])
if not options.chromeos_root:
print('Please specify the ChromeOS root directory.')
return 1
+ if not options.compiler:
+ print('Please specify which compiler to test (gcc or llvm).')
+ return 1
if options.patches:
patches = options.patches
- else:
+ elif options.compiler == 'llvm':
patches = USE_LLVM_PATCH
if options.board:
fv = ToolchainVerifier(options.board, options.chromeos_root,
- options.weekday, patches)
+ options.weekday, patches, options.compiler)
return fv.Doall()
today = datetime.date.today()
@@ -212,14 +220,14 @@ def Main(argv):
try:
board = TEST_BOARD[(start_board + i) % len(TEST_BOARD)]
fv = ToolchainVerifier(board, options.chromeos_root,
- options.weekday, patches)
+ options.weekday, patches, options.compiler)
fv.DoAll()
except SystemExit:
logfile = os.path.join(VALIDATION_RESULT_DIR, board)
with open(logfile, 'w') as f:
f.write("Verifier got an exception, please check the log.\n")
- SendEmail(start_board)
+ SendEmail(start_board, options.compiler)
if __name__ == '__main__':
retval = Main(sys.argv)