Skip to content

Commit b93074e

Browse files
committed
Skip automatic CTest discovery when test explorer integration is disabled
1 parent 0a9c8f8 commit b93074e

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
@@ -11,6 +11,7 @@ Improvements:
1111

1212
Bug Fixes:
1313
- 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)
14+
- Skip the automatic post-build CTest discovery when `cmake.ctest.testExplorerIntegrationEnabled` is `false`. [#4909](https://github.com/microsoft/vscode-cmake-tools/issues/4909)
1415
- Fix kit detection returning "unknown vendor" when using clang-cl compiler. [#4638](https://github.com/microsoft/vscode-cmake-tools/issues/4638)
1516
- 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)
1617

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
@@ -2384,7 +2384,9 @@ export class CMakeProject {
23842384
// remain from a previous build that had parsing enabled.
23852385
collections.build.clear();
23862386
}
2387-
await this.cTestController.refreshTests(drv!);
2387+
if (drv!.config.testExplorerIntegrationEnabled) {
2388+
await this.cTestController.refreshTests(drv!);
2389+
}
23882390
await this.refreshCompileDatabase(drv!.expansionOptions);
23892391
return {
23902392
exitCode: rc === null ? -1 : rc,

0 commit comments

Comments
 (0)