Skip to content
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

loader: add option to not fail if no tests are discovered #36

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

gousteris
Copy link

@gousteris gousteris commented Oct 17, 2024

This PR:

adds argparse option to instract ducktape how to treat the scenario where no tests are loaded. By enabling this flag, instead of raising an exception, it allows having an empty list of tests. This produces empty ducktape reports

Default value relies on an environment variable DUCKTAPE_ALLOW_EMPTY_TESTS_LIST to be backwards compatible, for stable redpanda releases that may not use the updated ref of ducktape.

tried in redpanda-data/redpanda#23825 & https://github.com/redpanda-data/vtools/pull/3233 given a test that has a @skip-debug-mode decorator. Before, ducktape in debug builds raised an exception No tests to run. Now it logs a warning and proceeds with an empty list of tests.

This is already the case using ducktape subsets. Assuming 5 subsets should run tests.test1.py::TestClass.test_method
Ducktape will assign this test to the subset 0 and all other subsets won't run any test and they'll produce empty reports without failing.

Copy link
Author

@gousteris gousteris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gousteris gousteris force-pushed the DEVPROD-2200 branch 4 times, most recently from 3882976 to 0c1ab58 Compare October 17, 2024 16:51
@gousteris gousteris requested a review from ivotron October 18, 2024 14:58
@gousteris gousteris changed the title loader: dont fail if no tests are discovered loader: add option to not fail if no tests are discovered Oct 18, 2024
@gousteris gousteris merged commit 78b65e1 into 0.11.x-redpanda Oct 18, 2024
3 checks passed
@gousteris gousteris deleted the DEVPROD-2200 branch October 18, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants