Skip to content

[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

Merged
merged 9 commits into from
Jul 22, 2025
Merged

Conversation

GregoryComer
Copy link
Member

@GregoryComer GregoryComer commented Jul 18, 2025

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.

[ghstack-poisoned]
[ghstack-poisoned]
@GregoryComer GregoryComer requested a review from cccclai as a code owner July 18, 2025 00:40
Copy link

pytorch-bot bot commented Jul 18, 2025

🔗 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 SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

⏳ No Failures, 9 Pending

As of commit b35e7b1 with merge base d5a7f33 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 18, 2025
GregoryComer added a commit that referenced this pull request Jul 18, 2025
ghstack-source-id: d1cffc5
ghstack-comment-id: 3086102148
Pull-Request: #12625
@GregoryComer GregoryComer requested a review from digantdesai July 18, 2025 00:41
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(
Copy link
Contributor

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

Copy link
Member Author

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.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Base automatically changed from gh/GregoryComer/77/head to main July 22, 2025 21:52
[ghstack-poisoned]
@GregoryComer GregoryComer added the release notes: none Do not include this in the release notes label Jul 22, 2025
@GregoryComer GregoryComer merged commit 727937e into main Jul 22, 2025
100 checks passed
@GregoryComer GregoryComer deleted the gh/GregoryComer/78/head branch July 22, 2025 23:47
Conarnar pushed a commit to Conarnar/executorch that referenced this pull request Jul 25, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants