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

DAOS-16834 test: tags.py config option #15983

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

phender
Copy link
Contributor

@phender phender commented Feb 26, 2025

Add config command line option to tags.py to list test yaml data.

Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

daltonbohning and others added 7 commits January 8, 2025 22:53
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]>
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Dalton Bohning <[email protected]>
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Dalton Bohning <[email protected]>
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Dalton Bohning <[email protected]>
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Dalton Bohning <[email protected]>
Add data command line option to tags.py to list test yaml data.

Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
@phender phender requested review from a team as code owners February 26, 2025 15:43
Copy link

Ticket title is 'Support running existing tests in MD on SSD stages with two pool variants'
Status is 'In Progress'
Labels: 'md_on_ssd2'
https://daosio.atlassian.net/browse/DAOS-16834

Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
Comment on lines 742 to 744
elif "weekly_regression" in tags:
return "weekly"
return "manual"
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably should check if manual is in tags first so this function doesn't make unnecessary assumptions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks.

Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
"-v", "--verbose",
action='store_true',
help="print verbose output")

args = parser.parse_args()
args.paths = list(map(os.path.realpath, args.paths))
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't work now with the subparsers that don't have paths. E.g.

./src/tests/ftest/tags.py unit
Traceback (most recent call last):
  File "/home/dbohning/daos-stack/daos/./src/tests/ftest/tags.py", line 959, in <module>
    sys.exit(main())
  File "/home/dbohning/daos-stack/daos/./src/tests/ftest/tags.py", line 933, in main
    args.paths = list(map(os.path.realpath, args.paths))
AttributeError: 'Namespace' object has no attribute 'paths'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, right. I meant to make that conditional.

Test-tag: always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
Base automatically changed from dbohning/daos-15630 to master February 27, 2025 19:18
@daltonbohning
Copy link
Contributor

You'll want to merge in master now that mine is merged

@phender phender changed the title DAOS-16834 test: tags.py data option DAOS-16834 test: tags.py config option Feb 27, 2025
Test-tag: test_always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
@phender phender requested a review from shimizukko February 27, 2025 22:25
shimizukko
shimizukko previously approved these changes Feb 28, 2025
ftest python files.
list (set, optional): list of sets of tags used to filter displayed tests. Defaults to no
filtering.
list (set, optional): list of sets of test yaml data keys to display. Defaults to None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
list (set, optional): list of sets of test yaml data keys to display. Defaults to None,
keys (set, optional): list of sets of test yaml data keys to display. Defaults to None,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.

Test-tag: test_always_passes
Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <[email protected]>
@phender phender requested a review from daltonbohning March 1, 2025 05:26
Returns:
list: values found for the key
"""
self.__display(f"__filter_value: key_path={key_path}, key_types={key_types}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to not leave this debug here. Especially since it requires a helper method + new argument in init. This is only ever needed if there is a bug. And to guard against bugs its better to have unit tests than debug printouts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants