Diff
Modified: trunk/LayoutTests/ChangeLog (142940 => 142941)
--- trunk/LayoutTests/ChangeLog 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/LayoutTests/ChangeLog 2013-02-15 00:56:23 UTC (rev 142941)
@@ -1,3 +1,15 @@
+2013-02-14 Glenn Adams <gl...@skynav.com>
+
+ new-run-webkit-tests needs a shared TestExpectations between all WebKit ports
+ https://bugs.webkit.org/show_bug.cgi?id=37565
+
+ Introduce generic TestExpectations file that applies as a fallback for all ports, the location of which
+ is LayoutTests/TestExpectations.
+
+ Reviewed by Dirk Pranke.
+
+ * TestExpectations: Added.
+
2013-02-14 Hajime Morrita <morr...@google.com>
[V8] Assertion failure on an exception is thrown
Added: trunk/LayoutTests/TestExpectations (0 => 142941)
--- trunk/LayoutTests/TestExpectations (rev 0)
+++ trunk/LayoutTests/TestExpectations 2013-02-15 00:56:23 UTC (rev 142941)
@@ -0,0 +1,3 @@
+# This file contains generic test expectations that apply to all ports of WebKit.
+#
+# See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
Modified: trunk/Tools/ChangeLog (142940 => 142941)
--- trunk/Tools/ChangeLog 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/ChangeLog 2013-02-15 00:56:23 UTC (rev 142941)
@@ -1,3 +1,50 @@
+2013-02-14 Glenn Adams <gl...@skynav.com>
+
+ new-run-webkit-tests needs a shared TestExpectations between all WebKit ports
+ https://bugs.webkit.org/show_bug.cgi?id=37565
+
+ Introduce generic TestExpectations file that applies as a fallback for all ports, the location of which
+ is LayoutTests/TestExpectations.
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py:
+ (FakePort.path_to_generic_test_expectations_file):
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations.__init__):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.path_to_generic_test_expectations_file):
+ (Port):
+ (Port._port_specific_expectations_files):
+ (Port.expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase.test_expectations_ordering):
+ (test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+ (QtPortTest.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+ (WinPortTest.test_expectations_files):
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ (PrintExpectationsTest.test_paths):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest._update_expectations_file):
+
2013-02-14 Jochen Eisinger <joc...@chromium.org>
[chromium] move pixel generation logic to TestRunner library
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -59,6 +59,8 @@
def get_option(self, _, val):
return val
+ def path_to_generic_test_expectations_file(self):
+ return ''
class FakeFactory(object):
def __init__(self, host, ports):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -842,7 +842,7 @@
# FIXME: This constructor does too much work. We should move the actual parsing of
# the expectations into separate routines so that linting and handling overrides
# can be controlled separately, and the constructor can be more of a no-op.
- def __init__(self, port, tests=None, include_overrides=True, expectations_to_lint=None):
+ def __init__(self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None):
self._full_test_list = tests
self._test_config = port.test_configuration()
self._is_lint_mode = expectations_to_lint is not None
@@ -850,17 +850,33 @@
self._parser = TestExpectationParser(port, tests, self._is_lint_mode)
self._port = port
self._skipped_tests_warnings = []
+ self._expectations = []
expectations_dict = expectations_to_lint or port.expectations_dict()
- self._expectations = self._parser.parse(expectations_dict.keys()[0], expectations_dict.values()[0])
- self._add_expectations(self._expectations)
- if len(expectations_dict) > 1 and include_overrides:
- for name in expectations_dict.keys()[1:]:
- expectations = self._parser.parse(name, expectations_dict[name])
+ expectations_dict_index = 0
+ # Populate generic expectations (if enabled by include_generic).
+ if port.path_to_generic_test_expectations_file() in expectations_dict:
+ if include_generic:
+ expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
self._add_expectations(expectations)
self._expectations += expectations
+ expectations_dict_index += 1
+ # Populate default port expectations (always enabled).
+ if len(expectations_dict) > expectations_dict_index:
+ expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
+ self._add_expectations(expectations)
+ self._expectations += expectations
+ expectations_dict_index += 1
+
+ # Populate override expectations (if enabled by include_overrides).
+ while len(expectations_dict) > expectations_dict_index and include_overrides:
+ expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
+ self._add_expectations(expectations)
+ self._expectations += expectations
+ expectations_dict_index += 1
+
# FIXME: move ignore_tests into port.skipped_layout_tests()
self.add_skipped_tests(port.skipped_layout_tests(tests).union(set(port.get_option('ignore_tests', []))))
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -806,6 +806,10 @@
return self._options.ensure_value(name, default_value)
@memoized
+ def path_to_generic_test_expectations_file(self):
+ return self._filesystem.join(self.layout_tests_dir(), 'TestExpectations')
+
+ @memoized
def path_to_test_expectations_file(self):
"""Update the test expectations to the passed-in string.
@@ -1070,7 +1074,7 @@
_log.warning("additional_expectations path '%s' does not exist" % path)
return expectations
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
# Unlike baseline_search_path, we only want to search [WK2-PORT, PORT-VERSION, PORT] and any directories
# included via --additional-platform-directory, not the full casade.
search_paths = [self.port_name]
@@ -1088,6 +1092,9 @@
return [self._filesystem.join(self._webkit_baseline_path(d), 'TestExpectations') for d in search_paths]
+ def expectations_files(self):
+ return [self.path_to_generic_test_expectations_file()] + self._port_specific_expectations_files()
+
def repository_paths(self):
"""Returns a list of (repository_name, repository_path) tuples of its depending code base.
By default it returns a list that only contains a ('webkit', <webkitRepossitoryPath>) tuple."""
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -349,7 +349,7 @@
def warn_if_bug_missing_in_test_expectations(self):
return True
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
paths = [self.path_to_test_expectations_file()]
skia_expectations_path = self.path_from_chromium_base('skia', 'skia_test_expectations.txt')
# FIXME: we should probably warn if this file is missing in some situations.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -234,12 +234,12 @@
return False
return True
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
# LayoutTests/platform/chromium-android/TestExpectations should contain only the rules to
# skip tests for the features not supported or not testable on Android.
# Other rules should be in LayoutTests/platform/chromium/TestExpectations.
android_expectations_file = self.path_from_webkit_base('LayoutTests', 'platform', 'chromium-android', 'TestExpectations')
- return super(ChromiumAndroidPort, self).expectations_files() + [android_expectations_file]
+ return super(ChromiumAndroidPort, self)._port_specific_expectations_files() + [android_expectations_file]
def requires_http_server(self):
"""Chromium Android runs tests on devices, and uses the HTTP server to
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -176,6 +176,7 @@
port = self.make_port()
port.port_name = 'chromium'
+ generic_path = port.path_to_generic_test_expectations_file()
expectations_path = port.path_to_test_expectations_file()
chromium_overrides_path = port.path_from_chromium_base(
'webkit', 'tools', 'layout_tests', 'test_expectations.txt')
@@ -185,15 +186,15 @@
port._filesystem.write_text_file(skia_overrides_path, 'dummay text')
port._options.builder_name = 'DUMMY_BUILDER_NAME'
- self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
+ self.assertEqual(port.expectations_files(), [generic_path, expectations_path, skia_overrides_path, chromium_overrides_path])
port._options.builder_name = 'builder (deps)'
- self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
+ self.assertEqual(port.expectations_files(), [generic_path, expectations_path, skia_overrides_path, chromium_overrides_path])
# A builder which does NOT observe the Chromium test_expectations,
# but still observes the Skia test_expectations...
port._options.builder_name = 'builder'
- self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path])
+ self.assertEqual(port.expectations_files(), [generic_path, expectations_path, skia_overrides_path])
def test_expectations_ordering(self):
# since we don't implement self.port_name in ChromiumPort.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/efl.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/efl.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/efl.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -118,7 +118,7 @@
def default_baseline_search_path(self):
return map(self._webkit_baseline_path, self._search_paths())
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
# FIXME: We should be able to use the default algorithm here.
return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self._search_paths()]))
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -111,7 +111,7 @@
search_paths.extend(self.get_option("additional_platform_directory", []))
return search_paths
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
return [self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in reversed(self._search_paths())]
# FIXME: We should find a way to share this implmentation with Gtk,
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -52,10 +52,10 @@
def test_expectations_files(self):
port = self.make_port()
- self.assertEqual(port.expectations_files(), ['/mock-checkout/LayoutTests/platform/gtk/TestExpectations', '/mock-checkout/LayoutTests/platform/gtk-wk1/TestExpectations'])
+ self.assertEqual(port.expectations_files(), ['/mock-checkout/LayoutTests/TestExpectations', '/mock-checkout/LayoutTests/platform/gtk/TestExpectations', '/mock-checkout/LayoutTests/platform/gtk-wk1/TestExpectations'])
port = self.make_port(options=MockOptions(webkit_test_runner=True))
- self.assertEqual(port.expectations_files(), ['/mock-checkout/LayoutTests/platform/gtk/TestExpectations', '/mock-checkout/LayoutTests/platform/wk2/TestExpectations', '/mock-checkout/LayoutTests/platform/gtk-wk2/TestExpectations'])
+ self.assertEqual(port.expectations_files(), ['/mock-checkout/LayoutTests/TestExpectations', '/mock-checkout/LayoutTests/platform/gtk/TestExpectations', '/mock-checkout/LayoutTests/platform/wk2/TestExpectations', '/mock-checkout/LayoutTests/platform/gtk-wk2/TestExpectations'])
def test_show_results_html_file(self):
port = self.make_port()
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -82,8 +82,8 @@
fallback_names = [self._wk2_port_name(), 'wk2'] + fallback_names
return map(self._webkit_baseline_path, fallback_names)
- def expectations_files(self):
- return reversed([self._filesystem.join(self._webkit_baseline_path(d), 'TestExpectations') for d in self.baseline_search_path()])
+ def _port_specific_expectations_files(self):
+ return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self.baseline_search_path()]))
def setup_environ_for_server(self, server_name=None):
env = super(MacPort, self).setup_environ_for_server(server_name)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -424,7 +424,8 @@
for path in port.expectations_files():
port._filesystem.write_text_file(path, '')
ordered_dict = port.expectations_dict()
- self.assertEqual(port.path_to_test_expectations_file(), ordered_dict.keys()[0])
+ self.assertEqual(port.path_to_generic_test_expectations_file(), ordered_dict.keys()[0])
+ self.assertEqual(port.path_to_test_expectations_file(), ordered_dict.keys()[1])
options = MockOptions(additional_expectations=['/tmp/foo', '/tmp/bar'])
port = self.make_port(options=options)
@@ -507,17 +508,17 @@
def platform_dirs(port):
return [port.host.filesystem.basename(port.host.filesystem.dirname(f)) for f in port.expectations_files()]
- self.assertEqual(platform_dirs(port), ['testwebkitport'])
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport'])
port = TestWebKitPort(port_name="testwebkitport-version")
- self.assertEqual(platform_dirs(port), ['testwebkitport', 'testwebkitport-version'])
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport', 'testwebkitport-version'])
port = TestWebKitPort(port_name="testwebkitport-version-wk2")
- self.assertEqual(platform_dirs(port), ['testwebkitport', 'testwebkitport-version', 'wk2', 'testwebkitport-wk2'])
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport', 'testwebkitport-version', 'wk2', 'testwebkitport-wk2'])
port = TestWebKitPort(port_name="testwebkitport-version",
options=MockOptions(additional_platform_directory=["internal-testwebkitport"]))
- self.assertEqual(platform_dirs(port), ['testwebkitport', 'testwebkitport-version', 'internal-testwebkitport'])
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport', 'testwebkitport-version', 'internal-testwebkitport'])
def test_root_option(self):
port = TestWebKitPort()
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -147,7 +147,7 @@
def default_baseline_search_path(self):
return map(self._webkit_baseline_path, self._search_paths())
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
paths = self._search_paths()
if self.get_option('webkit_test_runner'):
paths.append('wk2')
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -97,8 +97,9 @@
expectations_case = deepcopy(case)
if expectations_case['use_webkit2']:
expectations_case['search_paths'].append("wk2")
+ expectations_case['search_paths'].append('')
expectations_case['search_paths'].reverse()
- expectations_case['search_paths'] = map(lambda path: '/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path), expectations_case['search_paths'])
+ expectations_case['search_paths'] = map(lambda path: '/mock-checkout/LayoutTests/TestExpectations' if not path else '/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path), expectations_case['search_paths'])
self._assert_expectations_files(**expectations_case)
def test_show_results_html_file(self):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -105,5 +105,5 @@
self.assertEqual(port._runtime_feature_list(), ['foo', 'bar'])
def test_expectations_files(self):
- self.assertEqual(len(self.make_port().expectations_files()), 2)
- self.assertEqual(len(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Release')).expectations_files()), 4)
+ self.assertEqual(len(self.make_port().expectations_files()), 3)
+ self.assertEqual(len(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Release')).expectations_files()), 5)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -223,7 +223,8 @@
def test_paths(self):
self.run_test([],
- ('LayoutTests/platform/test/TestExpectations\n'
+ ('LayoutTests/TestExpectations\n'
+ 'LayoutTests/platform/test/TestExpectations\n'
'LayoutTests/platform/test-win-xp/TestExpectations\n'),
paths=True)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (142940 => 142941)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2013-02-15 00:42:03 UTC (rev 142940)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2013-02-15 00:56:23 UTC (rev 142941)
@@ -152,7 +152,7 @@
path = port.path_to_test_expectations_file()
lock = self._tool.make_file_lock(path + '.lock')
lock.acquire_lock()
- expectations = TestExpectations(port, include_overrides=False)
+ expectations = TestExpectations(port, include_generic=False, include_overrides=False)
for test_configuration in port.all_test_configurations():
if test_configuration.version == port.test_configuration().version:
expectationsString = expectations.remove_configuration_from_test(test_name, test_configuration)