Skip to content

Commit 40f3d13

Browse files
committed
[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.
1 parent 39573da commit 40f3d13

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ class MTCSimpleTestCase(TestBase):
1717
@skipUnlessDarwin
1818
def test(self):
1919
self.mtc_dylib_path = findMainThreadCheckerDylib()
20-
self.assertTrue(self.mtc_dylib_path != "")
20+
if self.mtc_dylib_path == "":
21+
self.skipTest("This test requires libMainThreadChecker.dylib")
22+
2123
self.build()
2224
self.mtc_tests()
2325

2426
@skipIf(archs=['i386'])
2527
def mtc_tests(self):
28+
self.assertTrue(self.mtc_dylib_path != "")
29+
2630
# Load the test
2731
exe = self.getBuildArtifact("a.out")
2832
self.expect("file " + exe, patterns=["Current executable set to .*a.out"])

0 commit comments

Comments
 (0)