mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 12:19:23 +08:00
[TestMTCSimple] Disable the test if you don't have libMTC
If you are running on macOS and have the CommandLineTools installed of Xcode, this test will fail because CommandLineTools doesn't ship with libMainThreadChecker. Skip the test if you don't have it installed.
This commit is contained in:
@@ -17,12 +17,16 @@ class MTCSimpleTestCase(TestBase):
|
||||
@skipUnlessDarwin
|
||||
def test(self):
|
||||
self.mtc_dylib_path = findMainThreadCheckerDylib()
|
||||
self.assertTrue(self.mtc_dylib_path != "")
|
||||
if self.mtc_dylib_path == "":
|
||||
self.skipTest("This test requires libMainThreadChecker.dylib")
|
||||
|
||||
self.build()
|
||||
self.mtc_tests()
|
||||
|
||||
@skipIf(archs=['i386'])
|
||||
def mtc_tests(self):
|
||||
self.assertTrue(self.mtc_dylib_path != "")
|
||||
|
||||
# Load the test
|
||||
exe = self.getBuildArtifact("a.out")
|
||||
self.expect("file " + exe, patterns=["Current executable set to .*a.out"])
|
||||
|
||||
Reference in New Issue
Block a user