Replace sys.platform skips in tests with @skip decorators which check against remote platform.
Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if /
unless the target platform is in the provided platform list.
Test Plan:
ninja check-lldb shows no regressions.
When running cross platform, tests which cannot run on the target platform are
skipped.
Differential Revision: http://reviews.llvm.org/D8665
llvm-svn: 233547
diff --git a/lldb/test/functionalities/thread/state/TestThreadStates.py b/lldb/test/functionalities/thread/state/TestThreadStates.py
index b61d9fb..59db603 100644
--- a/lldb/test/functionalities/thread/state/TestThreadStates.py
+++ b/lldb/test/functionalities/thread/state/TestThreadStates.py
@@ -12,7 +12,7 @@
mydir = TestBase.compute_mydir(__file__)
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@dsym_test
@expectedFailureDarwin("rdar://15367566")
def test_state_after_breakpoint_with_dsym(self):
@@ -29,7 +29,7 @@
self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_state_after_breakpoint_test()
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@dsym_test
def test_state_after_continue_with_dsym(self):
"""Test thread state after continue."""
@@ -42,7 +42,7 @@
self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_state_after_continue_test()
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@dsym_test
def test_state_after_expression_with_dsym(self):
"""Test thread state after expression."""
@@ -55,7 +55,7 @@
self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_state_after_continue_test()
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@dsym_test
@unittest2.expectedFailure("llvm.org/pr16172") # thread states not properly maintained
def test_process_interrupt_with_dsym(self):
@@ -70,7 +70,7 @@
self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
self.process_interrupt_test()
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@dsym_test
@unittest2.expectedFailure("llvm.org/pr15824") # thread states not properly maintained
def test_process_state_with_dsym(self):