-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use flags of the selected test preset when running an individual test #3152
Comments
Sorry I'm not sure if I understand your question. If you want to use the test preset to filter out tests, why do you want to run tests that are filtered out? In addition, this is not supported by CTest either. If I'm understanding this issue correctly, I'd suggest you have two presets. The first one contains all the configs and doesn't have any filters, and the second one inherits the first one and has filters. Then you'll able to use the first preset when trying to run any tests that are listed. |
I don't want to constantly switch presets just because I want to run one test. But also this
If I want to run a single test through the test explorer, then why are the options from the current preset used? The options from the current preset might be completely inappropriate for the single test run. |
If you are inheriting the test preset, then you can just use the base preset, and don't need to constantly switching them. Unless you have different settings for each test, in which case, unfortunately, I don't think there's a good way not switching presets.
As you said, this is why you shouldn't allow a preset include those tests that don't use the settings in this preset. Because otherwise we can't know what settings we should use for each test. |
What do you think about not specifying any options when running a single test through the test explorer? |
Then don't specify any options in your test preset? You can also use the default preset, which doesn't add anything. But we don't do this by default. as you already implied in your earlier comments, some tests require additional settings. In another word, we chose to always list and run test under the selected test preset by default, since this is more generic. I think this is also what you asked in #3151. |
This issue is actually somewhat complex, and the root cause is that our design should only be displaying tests defined by the test preset in the Text Explorer. Currently, this is not working correctly and thus you're seeing tests in the Text Explorer that you shouldn't. Therefore, this is likely more of a feature request, to be able to see all tests in the Text Explorer, even those that aren't defined by a test preset. Marking this as a feature request and we moved it to the 1.16 milestone. |
Brief Issue Summary
I have an active selected test preset that filters out a couple of tests. Now I want to run a single test through the test explorer, that is not part of the test preset. But the extension executes ctest by passing the filter from the selected test preset, and so the result is that ctest can't find the test.
Running an individual test through the test explorer should not use any options/flags of the currently selected test preset.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: