Skip to content

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

@cmcgee1024

Description

@cmcgee1024

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

Metadata

Metadata

Assignees

Labels

bugswift buildChanges impacting `swift build`

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions