-
Notifications
You must be signed in to change notification settings - Fork 630
[Backend Tester] Add test name filter #12625
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
Conversation
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12625
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 9 PendingAs of commit b35e7b1 with merge base d5a7f33 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
if test_filter.backends is not None and flow.backend not in test_filter.backends: | ||
return False | ||
|
||
if test_filter.name_regex is not None and not test_filter.name_regex.search( |
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.
Feels like we are reimplementing features from unittest or pytest :p
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.
Yeah, I've tried to avoid this, but unfortunately, it doesn't look like the unittest package structure is very extensible in the way I need. There aren't a lot of hooks to control reporting / filtering / discovery without writing custom driver code. I'm open to suggestions, but this seemed to be the lowest friction path with unittest. Switching to pytest might be an option, but I'm hoping that I don't need to do much more non-differentiated work like this.
Add a --filter argument to the test runner. Minor refactoring on the discovery logic. You can now run `python -m executorch.backends.test.suite.runner operators --backend xnnpack --filter add`, for example.
Add a --filter argument to the test runner. Minor refactoring on the discovery logic.
You can now run
python -m executorch.backends.test.suite.runner operators --backend xnnpack --filter add
, for example.