WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
142085
W3C test importer should use filesystem instead of os.walk
https://bugs.webkit.org/show_bug.cgi?id=142085
Summary
W3C test importer should use filesystem instead of os.walk
youenn fablet
Reported
2015-02-27 07:16:56 PST
W3C test importer uses os.walk, while it should use filesystem for that.
Attachments
Patch
(7.69 KB, patch)
2015-02-27 07:45 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-mavericks-wk2
(712.98 KB, application/zip)
2015-03-02 01:10 PST
,
Build Bot
no flags
Details
Adding unit tests
(10.50 KB, patch)
2015-03-03 00:31 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2015-02-27 07:45:09 PST
Created
attachment 247514
[details]
Patch
Build Bot
Comment 2
2015-03-02 01:10:47 PST
Comment on
attachment 247514
[details]
Patch
Attachment 247514
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/4770151262060544
New failing tests: fast/css/object-fit/object-fit-canvas.html
Build Bot
Comment 3
2015-03-02 01:10:49 PST
Created
attachment 247656
[details]
Archive of layout-test-results from ews106 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
youenn fablet
Comment 4
2015-03-02 04:43:32 PST
(In reply to
comment #2
)
> Comment on
attachment 247514
[details]
> Patch > >
Attachment 247514
[details]
did not pass mac-wk2-ews (mac-wk2): > Output:
http://webkit-queues.appspot.com/results/4770151262060544
> > New failing tests: > fast/css/object-fit/object-fit-canvas.html
Putting r?/cq as this patch should have no impact on this particular test.
Bem Jones-Bey
Comment 5
2015-03-02 10:43:01 PST
Comment on
attachment 247514
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=247514&action=review
> Tools/Scripts/webkitpy/common/system/filesystem.py:80 > + def dirs_under(self, path, dir_filter=None):
It would be nice to have a unit test for this.
> Tools/Scripts/webkitpy/common/system/filesystem.py:93 > + for (dirpath, dirnames, filenames) in os.walk(path):
If you wrap os.walk in a method (like _os_walk), then you only have to mock that method instead of copying this entire method into the MockFileSystem. Also, you'll be able to write unit tests for this method.
> Tools/Scripts/webkitpy/common/system/filesystem_mock.py:179 > + def getsize(self, path): > + if not self.isfile(path): > + raise OSError("%s is not a directory" % path) > + return len(self.files[path])
Why did you add this?
youenn fablet
Comment 6
2015-03-02 11:46:10 PST
(In reply to
comment #5
)
> Comment on
attachment 247514
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=247514&action=review
> > > Tools/Scripts/webkitpy/common/system/filesystem.py:80 > > + def dirs_under(self, path, dir_filter=None): > > It would be nice to have a unit test for this.
Ok
> > Tools/Scripts/webkitpy/common/system/filesystem.py:93 > > + for (dirpath, dirnames, filenames) in os.walk(path): > > If you wrap os.walk in a method (like _os_walk), then you only have to mock > that method instead of copying this entire method into the MockFileSystem. > Also, you'll be able to write unit tests for this method.
I am not sure to understand. MockFileSystem is totally independent of FileSystem. We need to add MockFileSystem.dirs_under anyway.
> > Tools/Scripts/webkitpy/common/system/filesystem_mock.py:179 > > + def getsize(self, path): > > + if not self.isfile(path): > > + raise OSError("%s is not a directory" % path) > > + return len(self.files[path]) > > Why did you add this?
It is needed to run the unit test as it is used in TestImporter. Rereading it, there is obviously a typo in the exception description.
youenn fablet
Comment 7
2015-03-03 00:31:30 PST
Created
attachment 247753
[details]
Adding unit tests
Bem Jones-Bey
Comment 8
2015-03-04 12:10:01 PST
Comment on
attachment 247753
[details]
Adding unit tests Looks good. r=me.
WebKit Commit Bot
Comment 9
2015-03-04 13:02:57 PST
Comment on
attachment 247753
[details]
Adding unit tests Clearing flags on attachment: 247753 Committed
r181014
: <
http://trac.webkit.org/changeset/181014
>
WebKit Commit Bot
Comment 10
2015-03-04 13:03:02 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug