Skip to content

Commit

Permalink
[TestMTCSimple] Disable the test if you don't have libMTC
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bulbazord committed Nov 5, 2019
1 parent 39573da commit 40f3d13
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit 40f3d13

Please sign in to comment.