Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

This changes visible behavior

CTest currently reports disabled gtest cases as failures when running all tests; this change treats disabled tests as skipped and removes their impact on aggregate status while keeping them runnable individually.

The following changes are proposed:

  • CTest result evaluation: interpret Completion Status = Disabled as skipped so it doesn’t fail the run.
  • Run selection: exclude gtest DISABLED_ tests from all-tests execution while leaving them discoverable.
  • Test explorer status: keep disabled tests listed but avoid affecting group status on bulk runs.
if (completionStatus === "Disabled") {
  run.skipped(test);
  return returnCode;
}

The purpose of this change

Prevent disabled gtest cases from failing full test runs while preserving manual execution behavior.

Other Notes/Information

None.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 2wrvsblobprodwus2180.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • 40vvsblobprodwus2135.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • b15vsblobprodwus2164.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • b53vsblobprodwus2154.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • d94vsblobprodwus2119.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • k4pvsblobprodwus2140.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • n6wvsblobprodwus2123.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • p2tvsblobprodwus2189.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)
  • v41vsblobprodwus2175.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Disabled gtest tests are executed and fail</issue_title>
<issue_description>Hi,

It seems that extension is handling disabled gtest tests incorrectly.

Current behavior

Disabled tests are executed when execution of all tests is requested and such tests are considered as failed:
Image

[proc] Executing command: /usr/local/bin/ctest -j18 -C Debug -T test --output-on-failure -R ^Tests\.Runs$
[ctest]    Site: rk-work-laptop
[ctest]    Build name: Linux-c++
[ctest] Test project /home/rokas/cmake-tools-bug/build
[ctest]     Start 1: Tests.Runs
[ctest] 1/1 Test microsoft/vscode-cmake-tools#1: Tests.Runs .......................   Passed    0.00 sec
[ctest] 
[ctest] 100% tests passed, 0 tests failed out of 1
[ctest] 
[ctest] Total Test time (real) =   0.00 sec
[ctest] CTest finished with return code 0
[proc] Executing command: /usr/local/bin/ctest -j18 -C Debug -T test --output-on-failure -R ^Tests\.DoesntRun$
[ctest]    Site: rk-work-laptop
[ctest]    Build name: Linux-c++
[ctest] Test project /home/rokas/cmake-tools-bug/build
[ctest]     Start 2: Tests.DoesntRun
[ctest] 1/1 Test microsoft/vscode-cmake-tools#2: Tests.DoesntRun ..................***Not Run (Disabled)   0.00 sec
[ctest] No tests were found!!!
[ctest] CTest finished with return code 0
[ctest] Test Tests.DoesntRun failed with completion status "Disabled".

Expected behavior

  • Disabled tests should not be executed when we are running all tests.
  • They may be included in the test list and may be executed manually.
  • They should not impact status of the test group.
    • Manual execution may impact group status, but it starts to get complicated. For example, if entire group of tests is executed again, we probably want disabled tests to stop impacting group status, even if we manually executed these tests and they failed.

Minimal reproducer: bug-4267.zip</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix execution of disabled gtest tests Jan 23, 2026
Copilot AI requested a review from hanniavalera January 23, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants