Hi Kyle, I really like swiftenv, thank you for making this awesome product! However, I have some issue with swiftenv and swift compiler tests right now.
I built swift complier from apple/swift repo, and I ran swift compiler tests by $ swift/utils/build-script --test
. When swiftenv is isntalled, 346 tests fails as "Unexpected Failures" with the following error (this is one of the failed test result messages):
********************
FAIL: Swift(macosx-x86_64) :: PlaygroundTransform/high_performance.swift (326 of 2938)
******************** TEST 'Swift(macosx-x86_64) :: PlaygroundTransform/high_performance.swift' FAILED ********************
Script:
--
rm -rf /Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/PlaygroundTransform/Output/high_performance.swift.tmp
mkdir -p /Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/PlaygroundTransform/Output/high_performance.swift.tmp
cp /Users/keitaito/Swift/swift-source/swift/test/PlaygroundTransform/high_performance.swift /Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/PlaygroundTransform/Output/high_performance.swift.tmp/main.swift
xcrun --toolchain default --sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk /Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swiftc -target x86_64-apple-macosx10.9 -module-cache-path '/var/folders/4y/_c55p9_170n54jw_s64mx_c80000gn/T/swift-testsuite-clang-module-cacheR0Chhb' -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -Xlinker -rpath -Xlinker /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -Xfrontend -playground -Xfrontend -playground-high-performance -Xfrontend -debugger-support -o /Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/PlaygroundTransform/Output/high_performance.swift.tmp/main /Users/keitaito/Swift/swift-source/swift/test/PlaygroundTransform/Inputs/PlaygroundsRuntime.swift /Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/PlaygroundTransform/Output/high_performance.swift.tmp/main.swift
/Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/PlaygroundTransform/Output/high_performance.swift.tmp/main | /Users/keitaito/Swift/swift-source/swift/utils/PathSanitizingFileCheck --sanitize 'BUILD_DIR=/Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64' --sanitize 'SOURCE_DIR=/Users/keitaito/Swift/swift-source/swift' --use-filecheck '/Users/keitaito/Swift/swift-source/build/Ninja-DebugAssert/llvm-macosx-x86_64/./bin/FileCheck' /Users/keitaito/Swift/swift-source/swift/test/PlaygroundTransform/high_performance.swift
--
Exit Code: 1
Command Output (stderr):
--
mkdir: /.swiftenv: Permission denied
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
Here is the overall tests result with swiftenv:
********************
Testing Time: 815.15s
********************
Failing Tests (346):
Swift(macosx-x86_64) :: SILOptimizer/specialize_partial_apply.swift
Swift(macosx-x86_64) :: SILOptimizer/let_properties_opts_runtime.swift
Swift(macosx-x86_64) :: SILOptimizer/capture_propagation_linkage.swift
... (this is pretty long for 346)
Swift(macosx-x86_64) :: Reflection/box_descriptors.sil
Swift(macosx-x86_64) :: Runtime/backtrace.swift
Swift(macosx-x86_64) :: SILGen/coverage_smoke.swift
Expected Passes : 2520
Expected Failures : 8
Unsupported Tests : 64
Unexpected Failures: 346
*** Failed while running tests for swift (check-swift-macosx-x86_64)
swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
Full failing tests list is here: https://gist.github.com/keitaito/0247ab6cfd6e86f0f636a7d3306c9012
After the above failure, I uninstalled swiftenv, and I tried swift compiler tests again. This time, there are no "Unexpected Failures", and all tests are finished correctly. Here is the overall tests result:
Testing Time: 887.59s
Expected Passes : 2866
Expected Failures : 8
Unsupported Tests : 64
-- check-swift-macosx-x86_64 finished --
--- Finished tests for swift ---
Do you have any idea why swiftenv causes this issue, and how can I fix it?
I just only installed swiftenv, and no other versions of swift installed via swiftenv.
$ swiftenv versions
* system
3.0
$ swiftenv version
system (set by /Users/keitaito/.swiftenv/version)
OS: OS X El Capitan version 10.11.6
Installed Xcode: Xcode 8
Built swift compiler directory name: Ninja-DebugAssert -> swift-macosx-x86_64
Sorry in advance if my explanation here is not clear enough. Please let me know if you need any other information. Thank you.