diff options
author | Pavel Labath <labath@google.com> | 2016-01-05 10:44:36 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-01-05 10:44:36 +0000 |
commit | 773e86f255c92a90c54f06693273f7b6356199be (patch) | |
tree | 4f14bae2069ccfc3ac21b36be4b6609b6a514562 /lldb/packages/Python/lldbsuite/test | |
parent | 8c6992344d09afd58814f1f9871e18982a90cdfd (diff) | |
download | bcm5719-llvm-773e86f255c92a90c54f06693273f7b6356199be.tar.gz bcm5719-llvm-773e86f255c92a90c54f06693273f7b6356199be.zip |
Remove old flaky test rerun logic
Summary:
This removes the old logic for rerunning flaky tests. The new test runners will take care of
rerunning failing tests.
Reviewers: tfiala
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15855
llvm-svn: 256824
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 422b8416108..43d02c521d1 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -752,14 +752,12 @@ def expectedFailureAndroid(bugnumber=None, api_levels=None, archs=None): """ return expectedFailure(matchAndroid(api_levels, archs), bugnumber) -# if the test passes on the first try, we're done (success) -# if the test fails once, then passes on the second try, raise an ExpectedFailure -# if the test fails twice in a row, re-throw the exception from the second test run +# Flakey tests get two chances to run. If they fail the first time round, the result formatter +# makes sure it is run one more time. def expectedFlakey(expected_fn, bugnumber=None): def expectedFailure_impl(func): @wraps(func) def wrapper(*args, **kwargs): - from unittest2 import case self = args[0] if expected_fn(self): # Send event marking test as explicitly eligible for rerunning. @@ -767,25 +765,7 @@ def expectedFlakey(expected_fn, bugnumber=None): # Mark this test as rerunnable. configuration.results_formatter_object.handle_event( EventBuilder.event_for_mark_test_rerun_eligible(self)) - try: - func(*args, **kwargs) - # don't retry if the test case is already decorated with xfail or skip - except (case._ExpectedFailure, case.SkipTest, case._UnexpectedSuccess): - raise - except Exception: - if expected_fn(self): - # before retry, run tearDown for previous run and setup for next - try: - self.tearDown() - self.setUp() - func(*args, **kwargs) - except Exception: - # oh snap! two failures in a row, record a failure/error - raise - # record the expected failure - raise case._ExpectedFailure(sys.exc_info(), bugnumber) - else: - raise + func(*args, **kwargs) return wrapper # if bugnumber is not-callable(incluing None), that means decorator function is called with optional arguments # return decorator in this case, so it will be used to decorating original method |