-
Notifications
You must be signed in to change notification settings - Fork 306
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
DAOS-15630 test: tags.py dump tests associated with tags #15705
base: master
Are you sure you want to change the base?
Conversation
Ticket title is 'ftest tag utility: ability to dump tests associated with tags' |
61dc6ef
to
555720b
Compare
Add support in tags.py to dump tests associated with tags and/or paths. Add TagSet to handle negative matching. E.g. foo,-bar Test-tag: always_passes Skip-unit-tests: true Skip-fault-injection-test: true Signed-off-by: Dalton Bohning <[email protected]>
555720b
to
32d4359
Compare
# Convert to TagSet to handle negative matching | ||
for idx, _tags in enumerate(tags): | ||
tags[idx] = TagSet(_tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered using TagSet in the class itself so it's used everywhere, but we only really need negative matching for the user facing tools. And it does add a slight noticeable overhead to set operations, so I didn't want to slow down the core code
@@ -470,14 +506,56 @@ def read_tag_config(): | |||
return config | |||
|
|||
|
|||
def run_list(paths): | |||
def run_list(paths=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function only prints tags, so it seemed strange to filter on tags
|
||
if args.command == "dump": | ||
run_dump(args.paths) | ||
sys.exit(0) | ||
return run_dump(args.paths, args.tags) | ||
|
||
if args.command == "list": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I should put a check here
if args.tags:
print("--tags not supported with lint")
return 1
def issuperset(self, other): | ||
return TagSet(other).issubset(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is technically faster
def issuperset(self, other): | |
return TagSet(other).issubset(self) | |
def issuperset(self, other): | |
return TagSet.issubset(other, self) |
Add support in tags.py to dump tests associated with tags and/or paths. Add TagSet to handle negative matching. E.g. foo,-bar
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true
Before requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: