Collecting iOS simulator crash logs as Swarming isolated outputs |
||||
Issue description
When tests crash running on swarming, there's a log written to a directory like /Users/chrome-bot/Library/Developer/Xcode/DerivedData/
Example log snippet:
RUN ] SrtpStatTest.TestUnprotectRtpError
2016-12-27 00:35:51.536 xcodebuild[12894:74266] [MT] IDETestOperationsObserverDebug: (991E081B-D0AB-4B77-9666-C7C0C2B776C6) Beginning test session rtc_pc_unittests-991E081B-D0AB-4B77-9666-C7C0C2B776C6 at 2016-12-27 00:35:51.535 with Xcode 8A218a on target <DVTiPhoneSimulator: 0x7fd4624b2050> {
SimDevice: SimDevice : iPhone 6s (4D35255B-7C7B-47E1-9221-E9F8AB013B86) : state={ Shutdown } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s } runtime={ SimRuntime : 10.0 (14A345) - com.apple.CoreSimulator.SimRuntime.iOS-10-0 }
} (10.0 (14A345))
2016-12-27 00:35:51.536 xcodebuild[12894:74272] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/chrome-bot/Library/Developer/Xcode/DerivedData/temporary-etrzpcjigkhdgvgvdgnghbwjkoah/Logs/Test/A75B9A6D-21E0-4028-B0EB-6B6E890CE57C/Session-rtc_pc_unittests-2016-12-27_003551-CQgjfP.log
from https://build.chromium.org/p/client.webrtc/builders/iOS64%20Simulator%20Debug/builds/5555
It would be useful if those logs were archived like isolated outputs. There's the ISOLATED_OUTDIR variable available that can be used if there's a way to change the location for such logs for iossim. See this example for Android logcats: https://cs.chromium.org/chromium/src/tools/mb/mb.py?rcl=0&l=1095
It would make debugging flaky test crashes easier for WebRTC at least, and I assume Chrome on iOS must have similar crashes?
,
Jan 6 2017
Searching the internet seems to suggest that ~/Library/Developer/Xcode/DerivedData is supposed to contain folders that indicate app name, but for us every single app is just "temporary-<random string>" or "TestProject-<random string>". Is it possible to get the prefix part to be the actual name of the app so we have some clue as to which subdirectory under DerivedData to look at? Or am I forced to scrape test output logs to find this path? +cc some people who might know the answer.
,
Jan 6 2017
I think the directory under DerivedData is named after the workspace or the project (locally it is named all-crmxrltgotwrvncastyynkzjaxai on my computer when I launch the app from the all.xcworkspace). Since on the swarmimg bot we do not even have a workspace or a project, I don't know whether we can control the name of the directory. But instead of scrapping, why not instead just remove everything in DerivedData before starting the app? The content should not matter, and then you can just get the full content of DerivedData. WDYT?
,
Jan 6 2017
Okay, I will flush DerivedData and return its entire contents.
,
Jan 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e1a86a9954e04e149616c31c201644c52021e6df commit e1a86a9954e04e149616c31c201644c52021e6df Author: smut <smut@google.com> Date: Tue Jan 10 03:11:52 2017 Fetch contents of DerivedData after each test BUG= 677113 R=dpranke@chromium.org, sdefresne@chromium.org Review-Url: https://codereview.chromium.org/2612303006 . Cr-Commit-Position: refs/heads/master@{#442462} [modify] https://crrev.com/e1a86a9954e04e149616c31c201644c52021e6df/ios/build/bots/scripts/test_runner.py
,
Jan 18 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by justincohen@chromium.org
, Dec 29 2016Status: Assigned (was: Untriaged)