diff --git a/CHANGELOG.md b/CHANGELOG.md index d5b0d6ac9..a2d1f9a67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Improvements: Bug Fixes: - Fix `CMAKE_MAKE_PROGRAM` and other cache variables using stale values when presets are edited without restarting VS Code. The `onCodeModelChanged` subscription is now established in `startNewCMakeDriver` so it applies to both initial creation and driver reloads. [#4864](https://github.com/microsoft/vscode-cmake-tools/issues/4864) - Fix Windows backslash handling in token splitting to preserve trailing backslashes before whitespace. This caused "Compile Active File" with MSVC + Ninja Multi-Config to merge adjacent flags (e.g., `/Fd\ /FS`) into a single malformed argument. [#4902](https://github.com/microsoft/vscode-cmake-tools/issues/4902) +- Skip the automatic post-build CTest discovery when `cmake.ctest.testExplorerIntegrationEnabled` is `false`. [#4909](https://github.com/microsoft/vscode-cmake-tools/issues/4909) - Fix kit detection returning "unknown vendor" when using clang-cl compiler. [#4638](https://github.com/microsoft/vscode-cmake-tools/issues/4638) - Update testing framework to fix bugs when running tests of CMake Tools without a reliable internet connection. [#4891](https://github.com/microsoft/vscode-cmake-tools/pull/4891) [@cwalther](https://github.com/cwalther) - Fix “Make it easier for a new developer of CMake Tools to run tests” on Windows. [#4932](https://github.com/microsoft/vscode-cmake-tools/pull/4932) [@cwalther](https://github.com/cwalther) diff --git a/docs/cmake-settings.md b/docs/cmake-settings.md index e210e7eb0..2b2ab26fd 100644 --- a/docs/cmake-settings.md +++ b/docs/cmake-settings.md @@ -39,7 +39,7 @@ Options that support substitution, in the table below, allow variable references | `cmake.ctest.allowParallelJobs` | If `true`, allow running test jobs in parallel. When `false`, tests run sequentially in alphabetical order, matching the Test Explorer display order. | `false` | no | | `cmake.ctest.debugLaunchTarget` | Target to debug during CTest execution. | `null` | no | | `cmake.ctest.parallelJobs` | Specify the number of jobs to run in parallel for ctest. Using the value `0` will detect and use the number of CPUs. Using the value `1` will disable test parallelism. | `0` | no | -| `cmake.ctest.testExplorerIntegrationEnabled` | If `true`, configure CMake to generate information needed by the test explorer. | `true` | no | +| `cmake.ctest.testExplorerIntegrationEnabled` | If `true`, configure CMake to generate information needed by the test explorer. When `false`, the automatic CTest discovery that runs after each build is also skipped; the post-configure refresh and the manual `cmake.refreshTests` command still run. | `true` | no | | `cmake.ctest.testSuiteDelimiter` | Character(s) that separate test suite name components. | `null` | no | | `cmake.ctestArgs` | An array of additional arguments to pass to CTest. | `[]` | yes | | `cmake.ctestDefaultArgs` | Default arguments to pass to CTest. | `["-T", "test", "--output-on-failure"]` | no | diff --git a/src/cmakeProject.ts b/src/cmakeProject.ts index 67767cdc6..d4786dba0 100644 --- a/src/cmakeProject.ts +++ b/src/cmakeProject.ts @@ -2387,7 +2387,9 @@ export class CMakeProject { // remain from a previous build that had parsing enabled. collections.build.clear(); } - await this.cTestController.refreshTests(drv!); + if (drv!.config.testExplorerIntegrationEnabled) { + await this.cTestController.refreshTests(drv!); + } await this.refreshCompileDatabase(drv!.expansionOptions); return { exitCode: rc === null ? -1 : rc,