Diff
Modified: trunk/Tools/ChangeLog (114558 => 114559)
--- trunk/Tools/ChangeLog 2012-04-18 21:01:56 UTC (rev 114558)
+++ trunk/Tools/ChangeLog 2012-04-18 21:04:43 UTC (rev 114559)
@@ -1,3 +1,27 @@
+2012-04-18 Dirk Pranke <[email protected]>
+
+ nrwt: support additional test expectations files
+ https://bugs.webkit.org/show_bug.cgi?id=84222
+
+ Reviewed by Ojan Vafai.
+
+ This patch adds an --additional-expectations flag that can be
+ used to point to more files that will override the default set
+ of expectations. This will allow us to remove the
+ 'google_chrome' ports and eventually help to clean up override
+ handling in the chromium ports and unify expectations files and
+ Skipped files; this can also be used to specify overrides for
+ tests that run differently on a given machine.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.test_expectations_overrides):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.test_expectations_overrides):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_additional_expectations):
+
2012-04-18 Jer Noble <[email protected]>
Lion Production Test failing with error: "Failed to stop httpd: pid file still exists"
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (114558 => 114559)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-04-18 21:01:56 UTC (rev 114558)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-04-18 21:04:43 UTC (rev 114559)
@@ -887,7 +887,13 @@
it is possible that you might need "downstream" expectations that
temporarily override the "upstream" expectations until the port can
sync up the two repos."""
- return None
+ overrides = ''
+ for path in self.get_option('additional_expectations', []):
+ if self._filesystem.exists(self._filesystem.expanduser(path)):
+ overrides += self._filesystem.read_text_file(self._filesystem.expanduser(path))
+ else:
+ _log.warning("overrides path '%s' does not exist" % path)
+ return overrides or None
def repository_paths(self):
"""Returns a list of (repository_name, repository_path) tuples of its depending code base.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py (114558 => 114559)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2012-04-18 21:01:56 UTC (rev 114558)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2012-04-18 21:04:43 UTC (rev 114559)
@@ -316,16 +316,17 @@
# FIXME: It seems bad that run_webkit_tests.py uses a hardcoded dummy
# builder string instead of just using None.
builder_name = self.get_option('builder_name', 'DUMMY_BUILDER_NAME')
+ base_overrides = super(ChromiumPort, self).test_expectations_overrides()
if builder_name != 'DUMMY_BUILDER_NAME' and not '(deps)' in builder_name and not builder_name in self.try_builder_names:
- return None
+ return base_overrides
try:
overrides_path = self.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations.txt')
- except AssertionError:
- return None
+ except AssertionError, e:
+ return base_overrides
if not self._filesystem.exists(overrides_path):
- return None
- return self._filesystem.read_text_file(overrides_path)
+ return base_overrides
+ return self._filesystem.read_text_file(overrides_path) + (base_overrides or '')
def repository_paths(self):
repos = super(ChromiumPort, self).repository_paths()
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (114558 => 114559)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2012-04-18 21:01:56 UTC (rev 114558)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2012-04-18 21:04:43 UTC (rev 114559)
@@ -306,6 +306,9 @@
default=[], help="Additional directory where to look for test "
"baselines (will take precendence over platform baselines). "
"Specify multiple times to add multiple search path entries."),
+ optparse.make_option("--additional-expectations", action="" default=[],
+ help="Path to a test_expectations file that will override previous expectations. "
+ "Specify multiple times for multiple sets of overrides."),
optparse.make_option("--no-show-results", action=""
default=True, dest="show_results",
help="Don't launch a browser with results after the tests "
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (114558 => 114559)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-04-18 21:01:56 UTC (rev 114558)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-04-18 21:04:43 UTC (rev 114559)
@@ -813,6 +813,12 @@
res, buildbot_output, regular_output, user = logging_run(['--additional-platform-directory', 'foo'])
self.assertContainsLine(regular_output, '--additional-platform-directory=foo is ignored since it is not absolute\n')
+ def test_additional_expectations(self):
+ host = MockHost()
+ host.filesystem.write_text_file('/tmp/overrides.txt', 'BUGX : failures/unexpected/mismatch.html = IMAGE\n')
+ self.assertTrue(passing_run(['--additional-expectations', '/tmp/overrides.txt', 'failures/unexpected/mismatch.html'],
+ tests_included=True, host=host))
+
def test_no_http_and_force(self):
# See test_run_force, using --force raises an exception.
# FIXME: We would like to check the warnings generated.