You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before the Test Explorer #3032 I would set my ctestArgs as follows:
"cmake.ctestArgs": [
"-L",
"UnitTest"
]
This would ensure that only my tests labelled as UnitTest would be executed by "Run Ctest".
The TestExplorer runs all tests and does not seem to have a setting for filtering by label. Instead the arguments are passed to each test, so for a test we expect to filter TestExplorer attempts the following:
[proc] Executing command: /usr/bin/ctest -j10 -C Debug -T test --output-on-failure -L UnitTest -R ^ExampleIntegrationTest$
[ctest] Cannot find file: /home/.../build/DartConfiguration.tcl
[ctest] Site:
[ctest] Build name: (empty)
[ctest] Test project /home/.../build
[ctest] Cannot find file: /home/.../build/DartConfiguration.tcl
[ctest] No tests were found!!!
[ctest] CTest finished with return code 0
This test is filtered but then appears as a failure in TestExplorer. Ideally there should be a way to configure TestExplorer to respect filter labels, or it should at least not mark this test as having failed.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
I have a similar problem with the test explorer ignoring filters in CMakePresets.json
This means I cannot use my process of using the CMake: Run Tests command to run the tests I'm currently working on. I also tried adding my filter to the filter window in test explorer, but CMake: Run Tests ignores it and runs all tests.
This way, I can select a particular test target to build (plus we have meta-targets that contain certain subsets of our thousands of tests) and run CTest on it without needing to remember updating multiple places in the workflow. Please consider this scenario when making changes as well.
Brief Issue Summary
Before the Test Explorer #3032 I would set my
ctestArgs
as follows:This would ensure that only my tests labelled as UnitTest would be executed by "Run Ctest".
The TestExplorer runs all tests and does not seem to have a setting for filtering by label. Instead the arguments are passed to each test, so for a test we expect to filter TestExplorer attempts the following:
This test is filtered but then appears as a failure in TestExplorer. Ideally there should be a way to configure TestExplorer to respect filter labels, or it should at least not mark this test as having failed.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: