summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChaoren Lin <chaorenl@google.com>2015-06-08 22:13:28 +0000
committerChaoren Lin <chaorenl@google.com>2015-06-08 22:13:28 +0000
commite6eea5d055d06db7aefdfa879ae052a2d34ab464 (patch)
tree55a3a1e86ac324e229710f166ecbe043084ea95b
parent7d2f62dacc076d0ccff8ec91734895d0a088b0cc (diff)
downloadbcm5719-llvm-e6eea5d055d06db7aefdfa879ae052a2d34ab464.tar.gz
bcm5719-llvm-e6eea5d055d06db7aefdfa879ae052a2d34ab464.zip
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 llvm-svn: 239359
-rw-r--r--lldb/test/functionalities/inferior-changed/TestInferiorChanged.py1
-rw-r--r--lldb/test/lldbtest.py14
2 files changed, 15 insertions, 0 deletions
diff --git a/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py b/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py
index 95141c45dd4..4e10a8d4f13 100644
--- a/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py
+++ b/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py
@@ -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()
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index 281031889fd..f6ff6f4b6fb 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -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(func):
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,
OpenPOWER on IntegriCloud