Feature/only case insensitive#1621
Open
RuTh-git wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Python toolchain’s ./mfc.sh test --only <label> filtering so test labels are matched case-insensitively, reducing user friction given inconsistent label capitalization across the suite.
Changes:
- Make
--onlylabel matching case-insensitive by normalizing comparisons to lowercase. - Preserve existing UUID filtering behavior while adjusting label filtering logic.
| check.add(case.get_uuid()) | ||
|
|
||
| label_ok = all(label in check for label in labels) if labels else True | ||
| label_ok = all(label.lower() in {c.lower() for c in check} for label in labels) if labels else True |
| check.add(case.get_uuid()) | ||
|
|
||
| label_ok = all(label in check for label in labels) if labels else True | ||
| label_ok = all(label.lower() in {c.lower() for c in check} for label in labels) if labels else True |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1621 +/- ##
==========================================
- Coverage 60.63% 60.39% -0.25%
==========================================
Files 73 83 +10
Lines 20219 19854 -365
Branches 2937 2955 +18
==========================================
- Hits 12259 11990 -269
+ Misses 5972 5863 -109
- Partials 1988 2001 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
--onlyflag in./mfc.sh test --only <label>performed a case-sensitivestring comparison against test labels. Since MFC's test labels follow no
consistent capitalization convention (e.g.
STL,slip,Sphere), users hadto remember the exact casing of every label to filter tests correctly. This PR
normalizes the label comparison to lowercase so any casing works.
Closes #1533.
Type of change (delete unused ones)
Testing
Manually verified the fix by running the following before and after the change:
./mfc.sh test --only stl -j 1→ previously failed with "matched zero testcases", now passes
./mfc.sh test --only STL -j 1→ passes (unchanged)./mfc.sh test --only Stl -j 1→ previously failed, now passesruff check toolchain/mfc/test/test.py→ all style checks passedChecklist