Index: test/functionalities/plugins/commands/TestPluginCommands.py =================================================================== --- test/functionalities/plugins/commands/TestPluginCommands.py +++ test/functionalities/plugins/commands/TestPluginCommands.py @@ -22,6 +22,7 @@ @expectedFailureFreeBSD('llvm.org/pr17430') @skipIfi386 # This test links against liblldb.so. Thus, the test requires a 32-bit liblldb.so. @skipIfNoSBHeaders + @skipIfHostIncompatibleWithRemote def test_load_plugin(self): """Test that plugins that load commands work correctly.""" Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -727,6 +727,19 @@ """Returns true if the OS triple for the selected platform is any valid apple OS""" return getPlatform() in getDarwinOSTriples() +def skipIfHostIncompatibleWithRemote(func): + """Decorate the item to skip tests if binaries built on this host are incompatible.""" + if sys.platform.startswith('darwin'): + return skipUnlessPlatform(getDarwinOSTriples())(func) + elif sys.platform.startswith('linux'): + return skipUnlessPlatform(['linux'])(func) + elif sys.platform.startswith('freebsd'): + return skipUnlessPlatform(['freebsd'])(func) + elif sys.platform.startswith('win32'): + return skipUnlessPlatform(['windows'])(func) + # Unknown host platform, skip if remote is a recognized platform above. + return skipIfPlatform(['freebsd', 'linux', 'windows'].append(getDarwinOSTriples()))(func) + def skipIfPlatform(oslist): """Decorate the item to skip tests if running on one of the listed platforms.""" return unittest2.skipIf(getPlatform() in oslist,