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/tools/lldb-server/TestGdbRemoteProcessInfo.py b/lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
index 17209e2..8c481a4 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
@@ -148,7 +148,7 @@
self.assertEquals(unexpected_key_set, set(), "the listed keys were present but unexpected in qProcessInfo result")
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@debugserver_test
@dsym_test
def test_qProcessInfo_contains_cputype_cpusubtype_debugserver_darwin(self):
@@ -156,7 +156,7 @@
self.buildDsym()
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
- @unittest2.skipUnless(sys.platform.startswith("linux"), "requires Linux")
+ @skipUnlessPlatform(["linux"])
@llgs_test
@dwarf_test
def test_qProcessInfo_contains_triple_llgs_linux(self):
@@ -164,7 +164,7 @@
self.buildDwarf()
self.qProcessInfo_contains_keys(set(['triple']))
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @skipUnlessDarwin
@debugserver_test
@dsym_test
def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self):
@@ -175,7 +175,7 @@
# for the remote Host and Process.
self.qProcessInfo_does_not_contain_keys(set(['triple']))
- @unittest2.skipUnless(sys.platform.startswith("linux"), "requires Linux")
+ @skipUnlessPlatform(["linux"])
@llgs_test
@dwarf_test
def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs_linux(self):