loader: add option to not fail if no tests are discovered #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 exceptionNo 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 runtests.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.