Error trying to run GTest unit tests in iOS

58 views
Skip to first unread message

Brad Aisa

unread,
Feb 2, 2021, 5:31:37 PM2/2/21
to Chromium-dev
My colleague and I are trying to run some GTest-based unit tests we added to Chromium (85). We followed the same pattern as existing unit tests in the code base. We are able to run our test target in XCode to see the test results. But we can't figure out how to run the tests from the command line in our Gitlab build pipeline. The closest we've been able to get, is using something similar to the command below. This does cause the unittests to run (you can see the results in the console output) but the overall command exits with an error, with the message indicated below. We've tried searching the Chromium docs, and other sources, for instructions on how to run the unittests. Google presumably must be running these unit tests in their own build pipelines. Any help or references is appreciated!

Command:

./src/out/Debug-iphonesimulator/iossim  -d 'iPhone 12 Pro' ./src/out/Debug-iphonesimulator/wsam_unittests.app

2021-01-28 14:00:35.037 xcodebuild[68030:1771293] [MT] DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7ff22b70c560:'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk'>': SDK with name 'macosx11.1' being superseded by SDK with 'macosx11.1'.

[...more output, see attached file]

Error Result, from 

/Users/baisa/Library/Developer/Xcode/DerivedData/temporary-dvpkjecpwqhgbebozponuqjlbjpf/Logs/Test/Test-Transient Testing-2021.01.28_14-00-37--0600.xcresult

 Assertions: System: Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test runner exited before starting test execution. If you believe this error represents a bug, please attach the result bundle at /Users/baisa/Library/Developer/Xcode/DerivedData/temporary-dvpkjecpwqhgbebozponuqjlbjpf/Logs/Test/Test-Transient Testing-2021.01.28_14-00-37--0600.xcresult)

I have attached a file with a full output log of running our invocation script. The successful test results can be seen in the middle. (I can't post the xcresult file--it is too large, at 23MB)


Brad Aisa

baisa at opentext dot com

Senior Software Engineer

Webroot, a division of Opentext


unitTestResults.log
Reply all
Reply to author
Forward
0 new messages