swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.6k stars 10.37k forks source link

Enable configuring tests without running them & improve GettingStarted guide's accuracy regarding tests #77642

Open jamieQ opened 1 day ago

jamieQ commented 1 day ago

Motivation

The 'Getting Started' guide for contributors includes some sample build-script invocations to use to set up a local development environment. When using the provided invocations, or similar variants that exclude the --test flag, attempting to subsequently run tests with lit fails with the following form of error:

FileNotFoundError: [Errno 2] No such file or directory: '<path>/swift-project/build/Ninja-RelWithDebInfoAssert/swift-macosx-arm64/test-macosx-arm64/lit.swift-features.cfg'

This is seemingly due to the fact that build-script will not configure tests without passing the --test flag. This is confusing, and may be a regression from previous behavior.

Proposed solution

There should be a way to enable running the test configuration without actually running the tests or requiring confusing flag combinations like --test --skip-test-swift --skip-test-xyz .... Additionally the getting started guide should include accurate guidance for configuring the environment for executing tests.

Alternatives considered

No response

Additional information

possibly related to changes in: https://github.com/swiftlang/swift/pull/76740