Skip to content

Commit

Permalink
Don't append .exe to binaries ending in .xctest (#1377)
Browse files Browse the repository at this point in the history
* Don't append .exe to binaries ending in .xctest

Certain non standard workflows (CMake) could produce binaries that end
in .xctest. Only append .exe if it doesn't already have a valid extension.

Also declare `testType` in the debug configuration schema allowing users
to declare what type of test framework they're using in the launch config
if they're using a non standard flow.

Issue: #1364
  • Loading branch information
plemarquand authored Feb 12, 2025
1 parent c0eba38 commit 39fb686
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,10 @@
"description": "Don't retrieve STDIN, STDOUT and STDERR as the program is running.",
"default": false
},
"testType": {
"type": "string",
"description": "If the program is a test, set this to the type of test (`XCTest` or `swift-testing`). This is typically set automatically and is only required when your launch program uses a non standard filename."
},
"shellExpandArguments": {
"type": "boolean",
"description": "Expand program arguments as a shell would without actually launching the program in a shell.",
Expand Down
3 changes: 2 additions & 1 deletion src/debugger/debugAdapterFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ export class LLDBDebugConfigurationProvider implements vscode.DebugConfiguration
if (
this.platform === "win32" &&
launchConfig.testType === undefined &&
path.extname(launchConfig.program) !== ".exe"
path.extname(launchConfig.program) !== ".exe" &&
path.extname(launchConfig.program) !== ".xctest"
) {
launchConfig.program += ".exe";
}
Expand Down

0 comments on commit 39fb686

Please sign in to comment.