swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.76k stars 1.35k forks source link

Test failures on Windows #8121

Open dschaefer2 opened 2 weeks ago

dschaefer2 commented 2 weeks ago

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

Description

Now that we have swiftpm able to self build on Windows, running swift test I see a number of test failures. We should fix them up so we can turn them on in CI.

Test Case 'PackageModelTests.testDetermineSwiftCompilers' started at 2024-11-15 12:11:26.893
<EXPR>:0: error: PackageModelTests.testDetermineSwiftCompilers : threw error "toolchain is invalid: could not find CLI tool `swiftc` at any of these directories: [<AbsolutePath:"C:\Users\DSCHAE~1\AppData\Local\Temp\TemporaryDirectory.49clSz\bin1">, <AbsolutePath:"C:\Users\DSCHAE~1\AppData\Local\Temp\TemporaryDirectory.49clSz\bin2">]"
Test Case 'PackageModelTests.testDetermineSwiftCompilers' failed (0.036 seconds)

Test Case 'SwiftSDKBundleTests.testInstallRemote' started at 2024-11-15 12:11:27.033
[debug]: registering 'tar.exe zxf C:\Users\DSCHAE~1\AppData\Local\Temp\TemporaryDirectory.8Scm2P\bundle.tar.gz -C C:\Users\DSCHAE~1\AppData\Local\Temp\TemporaryDirectory.8Scm2P\extraction-results' with terminator
<EXPR>:0: error: SwiftSDKBundleTests.testInstallRemote : threw error "missingExecutableProgram(program: "tar.exe")"
Test Case 'SwiftSDKBundleTests.testInstallRemote' failed (0.041 seconds)

And then an assertion failure which terminates the tests.

Test Case 'ManifestSourceGenerationTests.testAdvancedFeatures' started at 2024-11-15 12:12:15.968
TSCBasic/Path.swift:969: Assertion failed

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

To self test I do the following:

swift build -c release
.\.build\x86_64-unknown-windows-msvc\release\swift-test

That lets us test in debug from the release build to avoid conflicts.

Swift Package Manager version/commit hash

tip of main.

Swift & OS version (output of swift --version ; uname -a)

Windows