Diff
Modified: trunk/Tools/ChangeLog (134373 => 134374)
--- trunk/Tools/ChangeLog 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/ChangeLog 2012-11-13 07:37:30 UTC (rev 134374)
@@ -1,5 +1,53 @@
2012-11-12 Dirk Pranke <[email protected]>
+ webkitpy: clean up lint errors, part 1
+ https://bugs.webkit.org/show_bug.cgi?id=102024
+
+ Reviewed by Adam Barth.
+
+ This patch cleans up a lot of miscellaneous minor lint errors that
+ apparently aren't caught by unit tests, and suppresses a few
+ false positives.
+
+ Also, this patch removes the garden-o-matic "rollout" entry point
+ since it's no longer being used by the frontend (rather than
+ fix it to not generate lint errors).
+
+ * Scripts/webkitpy/common/system/executive_mock.py:
+ (MockExecutive2.run_command):
+ * Scripts/webkitpy/common/system/filesystem_mock.py:
+ (MockFileSystem.copyfile):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._http_tests):
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.reference_files):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver._teardown_performance):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.TestAndroidPort.__init__):
+ (ChromiumPortTestCase.test_default_configuration):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase):
+ (PortTestCase.test_driver_cmd_line):
+ (PortTestCase.test_expectations_ordering):
+ * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
+ (HttpServerBase._check_that_all_ports_are_available):
+ * Scripts/webkitpy/style/checkers/python.py:
+ (Pylinter):
+ * Scripts/webkitpy/tool/commands/gardenomatic.py:
+ (GardenOMatic.__init__):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (CommitQueue):
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPRequestHandler):
+ (GardeningHTTPRequestHandler.localresult):
+
+2012-11-12 Dirk Pranke <[email protected]>
+
webkitpy: clean up lint errors, part 2
https://bugs.webkit.org/show_bug.cgi?id=102029
Modified: trunk/Tools/Scripts/webkitpy/common/system/executive_mock.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/common/system/executive_mock.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive_mock.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -168,7 +168,7 @@
self.calls.append(args)
assert(isinstance(args, list) or isinstance(args, tuple))
if self._exception:
- raise self._exception
+ raise self._exception # pylint: disable-msg=E0702
if self._run_command_fn:
return self._run_command_fn(args)
if return_exit_code:
Modified: trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -108,9 +108,9 @@
if not self.exists(source):
self._raise_not_found(source)
if self.isdir(source):
- raise IOError(errno.EISDIR, source, os.strerror(errno.ISDIR))
+ raise IOError(errno.EISDIR, source, os.strerror(errno.EISDIR))
if self.isdir(destination):
- raise IOError(errno.EISDIR, destination, os.strerror(errno.ISDIR))
+ raise IOError(errno.EISDIR, destination, os.strerror(errno.EISDIR))
if not self.exists(self.dirname(destination)):
raise IOError(errno.ENOENT, destination, os.strerror(errno.ENOENT))
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -300,9 +300,6 @@
def _http_tests(self):
return set(test for test in self._test_names if self._is_http_test(test))
- def _websocket_tests(self):
- return set(test for test in self._test_files if self._is_websocket(test))
-
def _is_perf_test(self, test):
return self.PERF_SUBDIR == test or (self.PERF_SUBDIR + self._port.TEST_PATH_SEPARATOR) in test
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -49,6 +49,10 @@
# It's possible that Apple would want to fix this code to work better with those results.
FUTURE_VERSION = 'future' # FIXME: This whole 'future' thing feels like a hack.
+ # overridden in subclasses
+ VERSION_FALLBACK_ORDER = []
+ ARCHITECTURES = []
+
@classmethod
def determine_full_port_name(cls, host, options, port_name):
# If the port_name matches the (badly named) cls.port_name, that
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -571,7 +571,7 @@
reftest_list.append((expectation, path))
return reftest_list
- return reftest_list.get(self._filesystem.join(self.layout_tests_dir(), test_name), [])
+ return reftest_list.get(self._filesystem.join(self.layout_tests_dir(), test_name), []) # pylint: disable-msg=E1103
def tests(self, paths):
"""Return the list of tests found. Both generic and platform-specific tests matching paths should be returned."""
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -77,6 +77,9 @@
DEFAULT_BUILD_DIRECTORIES = ('out',)
+ # overridden in subclasses.
+ FALLBACK_PATHS = {}
+
@classmethod
def _static_build_path(cls, filesystem, build_directory, chromium_base, webkit_base, configuration, comps):
if build_directory:
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -489,10 +489,6 @@
self._run_adb_command(['shell', 'echo', original_content, '>', file])
self._original_governors = {}
- def _command_wrapper(cls, wrapper_option):
- # Ignore command wrapper which is not applicable on Android.
- return []
-
def _get_crash_log(self, stdout, stderr, newer_than):
if not stdout:
stdout = ''
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -103,7 +103,7 @@
class TestAndroidPort(chromium_android.ChromiumAndroidPort):
def __init__(self, options=None):
options = options or MockOptions()
- chromium_win.ChromiumAndroidPort.__init__(self, MockSystemHost(os_name='android', os_version='icecreamsandwich'), 'chromium-android', options=options)
+ chromium_android.ChromiumAndroidPort.__init__(self, MockSystemHost(os_name='android', os_version='icecreamsandwich'), 'chromium-android', options=options)
def default_configuration(self):
self.default_configuration_called = True
@@ -130,12 +130,12 @@
def test_default_configuration(self):
mock_options = MockOptions()
port = ChromiumPortTestCase.TestLinuxPort(options=mock_options)
- self.assertEquals(mock_options.configuration, 'default')
+ self.assertEquals(mock_options.configuration, 'default') # pylint: disable-msg=E1101
self.assertTrue(port.default_configuration_called)
mock_options = MockOptions(configuration=None)
port = ChromiumPortTestCase.TestLinuxPort(mock_options)
- self.assertEquals(mock_options.configuration, 'default')
+ self.assertEquals(mock_options.configuration, 'default') # pylint: disable-msg=E1101
self.assertTrue(port.default_configuration_called)
def test_diff_image(self):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -81,6 +81,7 @@
os_name = None
os_version = None
port_maker = TestWebKitPort
+ port_name = None
def make_port(self, host=None, port_name=None, options=None, os_name=None, os_version=None, config=None, **kwargs):
host = host or MockSystemHost(os_name=(os_name or self.os_name), os_version=(os_version or self.os_version))
@@ -114,9 +115,6 @@
self.assertTrue('--foo=bar' in cmd_line)
self.assertTrue('--foo=baz' in cmd_line)
- def test_expectations_files(self):
- self.assertNotEquals(self.make_port().expectations_files(), [])
-
def test_uses_apache(self):
self.assertTrue(self.make_port()._uses_apache())
@@ -435,7 +433,7 @@
port._filesystem.write_text_file('/tmp/foo', 'foo')
port._filesystem.write_text_file('/tmp/bar', 'bar')
ordered_dict = port.expectations_dict()
- self.assertEquals(ordered_dict.keys()[-2:], options.additional_expectations)
+ self.assertEquals(ordered_dict.keys()[-2:], options.additional_expectations) # pylint: disable-msg=E1101
self.assertEquals(ordered_dict.values()[-2:], ['foo', 'bar'])
def test_path_to_test_expectations_file(self):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -194,7 +194,7 @@
except IOError, e:
if e.errno in (errno.EALREADY, errno.EADDRINUSE):
raise ServerError('Port %d is already in use.' % port)
- elif sys.platform == 'win32' and e.errno in (errno.WSAEACCES,):
+ elif sys.platform == 'win32' and e.errno in (errno.WSAEACCES,): # pylint: disable-msg=E1101
raise ServerError('Port %d is already in use.' % port)
else:
raise
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/python.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/style/checkers/python.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/python.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -89,6 +89,7 @@
# FIXME: Does it make sense to combine these rules with the rules in style/checker.py somehow?
FALSE_POSITIVES = [
# possibly http://www.logilab.org/ticket/98613 ?
+ "Instance of 'Popen' has no 'poll' member",
"Instance of 'Popen' has no 'returncode' member",
"Instance of 'Popen' has no 'stdin' member",
"Instance of 'Popen' has no 'stdout' member",
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -32,7 +32,7 @@
help_text = "Command for gardening the WebKit tree."
def __init__(self):
- return super(AbstractRebaseliningCommand, self).__init__(options=(self.platform_options + [
+ super(GardenOMatic, self).__init__(options=(self.platform_options + [
self.move_overwritten_baselines_option,
self.results_directory_option,
self.no_optimize_option,
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queues.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/tool/commands/queues.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queues.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -4,7 +4,7 @@
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -352,6 +352,7 @@
# StepSequenceErrorHandler methods
+ @classmethod
def handle_script_error(cls, tool, state, script_error):
# Hitting this error handler should be pretty rare. It does occur,
# however, when a patch no longer applies to top-of-tree in the final
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py (134373 => 134374)
--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2012-11-13 07:35:18 UTC (rev 134373)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2012-11-13 07:37:30 UTC (rev 134374)
@@ -83,18 +83,6 @@
allow_cross_origin_requests = True
debug_output = ''
- def rollout(self):
- revision = self.query['revision'][0]
- reason = self.query['reason'][0]
- self._run_webkit_patch([
- 'rollout',
- '--force-clean',
- '--non-interactive',
- revision,
- reason,
- ])
- self._serve_text('success')
-
def ping(self):
self._serve_text('pong')
@@ -139,4 +127,4 @@
self._serve_file(fullpath, headers_only=(self.command == 'HEAD'))
return
- self._send_response(403)
+ self.send_response(403)