Skip to content

Commit 5bcaacf

Browse files
committed
Address comments
1 parent 8780b80 commit 5bcaacf

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

Diff for: assets/test/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"swift.disableAutoResolve": true,
3-
"swift.testBuildArguments": [
3+
"swift.additionalTestArguments": [
44
"-Xswiftc",
55
"-DTEST_ARGUMENT_SET_VIA_TEST_BUILD_ARGUMENTS_SETTING"
66
]

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@
228228
"items": {
229229
"type": "string"
230230
},
231-
"markdownDescription": "Additional arguments to pass to `swift build`. Keys and values should be provided as individual entries in the list. If you have created a copy of the build task in `tasks.json` then these build arguments will not be propogated to that task."
231+
"markdownDescription": "Additional arguments to pass to `swift` commands such as `swift build`, `swift package`, `swift test`, etc... Keys and values should be provided as individual entries in the list. If you have created a copy of the build task in `tasks.json` then these build arguments will not be propogated to that task."
232232
},
233-
"swift.testBuildArguments": {
233+
"swift.additionalTestArguments": {
234234
"type": "array",
235235
"default": [],
236236
"items": {

Diff for: src/configuration.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export interface FolderConfiguration {
5858
/** Environment variables to set when running tests */
5959
readonly testEnvironmentVariables: { [key: string]: string };
6060
/** Extra arguments to set when building tests */
61-
readonly testBuildArguments: string[];
61+
readonly additionalTestArguments: string[];
6262
/** search sub-folder of workspace folder for Swift Packages */
6363
readonly searchSubfoldersForPackages: boolean;
6464
/** auto-generate launch.json configurations */
@@ -122,10 +122,10 @@ const configuration = {
122122
.get<{ [key: string]: string }>("testEnvironmentVariables", {});
123123
},
124124
/** Extra arguments to pass to swift test and swift build when running and debugging tests. */
125-
get testBuildArguments(): string[] {
125+
get additionalTestArguments(): string[] {
126126
return vscode.workspace
127127
.getConfiguration("swift", workspaceFolder)
128-
.get<string[]>("testBuildArguments", []);
128+
.get<string[]>("additionalTestArguments", []);
129129
},
130130
/** auto-generate launch.json configurations */
131131
get autoGenerateLaunchConfigurations(): boolean {

Diff for: src/debugger/buildConfig.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class BuildConfigurationFactory {
6161
if (this.isTestBuild) {
6262
additionalArgs = [
6363
...additionalArgs,
64-
...configuration.folder(this.ctx.workspaceFolder).testBuildArguments,
64+
...configuration.folder(this.ctx.workspaceFolder).additionalTestArguments,
6565
];
6666
}
6767
}
@@ -470,7 +470,10 @@ export class TestingConfigurationFactory {
470470
}
471471

472472
// Add in any user specified test arguments.
473-
result = [...result, ...configuration.folder(this.ctx.workspaceFolder).testBuildArguments];
473+
result = [
474+
...result,
475+
...configuration.folder(this.ctx.workspaceFolder).additionalTestArguments,
476+
];
474477

475478
// `link.exe` doesn't support duplicate weak symbols, and lld-link in an effort to
476479
// match link.exe also doesn't support them by default. We can use `-lldmingw` to get

0 commit comments

Comments
 (0)