Commit 3198d0ad authored by Tamer Tas's avatar Tamer Tas Committed by Commit Bot

Revert "[testrunner] catch unforeseen exceptions"

This reverts commit 101fd4dd.

Reason for revert: Uncaught exception in the recipe API https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux/29928

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}

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: Ia2b661c1a71d1799693383bc942a9a1d47668b24
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8731
Reviewed-on: https://chromium-review.googlesource.com/c/1449692Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59282}
parent 9c2dff0a
...@@ -10,7 +10,6 @@ import optparse ...@@ -10,7 +10,6 @@ import optparse
import os import os
import shlex import shlex
import sys import sys
import traceback
# Add testrunner to the path. # Add testrunner to the path.
...@@ -267,13 +266,9 @@ class BaseTestRunner(object): ...@@ -267,13 +266,9 @@ class BaseTestRunner(object):
self.mode_name)) self.mode_name))
return self._do_execute(tests, args, options) return self._do_execute(tests, args, options)
except TestRunnerError: except TestRunnerError:
traceback.print_exc()
return utils.EXIT_CODE_INTERNAL_ERROR return utils.EXIT_CODE_INTERNAL_ERROR
except KeyboardInterrupt: except KeyboardInterrupt:
return utils.EXIT_CODE_INTERRUPTED return utils.EXIT_CODE_INTERRUPTED
except Exception:
traceback.print_exc()
return utils.EXIT_CODE_INTERNAL_ERROR
finally: finally:
command.tear_down() command.tear_down()
......
...@@ -401,6 +401,13 @@ class SystemTest(unittest.TestCase): ...@@ -401,6 +401,13 @@ class SystemTest(unittest.TestCase):
self.assertIn('Failed to load build config', result.stdout, result) self.assertIn('Failed to load build config', result.stdout, result)
self.assertEqual(5, result.returncode, 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): def testInconsistentMode(self):
"""Test failing run when attempting to wrongly override the mode.""" """Test failing run when attempting to wrongly override the mode."""
with temp_base() as basedir: 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