Skip to content

Commit 2ce8ca0

Browse files
committed
chore(CTestDriver): conditionally skip project building according to cmake.buildBeforeRun config entry
1 parent 85ffa5c commit 2ce8ca0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Improvements:
2121
- Ensure that stopping tests actually forces the tests to stop running. [#2095](https://github.com/microsoft/vscode-cmake-tools/issues/2095)
2222
- Retire the Show Options Moved Notification [#4039](https://github.com/microsoft/vscode-cmake-tools/issues/4039)
2323
- 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)
24+
- 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)
2425

2526
Bug Fixes:
2627

src/ctest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,11 @@ export class CTestDriver implements vscode.Disposable {
12481248
}
12491249

12501250
private async buildTests(tests: vscode.TestItem[], run: vscode.TestRun): Promise<boolean> {
1251+
// If buildBeforeRun is set to false, we skip the build step
1252+
if (!this.ws.config.buildBeforeRun) {
1253+
return true;
1254+
}
1255+
12511256
// Folder => status
12521257
const builtFolder = new Map<string, number>();
12531258
let status: number = 0;

0 commit comments

Comments
 (0)