Skip to content

Commit

Permalink
chore(CTestDriver): conditionally skip project building according to …
Browse files Browse the repository at this point in the history
…`cmake.buildBeforeRun` config entry
  • Loading branch information
Dabsunter committed Jan 15, 2025
1 parent 85ffa5c commit 2ce8ca0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Improvements:
- Ensure that stopping tests actually forces the tests to stop running. [#2095](https://github.com/microsoft/vscode-cmake-tools/issues/2095)
- Retire the Show Options Moved Notification [#4039](https://github.com/microsoft/vscode-cmake-tools/issues/4039)
- Improve the pinned commands experience by defaulting settings and using VS Code state rather than modifying user settings. [#3977](https://github.com/microsoft/vscode-cmake-tools/issues/3977)
- Skip project building in the CTest test explorer when `cmake.buildBeforeRun` is set to `false`. [#4241](https://github.com/microsoft/vscode-cmake-tools/pull/4241)

Bug Fixes:

Expand Down
5 changes: 5 additions & 0 deletions src/ctest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,11 @@ export class CTestDriver implements vscode.Disposable {
}

private async buildTests(tests: vscode.TestItem[], run: vscode.TestRun): Promise<boolean> {
// If buildBeforeRun is set to false, we skip the build step
if (!this.ws.config.buildBeforeRun) {
return true;
}

// Folder => status
const builtFolder = new Map<string, number>();
let status: number = 0;
Expand Down

0 comments on commit 2ce8ca0

Please sign in to comment.