Open
Description
Description
This is particularly useful when cross-compiling the test runner for a package, as I do for Android:
swift build --build-tests --enable-test-discovery --destination ~/swift-android-sdk/android-aarch64.json
The idea here is to be able to cross-compile the test runner and skip some tests: an alternative would be to add a (that alternative won't work, see next comment). @grynspan informs me that the new --skip-run
flag to swift test
, so it builds but won't run the tests.swift-testing
tests can be filtered/skipped easily by passing these flags to the test runner, so this issue only deals with XCTest
tests.
Expected behavior
Be able to skip or filter certain tests when cross-compiling the tests
Actual behavior
> ~/swift-DEVELOPMENT-SNAPSHOT-2022-09-24-a-ubuntu20.04/usr/bin/swift build --build-tests --enable-test-discovery --filter Contended
error: Unknown option '--filter'
Steps to reproduce
- ~/swift-DEVELOPMENT-SNAPSHOT-2022-09-24-a-ubuntu20.04/usr/bin/swift build --build-tests --enable-test-discovery --filter Contended
Swift Package Manager version/commit hash
5.7 and 5.8
Swift & OS version (output of swift --version && uname -a
)
Never worked in Swift on Ubuntu 20.04 x86_64