Commit af2f203d authored by Tamer Tas's avatar Tamer Tas Committed by Commit Bot

Reland "[testrunner] catch unforeseen exceptions"

This is a reland of 101fd4dd

Original change's description:
> [testrunner] catch unforeseen exceptions
>
> Testrunner doesn't catch exceptions except TestRunnererror, KeyboardInterrupt.
>
> Unforeseen exceptions should fail the CI step.
>
> This CL returns an error exit code for uncaught exceptions.
>
> R=machenbach@chromium.org
> CC=yangguo@chromium.org,sergiyb@chromium.org
>
> Bug: v8:8731
> Change-Id: I7fb20dad4a3eea29f1dfa87ef91d45381ee08692
> Reviewed-on: https://chromium-review.googlesource.com/c/1434034
> Commit-Queue: Tamer Tas <tmrts@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59278}

Bug: v8:8731
No-Try: true
No-Tree-Checks: true
Change-Id: Ic580b334697ecebec923e76ff4a3e09fdf24dc8c
Reviewed-on: https://chromium-review.googlesource.com/c/1449632Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59283}
parent 3198d0ad
......@@ -10,6 +10,7 @@ import optparse
import os
import shlex
import sys
import traceback
# Add testrunner to the path.
......@@ -266,9 +267,13 @@ class BaseTestRunner(object):
self.mode_name))
return self._do_execute(tests, args, options)
except TestRunnerError:
traceback.print_exc()
return utils.EXIT_CODE_INTERNAL_ERROR
except KeyboardInterrupt:
return utils.EXIT_CODE_INTERRUPTED
except Exception:
traceback.print_exc()
return utils.EXIT_CODE_INTERNAL_ERROR
finally:
command.tear_down()
......
......@@ -401,13 +401,6 @@ class SystemTest(unittest.TestCase):
self.assertIn('Failed to load build config', result.stdout, result)
self.assertEqual(5, result.returncode, result)
def testGNOption(self):
"""Test using gn option, but no gn build folder is found."""
with temp_base() as basedir:
# TODO(machenbach): This should fail gracefully.
with self.assertRaises(OSError):
run_tests(basedir, '--gn')
def testInconsistentMode(self):
"""Test failing run when attempting to wrongly override the mode."""
with temp_base() as basedir:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment