From 2ce8ca0cc92971419dc51488f6eecd9b44a5e4c5 Mon Sep 17 00:00:00 2001 From: David Nicolazo Date: Wed, 15 Jan 2025 07:00:42 -0700 Subject: [PATCH] chore(CTestDriver): conditionally skip project building according to `cmake.buildBeforeRun` config entry --- CHANGELOG.md | 1 + src/ctest.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1b64083a..ff10d4e65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/src/ctest.ts b/src/ctest.ts index 455331782..f2ee40887 100644 --- a/src/ctest.ts +++ b/src/ctest.ts @@ -1248,6 +1248,11 @@ export class CTestDriver implements vscode.Disposable { } private async buildTests(tests: vscode.TestItem[], run: vscode.TestRun): Promise { + // If buildBeforeRun is set to false, we skip the build step + if (!this.ws.config.buildBeforeRun) { + return true; + } + // Folder => status const builtFolder = new Map(); let status: number = 0;