Skip to content

Commit f3bab46

Browse files
sbryngelsonclaude
andcommitted
Gitignore failed_uuids.txt, restore AND semantics for --only labels
- Add /tests/failed_uuids.txt to .gitignore so local test failures don't pollute git status - Detect whether --only tokens are UUIDs (8-char hex) or trace labels: UUIDs use OR (any match), labels use AND (all must match). This preserves the documented behavior of --only 2D Bubbles while supporting the CI retry path --only UUID1 UUID2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cb7b111 commit f3bab46

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ docs/documentation/parameters.md
3434
/tests/*/**
3535
!/tests/*/golden.txt
3636
!/tests/*/golden-metadata.txt
37+
/tests/failed_uuids.txt
3738

3839
# NVIDIA Nsight Compute
3940
*.nsys-rep

toolchain/mfc/test/test.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
class TestTimeoutError(MFCException):
4343
pass
4444

45-
# pylint: disable=too-many-branches, trailing-whitespace
45+
# pylint: disable=too-many-branches, too-many-locals, too-many-statements, trailing-whitespace
4646
def __filter(cases_) -> typing.List[TestCase]:
4747
cases = cases_[:]
4848
selected_cases = []
@@ -66,12 +66,19 @@ def __filter(cases_) -> typing.List[TestCase]:
6666
raise MFCException("Testing: Your specified range [--from,--to] is incorrect. Please ensure both IDs exist and are in the correct order.")
6767

6868
if len(ARG("only")) > 0:
69+
# UUIDs are 8-char hex (CRC32): use OR so --only UUID1 UUID2 selects
70+
# any matching test. Labels use AND so --only 2D Bubbles selects both.
71+
_uuid_mode = all(len(t) == 8 and t.isalnum() and not t.isalpha() for t in ARG("only"))
6972
for case in cases[:]:
7073
case: TestCase
7174

7275
checkCase = case.trace.split(" -> ")
7376
checkCase.append(case.get_uuid())
74-
if not set(ARG("only")).intersection(set(checkCase)):
77+
if _uuid_mode:
78+
if not set(ARG("only")).intersection(set(checkCase)):
79+
cases.remove(case)
80+
skipped_cases.append(case)
81+
elif not set(ARG("only")).issubset(set(checkCase)):
7582
cases.remove(case)
7683
skipped_cases.append(case)
7784

0 commit comments

Comments
 (0)