Skip to content

Add swift.testBuildArguments Setting #1020

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

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

plemarquand
Copy link
Contributor

Adds a new setting that allows users to specify extra arguments when running swift test and swift build --build-tests during a test run from inside VS Code.

For example users could set swift.testBuildArguments: ["-Xswiftc", "-DTEST"] to enable code guarded by an #if TEST compiler directive.

This patch required reworking how we do a build all before starting a debug session since using the premade Build All tasks do not allow for dynamically customizing arguments.

@plemarquand plemarquand force-pushed the test-build-arguments branch 3 times, most recently from faab13c to 8780b80 Compare August 21, 2024 18:59
@plemarquand plemarquand marked this pull request as ready for review August 21, 2024 19:18
Adds a new setting that allows users to specify extra arguments when
running `swift test` and `swift build --build-tests` during a test run
from inside VS Code.

For example users could set `swift.testBuildArguments: ["-Xswiftc",
"-DTEST"]` to enable code guarded by an `#if TEST` compiler directive.

This patch required reworking how we do a build all before starting a
debug session since using the premade Build All tasks do not allow for
dynamically customizing arguments.
@plemarquand plemarquand force-pushed the test-build-arguments branch from 5bcaacf to b7c70ff Compare August 27, 2024 13:17
@plemarquand plemarquand merged commit d6c91dd into swiftlang:main Aug 27, 2024
8 checks passed
@plemarquand plemarquand deleted the test-build-arguments branch August 27, 2024 14:15
@plemarquand plemarquand added the needs verification Issue has been fixed, but requires verification before closing label Aug 27, 2024
@award999 award999 self-assigned this Aug 27, 2024
@award999
Copy link
Contributor

Verified with d6c91dd

@award999 award999 removed their assignment Aug 27, 2024
@award999 award999 removed the needs verification Issue has been fixed, but requires verification before closing label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants