| Summary: | The support directory shouldn't be skipped unconditionally in test import | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Bem Jones-Bey <bjonesbe> | ||||||||
| Component: | Tools / Tests | Assignee: | Bem Jones-Bey <bjonesbe> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | commit-queue, dpranke, glenn, rhauck, rniwa | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Bem Jones-Bey
2014-08-06 10:57:26 PDT
Created attachment 236116 [details]
Patch
Comment on attachment 236116 [details]
Patch
I want to make a better solution.
Created attachment 236163 [details]
Patch
Comment on attachment 236163 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236163&action=review > Tools/ChangeLog:12 > + '.'. Please put this in the previous line. It's so awkward to start a new line with '.'. > Tools/Scripts/webkitpy/w3c/test_importer.py:175 > + should_skip = (subdir.startswith('.') or (root == self.source_directory and subdir in DIRS_TO_SKIP)) We don't need the outer parenthesis. > Tools/Scripts/webkitpy/w3c/test_importer.py:186 > + dirs[:] = [subdir for subdir in dirs if self.should_keep_subdir(root, subdir)] why not just dirs = ? Comment on attachment 236163 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236163&action=review Thanks for the review! >> Tools/ChangeLog:12 >> + '.'. > > Please put this in the previous line. > It's so awkward to start a new line with '.'. ok. >> Tools/Scripts/webkitpy/w3c/test_importer.py:175 >> + should_skip = (subdir.startswith('.') or (root == self.source_directory and subdir in DIRS_TO_SKIP)) > > We don't need the outer parenthesis. ok. >> Tools/Scripts/webkitpy/w3c/test_importer.py:186 >> + dirs[:] = [subdir for subdir in dirs if self.should_keep_subdir(root, subdir)] > > why not just dirs = ? Because the API for os.walk is strange, and dirs is a special variable. If you want to exclude directories from the walk, you need to modify dirs in place. Created attachment 236189 [details]
Patch for landing
Comment on attachment 236189 [details] Patch for landing Clearing flags on attachment: 236189 Committed r172214: <http://trac.webkit.org/changeset/172214> All reviewed patches have been landed. Closing bug. |