зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #12313 - test-tidy command now ignores files in subdirectories of ignored dirs (from cynicaldevil:tidy-test); r=Wafflespeanut
<!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12225 . I did not add a test for this, instead I added a directory with an empty file inside the ignored directory, and checked whether this file was being ignored or not. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 9c00331634c2c753637a873f600b9804e6145e62 --HG-- rename : servo/python/tidy/servo_tidy_tests/test_ignored/whee/test.rs => servo/python/tidy/servo_tidy_tests/test_ignored/whee/foo/bar.rs
This commit is contained in:
Родитель
934f66e8db
Коммит
3a6c4f6d6d
|
@ -636,7 +636,7 @@ def get_file_list(directory, only_changed_files=False, exclude_dirs=[]):
|
|||
args = ["git", "ls-files", "--others", "--exclude-standard", directory]
|
||||
file_list += subprocess.check_output(args)
|
||||
for f in file_list.splitlines():
|
||||
if os.path.join('.', os.path.dirname(f)) not in exclude_dirs:
|
||||
if not any(os.path.join('.', os.path.dirname(f)).startswith(path) for path in exclude_dirs):
|
||||
yield os.path.join('.', f)
|
||||
elif exclude_dirs:
|
||||
for root, dirs, files in os.walk(directory, topdown=True):
|
||||
|
|
Загрузка…
Ссылка в новой задаче