Skip to content

Test failures on Windows #8121

@dschaefer2

Description

@dschaefer2

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

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions