Index: test/functionalities/asan/TestMemoryHistory.py =================================================================== --- test/functionalities/asan/TestMemoryHistory.py +++ test/functionalities/asan/TestMemoryHistory.py @@ -16,18 +16,20 @@ # may not have the debugging API which was recently added, so we're calling # self.useBuiltClang() to use clang from the llvm-build directory instead - @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") - @skipIfRemote @dsym_test + @skipIfRemote + @skipUnlessCompilerRt + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_with_dsym (self): compiler = self.findBuiltClang () self.buildDsym (None, compiler) self.asan_tests () + @dwarf_test + @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07) @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default @skipIfRemote - @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07) - @dwarf_test + @skipUnlessCompilerRt def test_with_dwarf (self): compiler = self.findBuiltClang () self.buildDwarf (None, compiler) Index: test/functionalities/asan/TestReportData.py =================================================================== --- test/functionalities/asan/TestReportData.py +++ test/functionalities/asan/TestReportData.py @@ -17,18 +17,20 @@ # may not have the debugging API which was recently added, so we're calling # self.useBuiltClang() to use clang from the llvm-build directory instead - @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") - @skipIfRemote @dsym_test + @skipIfRemote + @skipUnlessCompilerRt + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_with_dsym (self): compiler = self.findBuiltClang () self.buildDsym (None, compiler) self.asan_tests () + @dwarf_test + @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07) @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default @skipIfRemote - @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07) - @dwarf_test + @skipUnlessCompilerRt def test_with_dwarf (self): compiler = self.findBuiltClang () self.buildDwarf (None, compiler) Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -772,6 +772,21 @@ func(*args, **kwargs) return wrapper +def skipUnlessCompilerRt(func): + """Decorate the item to skip tests if testing remotely.""" + if isinstance(func, type) and issubclass(func, unittest2.TestCase): + raise Exception("@skipUnless can only be used to decorate a test method") + @wraps(func) + def wrapper(*args, **kwargs): + from unittest2 import case + import os.path + compilerRtPath = os.path.join(os.path.dirname(__file__), "..", "..", "..", "projects", "compiler-rt") + if not os.path.exists(compilerRtPath): + self = args[0] + self.skipTest("skip if compiler-rt not found") + else: + func(*args, **kwargs) + return wrapper class _PlatformContext(object): """Value object class which contains platform-specific options.""" @@ -1526,6 +1541,11 @@ path = os.path.join(lldb_root_path, p) if os.path.exists(path): return path + + # Tries to find clang at the same folder as the lldb + path = os.path.join(os.path.dirname(self.lldbExec), "clang") + if os.path.exists(path): + return path return os.environ["CC"]