Feature/only case insensitive#1621
Conversation
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:
|
|
@RuTh-git copilot flagged meaningful problems with this PR. |
|
Ooh, I look forward to this being merged. The copilot review on this seems correct that it may be worth just pre-generating a |
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