New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-14352] Xcode fails to run Swift unittests #56711
Comments
@swift-ci create |
Comment by Ethan Guan (JIRA) Sorry for the mistake. My environment: macOS Catalina 10.15.7 |
Comment by Samuel McBroom (JIRA) Also experiencing this. Environment: macOS Catalina 10.15.7 Xcode 12.4 (12D4e) |
Comment by Justin Fargnoli (JIRA) Also experiencing this. Error messages ``` * **
The following build commands failed: CompileC /Users/justinfargnoli/Documents/sources/swift-project/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/unittests/SourceKit/Support/Swift.build/RelWithDebInfo/SourceKitSupportTests.build/Objects-normal/x86_64/ImmutableTextBufferTest.o /Users/justinfargnoli/Documents/sources/swift-project/swift/unittests/SourceKit/Support/ImmutableTextBufferTest.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure) ERROR: command terminated with a non-zero exit status 65, aborting ``` ``` /Users/justinfargnoli/Documents/sources/swift-project/swift/unittests/SourceKit/Support/ImmutableTextBufferTest.cpp:14:10: fatal error:
#include "gtest/gtest.h"
1 error generated. ``` Environment
Update I ran `brew install googletest`. This did not solve the problem. I now have the same error message as above, but for `/Users/justinfargnoli/Documents/sources/swift-project/swift/unittests/SIL/SILBitfieldTest.cpp:13:10*`*. Also, after re-running the build command it looks like the file the causes the error is different every time, but the error remains the same. |
This #36971 could be a fix for that issue |
Comment by Alex Azarov (JIRA) As of today the issue is resolved, I cannot reproduce it anymore. |
Environment
macOS 11.2.2 (x86_64)
Xcode 12.4 (12D4e)
I tested on the main branch, commits 78346c2 and 9b016cb from March 13, 2021.
Additional Detail from JIRA
md5: 1422d2edae7cc9892610b9fb8bad3638
Issue Description:
I cloned main branch of the Swift repo and was going through the GettingStarted documentation. On the third step it gives two commands to build toolchain and run tests: via ninja and via Xcode.
The first one works just fine and all tests complete successfully. Xcode builds the toolchain too, however it fails to run the tests.
This is the command I run:
utils/build-script --skip-build-benchmarks \ --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \ --sccache --release-debuginfo --swift-disable-dead-stripping --test \ --xcode
The error I get is:
TypeLookupError.cpp:14:10: fatal error: 'gtest/gtest.h' file not found
On the other hand, everything is fine when building via ninja (same command, but without --xcode flag), or when building toolchain via Xcode without --test flag.
I've also tried to build the "check-swift-all" scheme in Xcode UI and it fails with the same error.
The full output is on gist: https://gist.github.com/azarovalex/6006f5905f737945fa0f1ed256b17220
The text was updated successfully, but these errors were encountered: