[Lldb-commits] [PATCH] Ignore teardown failure if it's caused by removing missing file or directory

Ying Chen chying at google.com
Wed Jul 1 15:44:47 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10830

Files:
  lldb/trunk/test/lldbtest.py

Index: lldb/trunk/test/lldbtest.py
===================================================================
--- lldb/trunk/test/lldbtest.py
+++ lldb/trunk/test/lldbtest.py
@@ -723,10 +723,15 @@
             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

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10830.28910.patch
Type: text/x-patch
Size: 924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150701/f4da54d3/attachment.bin>


More information about the lldb-commits mailing list