Skip to content

Running tests built with swiftbuild build system on Linux fails with JSON decoder error on --dump-tests-json output #8479

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

Open
1 task done
cmcgee1024 opened this issue Apr 10, 2025 · 0 comments
Assignees
Labels
bug swift build Changes impacting `swift build`

Comments

@cmcgee1024
Copy link
Member

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

When running the TestCommandSwiftlyBuildTests with the swiftc as the linker driver (see #8477), and removing the -rdyamic unrecognized linker flag (swiftlang/swift-build#395) there is an error decoding the empty JSON file generated from the XCTest executable's --dump-tests-json.

The reason that this fails is due to the fact that the XCTest binaries do not yet generate any JSON. See swiftlang/swift-build#396 and swiftlang/swift-build#393

Expected behavior

It is expected that the tests run to completion after building.

Actual behavior

The tests do not run due to this JSON decoder error.

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

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

Linux - Ubuntu 24.04 aarch64

@cmcgee1024 cmcgee1024 added bug swift build Changes impacting `swift build` labels Apr 10, 2025
@cmcgee1024 cmcgee1024 self-assigned this Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug swift build Changes impacting `swift build`
Projects
None yet
Development

No branches or pull requests

1 participant