| 696 | |
| 697 | |
| 698 | def FindTestFiles(ext, filter_pattern_re, exclude_dirs): |
| 699 | tests = [] |
| 700 | for root, dirs, files in os.walk(TEST_DIR): |
| 701 | for ex in exclude_dirs: |
| 702 | if ex in dirs: |
| 703 | # Filtering out dirs here causes os.walk not to descend into them |
| 704 | dirs.remove(ex) |
| 705 | for f in files: |
| 706 | path = os.path.join(root, f) |
| 707 | if os.path.splitext(f)[1] == ext: |
| 708 | tests.append(os.path.relpath(path, REPO_ROOT_DIR)) |
| 709 | tests.sort() |
| 710 | return [test for test in tests if re.match(filter_pattern_re, test)] |
| 711 | |
| 712 | |
| 713 | def GetAllTestInfo(test_names, status): |