Skip to content

Commit a9ba6e0

Browse files
committed
test(ut): support excluding specific test files from discovery
1 parent 195c866 commit a9ba6e0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/run_unit_tests.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,20 @@ def get_all_unit_tests():
2020
cur_dir = "./tests"
2121
unit_tests = {}
2222

23+
EXCLUDE_UNIT_TESTS = [
24+
"tests/unit_tests/megatron/cco/test_tp_overlap.py",
25+
]
26+
2327
for root, dirs, files in os.walk(cur_dir):
2428
for file_name in files:
2529
if not file_name.endswith(".py") or not file_name.startswith("test_"):
2630
continue
2731

32+
# Construct relative path from tests/
33+
rel_path = os.path.relpath(os.path.join(root, file_name), start=cur_dir)
34+
if rel_path in EXCLUDE_UNIT_TESTS:
35+
continue
36+
2837
if file_name not in DISTRIBUTED_UNIT_TESTS:
2938
unit_tests[os.path.join(root, file_name)] = 1
3039
else:

0 commit comments

Comments
 (0)