aboutsummaryrefslogtreecommitdiff
path: root/buildbot_test_llvm.py
diff options
context:
space:
mode:
authorYunlian Jiang <yunlian@google.com>2016-06-21 14:13:03 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-21 16:12:59 -0700
commit54e72b32bcadbc70b81cfa1c62ee65948b3fb78c (patch)
tree1613afd18470d2431704ec0428d9f294f42e8213 /buildbot_test_llvm.py
parent068c5fb61394771043ed39b11cb996cfd9874c83 (diff)
downloadtoolchain-utils-54e72b32bcadbc70b81cfa1c62ee65948b3fb78c.tar.gz
Continue test if the test for one board failed.
We run llvm validation test for several boards in a single script. During the test, if something goes wrong and it calls logger.LogFatal(), the whole test terminates because the LogFatal calls sys.exit() and it will terminate the whole script. This CL fixes that by catching the exception raised by sys.exit(). BUG=None TEST=the SystemExit exception is handled. Change-Id: I502361d4c55bf58c4c8106067768c17e94ce8631 Reviewed-on: https://chrome-internal-review.googlesource.com/265905 Commit-Ready: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'buildbot_test_llvm.py')
-rwxr-xr-xbuildbot_test_llvm.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/buildbot_test_llvm.py b/buildbot_test_llvm.py
index 592658de..2219e2a6 100755
--- a/buildbot_test_llvm.py
+++ b/buildbot_test_llvm.py
@@ -209,10 +209,15 @@ def Main(argv):
start_board = (days * TEST_PER_DAY) % len(TEST_BOARD)
for i in range(TEST_PER_DAY):
- board = TEST_BOARD[(start_board + i) % len(TEST_BOARD)]
- fv = ToolchainVerifier(board, options.chromeos_root,
- options.weekday, patches)
- fv.DoAll()
+ try:
+ board = TEST_BOARD[(start_board + i) % len(TEST_BOARD)]
+ fv = ToolchainVerifier(board, options.chromeos_root,
+ options.weekday, patches)
+ 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)