[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:
Alex Langford 2019-11-05 14:11:24 -08:00
parent 39573daa76
commit 40f3d1307c
1 changed files with 5 additions and 1 deletions

View File

@ -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"])