-
Notifications
You must be signed in to change notification settings - Fork 29
[uss_qualifier] Add filter option when running tests #1305
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
base: main
Are you sure you want to change the base?
Conversation
|
A key feature of uss_qualifier is that the test configuration fully determines the test behavior. This is important because we generate test reports with identifiers describing what happened in the test, and those identifiers are computed as hashes of the test configuration. This option would change test behavior but not change those identifiers which would be problematic. Instead, portions of a test configuration can be selectively executed using execution control; for example, in uspace_f3548. |
The goal here it mostly to debug test configuration / tests, rather than having to maintain copy/references of tests in specific tests config, and only for those cases. I see then as a different case that having a different configuration. If the usage of the option would change identifiers, similar to the 'dirty' flag when there are uncommitted git changes , would that be acceptable or should we close that PR? I still think the option can ease development, because currently I mostly do mass comment/uncomment in configuration files :) |
This is the intended objective of the execution control functionality -- instead of temporarily adding a command line flag (presumably run_locally.sh is still being used because it provides a lot of necessary command line options for the actual execution:
include_action_when:
- is_action_generator: {}
- is_test_suite: {}
- is_test_scenario:
types: [scenarios.astm.utm.nominal_planning.conflict_higher_priority.ConflictHigherPriority]I think it would be totally reasonable to enable a particular use case with less friction, with something like: execution:
exclude_action_when:
- is_test_scenario: {}
regex_does_not_match_type: Conflictor execution:
exclude_action_when:
- is_test_scenario
except_when:
regex_matches_type: Conflictor execution:
include_action_when:
- enables_running_scenario:
regex_matches_type: Conflictuspace_f3548 is defined as a persistent separate configuration because running just the F3548 parts of the U-space configuration is a common use case and it is useful to have a demonstration of the execution control functionality.
Could you elaborate on why you mass comment/uncomment rather than using the execution control functionality? |
|
Per Tuesday discussion, I think I'm expecting adjustments which:
I think those are the only major constraints I have in mind, and the current PR content already meets 2 & 3. |
016ab3b to
172c0d9
Compare
|
I updated the PR with the filter now stored in the ¹ Remark / question: the environment identified is not modified, but if I understand correctly how signatures are computed, the environment is not linked to things executed, correct? |
172c0d9 to
8ce0de7
Compare
When developing / debugging the application, we usually want to run a specific test (or subset of tests), but in the context of existing configuration set.
I usually used the approach of 'commenting unwanted tests' in yml configuration files, but that can be tedious, especially since they reference them self.
This PR propose to add a new option,
--filter, that, if used, will apply a regex on the test scenario ran.Eg. to run ConflictEqualPriorityNotPermitted,
--filter ConflictEqualPriorityNotPermittedcan be used. Or to run the two conflicts tests,--filter ConflictEqualPriorityNotPermitted\|ConflictHigherPriority(or just--filter Conflictin that case).