Skip to content

Remove realpath in lit site config to fix Driver/working-directory.swift test failure #68096

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

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Remove realpath in lit site config to fix Driver/working-directory.swift test failure #68096

merged 1 commit into from
Aug 24, 2023

Conversation

tristanlabelle
Copy link
Contributor

Remove a remaining usage of os.path.realpath that breaks the Driver/working-directory.swift test on Windows.

swiftc was getting passed "-working-directory" "C:/Users/tristan/Dev/SwiftToolchain/b/1/tools/swift/test-windows-x86_64/Driver/Output/working-directory.swift.tmp" causing a mismatch in // OUTPUT_FILE_MAP_2: BUILD_DIR{{.*}}main-modified.o when "BUILD_DIR=S:/b/1/tools/swift"

$ "s:\\b\\1\\bin\\swiftc.exe" "-toolchain-stdlib-rpath" "-module-cache-path" "S:\b\1\swift-test-results\x86_64-unknown-windows-msvc\clang-module-cache" "-swift-version" "4" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0" "-Xfrontend" "-define-availability" "-Xfrontend" "SwiftStdlib 5.10:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999" "-driver-print-jobs" "-working-directory" "C:/Users/tristan/Dev/SwiftToolchain/b/1/tools/swift/test-windows-x86_64/Driver/Output/working-directory.swift.tmp" "-c" "main.swift" "-output-file-map" "ofmo2.json"
$ "C:\Users\tristan\AppData\Local\Programs\Python\Python39\python.exe" "S:\SourceCache\swift\utils\PathSanitizingFileCheck" "--allow-unused-prefixes" "--sanitize" "BUILD_DIR=S:/b/1/tools/swift" "--sanitize" "SOURCE_DIR=S:/SourceCache/swift" "--use-filecheck" "s:\b\1\bin\filecheck.exe" "--enable-windows-compatibility" "S:\SourceCache\swift\test\Driver\working-directory.swift" "-check-prefix=OUTPUT_FILE_MAP_2" "--enable-yaml-compatibility"
# command stderr:
S:\SourceCache\swift\test\Driver\working-directory.swift:66:23: error: OUTPUT_FILE_MAP_2: expected string not found in input
// OUTPUT_FILE_MAP_2: BUILD_DIR{{.*}}main-modified.o
                      ^
<stdin>:1:1: note: scanning from here
"s:\\b\\1\\bin\\swiftc.exe" -frontend -c -primary-file "C:/Users/tristan/Dev/SwiftToolchain/b/1/tools/swift/test-windows-x86_64/Driver/Output/working-directory.swift.tmp\\main.swift" -target x86_64-unknown-windows-msvc -disable-objc-interop -module-cache-path "S:\\b\\1\\swift-test-results\\x86_64-unknown-windows-msvc\\clang-module-cache" -swift-version 4 -define-availability "SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999" -define-availability "SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2" -define-availability "SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0" -define-availability "SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4" -define-availability "SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0" -define-availability "SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5" -define-availability "SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0" -define-availability "SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4" -define-availability "SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0" -define-availability "SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4" -define-availability "SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0" -define-availability "SwiftStdlib 5.10:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999" -Xcc -working-directory -Xcc C:/Users/tristan/Dev/SwiftToolchain/b/1/tools/swift/test-windows-x86_64/Driver/Output/working-directory.swift.tmp -plugin-path "s:\\b\\1\\lib\\swift\\host\\plugins" -plugin-path "s:\\b\\1\\local\\lib\\swift\\host\\plugins" -autolink-library oldnames -autolink-library msvcrt -Xcc -D_MT -Xcc -D_DLL -module-name main -o "C:/Users/tristan/Dev/SwiftToolchain/b/1/tools/swift/test-windows-x86_64/Driver/Output/working-directory.swift.tmp\\main-modified.o"

@compnerd
Copy link
Member

@swift-ci please smoke test

@tristanlabelle
Copy link
Contributor Author

Some bad modulemap names sneaked in on linux. @compnerd , do you know about this?

/home/build-user/swiftpm/Tests/PackageLoadingTests/PD_5_3_LoadingTests.swift:182: error: PackageDescription5_3LoadingTests.testBinaryTargetsValidation : failed - Found unexpected diagnostics: 
- [warning]: <unknown>:0: warning: '/home/build-user/swift-nightly-install/usr/lib/swift/CoreFoundation/module.map' as a module map name is deprecated, rename it to module.modulemap
<unknown>:0: warning: '/home/build-user/swift-nightly-install/usr/lib/swift/CFURLSessionInterface/module.map' as a module map name is deprecated, rename it to module.modulemap

@compnerd
Copy link
Member

That was an old spelling for module.modulemap. I don't see how that would be impacted by the changes here 🤔

@compnerd
Copy link
Member

@swift-ci please smoke test macOS platform

@compnerd
Copy link
Member

@swift-ci please smoke test Linux platform

@compnerd compnerd merged commit f7dcf1d into swiftlang:main Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants