WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160833
Allow a port to run tests with a custom device setup
https://bugs.webkit.org/show_bug.cgi?id=160833
Summary
Allow a port to run tests with a custom device setup
Simon Fraser (smfr)
Reported
2016-08-12 16:59:51 PDT
Allow a port to run tests with a custom device setup
Attachments
Patch
(26.13 KB, patch)
2016-08-12 17:10 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(27.29 KB, patch)
2016-08-12 18:03 PDT
,
Simon Fraser (smfr)
dbates
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2016-08-12 17:10:05 PDT
Created
attachment 285982
[details]
Patch
Simon Fraser (smfr)
Comment 2
2016-08-12 18:03:48 PDT
Created
attachment 285988
[details]
Patch
Daniel Bates
Comment 3
2016-08-15 11:00:02 PDT
Comment on
attachment 285988
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=285988&action=review
It would be good if we had more test coverage for the changes. The changes look sane.
> Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:106 > + def _custom_device_for_test(self, test): > + for device_class in self._port.CUSTOM_DEVICE_CLASSES: > + directory_suffix = device_class + self._port.TEST_PATH_SEPARATOR > + if directory_suffix in test: > + return device_class > + return None
We could add a test for this function in manager_unittest.py.
> Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:220 > + _log.debug('%s tests use device %s', len(custom_device_tests[device_class]), device_class)
Nit: I know this is a debug logging. We could use pluralize() here to emit "test" or "tests".
> Tools/Scripts/webkitpy/port/driver.py:56 > + return "DriverInput(test_name='%s', timeout=%s, image_hash=%s, should_run_pixel_test=%s'" % (self.test_name, self.timeout, self.image_hash, self.should_run_pixel_test)
Nit: I believe we prefer using String.format() instead of the % operator towards making this code compatible with Python 3. I'm unclear of the status of our effort.
> Tools/Scripts/webkitpy/port/ios.py:89 > + 'ipad': 'iPad Air'},
For your consideration, I suggest we put the "}," on its on own line. This has the benefit that when appending a new device type to the end of this dictionary that we do not need to modify this line.
> Tools/Scripts/webkitpy/port/ios.py:92 > + 'ipad': 'iPad Retina'},
Ditto.
> Tools/Scripts/webkitpy/port/port_testcase.py:254 > + print port
Did you intend to add this line?
Simon Fraser (smfr)
Comment 4
2016-08-15 13:54:19 PDT
https://trac.webkit.org/r204477
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