This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add a testcase for MainThreadCheckerRuntime plugin
ClosedPublic

Authored by kubamracek on Jun 28 2017, 1:33 PM.

Details

Summary

This adds a simple testcase for MainThreadCheckerRuntime. The tool (Main Thread Checker) is only available on Darwin and in very new Xcode versions, so the test also detects the presence of libMainThreadChecker.dylib and is skipped if the tool is not available.

Diff Detail

Event Timeline

kubamracek created this revision.Jun 28 2017, 1:33 PM

Actually, I think I need to extract the detection of libMainThreadChecker.dylib into a helper function, because I want to add more tests that will use it.

Landed in r307170.

kubamracek accepted this revision.Jul 5 2017, 9:40 AM
This revision is now accepted and ready to land.Jul 5 2017, 9:40 AM
kubamracek closed this revision.Jul 5 2017, 9:40 AM

Hi there, I am here to find help. Is there a way to get libMainThreadChecker.dylib output ? Then we can analyze the output to generate a report ?

Hi there, I am here to find help. Is there a way to get libMainThreadChecker.dylib output ? Then we can analyze the output to generate a report ?

Hi, what are you trying to do? What info are you missing that the LLDB plugin doesn't provide? I don't think parsing the text output (in stderr) from libMainThreadChecker.dylib is a good idea, as it's likely to change.

Hi there, I am here to find help. Is there a way to get libMainThreadChecker.dylib output ? Then we can analyze the output to generate a report ?

Hi, what are you trying to do? What info are you missing that the LLDB plugin doesn't provide? I don't think parsing the text output (in stderr) from libMainThreadChecker.dylib is a good idea, as it's likely to change.

I am an iOS developer. We are using XCTest to run automated testing twice per day and to generate a report. In Xcode 9, I notice that libMainThreadChecker.dylib which documented in https://developer.apple.com/documentation/code_diagnostics/main_thread_checker. It seems that there is no API for libMainThreadChecker.dylib we can use to collect warning to append in report. So I wanna analyze the log to extract libMainThreadChecker.dylib output. Since you are saying parsing the text output is a bad idea, is there a better way to do that ?