Skip to content

Commit fda3892

Browse files
committed
Skip automatic CTest discovery when test explorer integration is disabled
1 parent 35ece57 commit fda3892

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Improvements:
1414
Bug Fixes:
1515
- 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)
1616
- 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<dir>\ /FS`) into a single malformed argument. [#4902](https://github.com/microsoft/vscode-cmake-tools/issues/4902)
17+
- Skip the automatic post-build CTest discovery when `cmake.ctest.testExplorerIntegrationEnabled` is `false`. [#4909](https://github.com/microsoft/vscode-cmake-tools/issues/4909)
1718
- Fix kit detection returning "unknown vendor" when using clang-cl compiler. [#4638](https://github.com/microsoft/vscode-cmake-tools/issues/4638)
1819
- 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)
1920
- 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)

docs/cmake-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Options that support substitution, in the table below, allow variable references
3939
| `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 |
4040
| `cmake.ctest.debugLaunchTarget` | Target to debug during CTest execution. | `null` | no |
4141
| `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 |
42-
| `cmake.ctest.testExplorerIntegrationEnabled` | If `true`, configure CMake to generate information needed by the test explorer. | `true` | no |
42+
| `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 |
4343
| `cmake.ctest.testSuiteDelimiter` | Character(s) that separate test suite name components. | `null` | no |
4444
| `cmake.ctestArgs` | An array of additional arguments to pass to CTest. | `[]` | yes |
4545
| `cmake.ctestDefaultArgs` | Default arguments to pass to CTest. | `["-T", "test", "--output-on-failure"]` | no |

src/cmakeProject.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2387,7 +2387,9 @@ export class CMakeProject {
23872387
// remain from a previous build that had parsing enabled.
23882388
collections.build.clear();
23892389
}
2390-
await this.cTestController.refreshTests(drv!);
2390+
if (drv!.config.testExplorerIntegrationEnabled) {
2391+
await this.cTestController.refreshTests(drv!);
2392+
}
23912393
await this.refreshCompileDatabase(drv!.expansionOptions);
23922394
return {
23932395
exitCode: rc === null ? -1 : rc,

0 commit comments

Comments
 (0)