Author: chying Date: Wed Jul 1 17:44:27 2015 New Revision: 241202 URL: http://llvm.org/viewvc/llvm-project?rev=241202&view=rev Log: Run teardown and setup before retry for expectedFlakey tests
Summary: If test is decorated with expectedFlakey*, run teardown and setup before retry Don't run retry if the test is already decorated with xfail or skip Test Plan: Mark TestMultithreaded.test_sb_api_listener_event_process_state as expectedFlakey Run ./dotest.py -p TestMultithreaded.py -A x86_64 -C gcc4.9.2 Reviewers: vharron, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10830 Modified: lldb/trunk/test/lldbtest.py Modified: lldb/trunk/test/lldbtest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=241202&r1=241201&r2=241202&view=diff ============================================================================== --- lldb/trunk/test/lldbtest.py (original) +++ lldb/trunk/test/lldbtest.py Wed Jul 1 17:44:27 2015 @@ -723,10 +723,15 @@ def expectedFlakey(expected_fn, bugnumbe self = args[0] 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): - # retry + # 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 _______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits