[Lldb-commits] [lldb] r239359 - Skip TestInferiorChanged if host platform is windows.

Chaoren Lin chaorenl at google.com
Mon Jun 8 15:13:28 PDT 2015


Author: chaoren
Date: Mon Jun  8 17:13:28 2015
New Revision: 239359

URL: http://llvm.org/viewvc/llvm-project?rev=239359&view=rev
Log:
Skip TestInferiorChanged if host platform is windows.

Summary: Opened files on Windows cannot be modified, so this test doesn't make sense.

Reviewers: ovyalov, zturner, flackr, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10295

Modified:
    lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py?rev=239359&r1=239358&r2=239359&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py (original)
+++ lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py Mon Jun  8 17:13:28 2015
@@ -21,6 +21,7 @@ class ChangedInferiorTestCase(TestBase):
         self.setTearDownCleanup(dictionary=d)
         self.inferior_not_crashing()
 
+    @skipIfHostWindows
     def test_inferior_crashing_dwarf(self):
         """Test lldb reloads the inferior after it was changed during the session."""
         self.buildDwarf()

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=239359&r1=239358&r2=239359&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Mon Jun  8 17:13:28 2015
@@ -778,6 +778,10 @@ def skipIfWindows(func):
     """Decorate the item to skip tests that should be skipped on Windows."""
     return skipIfPlatform(["windows"])(func)
 
+def skipIfHostWindows(func):
+    """Decorate the item to skip tests that should be skipped on Windows."""
+    return skipIfHostPlatform(["windows"])(func)
+
 def skipUnlessDarwin(func):
     """Decorate the item to skip tests that should be skipped on any non Darwin platform."""
     return skipUnlessPlatform(getDarwinOSTriples())(func)
@@ -827,6 +831,16 @@ def skipIfHostIncompatibleWithRemote(fun
             func(*args, **kwargs)
     return wrapper
 
+def skipIfHostPlatform(oslist):
+    """Decorate the item to skip tests if running on one of the listed host platforms."""
+    return unittest2.skipIf(getHostPlatform() in oslist,
+                            "skip on %s" % (", ".join(oslist)))
+
+def skipUnlessHostPlatform(oslist):
+    """Decorate the item to skip tests unless running on one of the listed host platforms."""
+    return unittest2.skipUnless(getHostPlatform() in oslist,
+                                "requires on of %s" % (", ".join(oslist)))
+
 def skipIfPlatform(oslist):
     """Decorate the item to skip tests if running on one of the listed platforms."""
     return unittest2.skipIf(getPlatform() in oslist,





More information about the lldb-commits mailing list