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/expression_command/call-throws/TestCallThatThrows.py b/lldb/test/expression_command/call-throws/TestCallThatThrows.py
index 65380cc..8d54e26 100644
--- a/lldb/test/expression_command/call-throws/TestCallThatThrows.py
+++ b/lldb/test/expression_command/call-throws/TestCallThatThrows.py
@@ -19,14 +19,14 @@
self.main_source_spec = lldb.SBFileSpec (self.main_source)
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@dsym_test
def test_with_dsym(self):
"""Test calling a function that throws and ObjC exception."""
self.buildDsym()
self.call_function()
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin due to ObjC test case")
+ @skipUnlessDarwin
@dwarf_test
def test_with_dwarf(self):
"""Test calling a function that throws and ObjC exception."""