Skip to content

Skip compilation when no tests match filter#1191

Open
robindust-ce wants to merge 2 commits intoVUnit:masterfrom
robindust-ce:feature/skip-compilation-no-matching-tests
Open

Skip compilation when no tests match filter#1191
robindust-ce wants to merge 2 commits intoVUnit:masterfrom
robindust-ce:feature/skip-compilation-no-matching-tests

Conversation

@robindust-ce
Copy link
Copy Markdown

Suggestion for #1157

Compilation is skipped when no tests match the active filters (e.g. --with-attributes), avoiding unnecessary work when no tests would run.

@LarsAsplund
Copy link
Copy Markdown
Collaborator

I see what your coming from but I think automatically skipping compilation when there are no matching tests would undermine the purpose of the -m flag. The fact that the -m flag doesn't prevent compilation when the test list is empty is the real problem. One could argue that the -m flag should be default. Why compile anything that isn't needed for running the tests passing the filters? We've chosen the fail fast approach, i.e. if there are syntactic errors we should expose those ASAP. For those that prefer having -m as the default, it is always possible to enforce that in the run script.

To fix the current issue with the -m flag, I think the or expression on this line should be replaced by:

target_files if target_files is not None else self.get_source_files_in_order()

Makes sense?

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