[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
jamesr at google.com
jamesr at google.com
Wed Dec 22 18:49:54 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3bba2c48fc1278d0a41a0df443b60b6ea329ad75
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 20 21:45:54 2010 +0000
2010-12-20 Cosmin Truta <ctruta at chromium.org>
Reviewed by James Robinson.
new-run-webkit-tests ignores trailing EOL differences in text tests
https://bugs.webkit.org/show_bug.cgi?id=36983
Changed the handling of new-line characters within new-run-webkit-tests
to match old-run-webkit-tests. Differences in leading and trailing empty
lines in text expectation files are no longer ignored.
* Scripts/webkitpy/layout_tests/port/base.py:
* Scripts/webkitpy/layout_tests/port/test.py:
Added unit tests. Removed old duplicate unit test entries.
* Scripts/webkitpy/layout_tests/test_types/text_diff.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 1623974..c2e680c 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-20 Cosmin Truta <ctruta at chromium.org>
+
+ Reviewed by James Robinson.
+
+ new-run-webkit-tests ignores trailing EOL differences in text tests
+ https://bugs.webkit.org/show_bug.cgi?id=36983
+
+ Changed the handling of new-line characters within new-run-webkit-tests
+ to match old-run-webkit-tests. Differences in leading and trailing empty
+ lines in text expectation files are no longer ignored.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ Added unit tests. Removed old duplicate unit test entries.
+ * Scripts/webkitpy/layout_tests/test_types/text_diff.py:
+
2010-12-20 David Levin <levin at chromium.org>
Reviewed by Shinichiro Hamaji.
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py
index bc5a9aa..aa8b2e5 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -322,7 +322,8 @@ class Port(object):
return self._filesystem.read_binary_file(path)
def expected_text(self, test):
- """Returns the text output we expect the test to produce."""
+ """Returns the text output we expect the test to produce.
+ End-of-line characters are normalized to '\n'."""
# FIXME: DRT output is actually utf-8, but since we don't decode the
# output from DRT (instead treating it as a binary string), we read the
# baselines as a binary string, too.
@@ -330,7 +331,7 @@ class Port(object):
if not self.path_exists(path):
return ''
text = self._filesystem.read_binary_file(path)
- return text.strip("\r\n").replace("\r\n", "\n") + "\n"
+ return text.replace("\r\n", "\n")
def filename_to_uri(self, filename):
"""Convert a test file (which is an absolute path) to a URI."""
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test.py b/Tools/Scripts/webkitpy/layout_tests/port/test.py
index 3b82996..935881c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/test.py
@@ -90,8 +90,6 @@ class TestPort(base.Port):
def __init__(self, **kwargs):
base.Port.__init__(self, **kwargs)
tests = TestList(self)
- tests.add('passes/image.html')
- tests.add('passes/text.html')
tests.add('failures/expected/checksum.html',
actual_checksum='checksum_fail-checksum')
tests.add('failures/expected/crash.html', crash=True)
@@ -114,6 +112,15 @@ class TestPort(base.Port):
expected_image=None)
tests.add('failures/expected/missing_text.html',
expected_text=None)
+ tests.add('failures/expected/newlines_leading.html',
+ expected_text="\nfoo\n",
+ actual_text="foo\n")
+ tests.add('failures/expected/newlines_trailing.html',
+ expected_text="foo\n\n",
+ actual_text="foo\n")
+ tests.add('failures/expected/newlines_with_excess_CR.html',
+ expected_text="foo\r\r\r\n",
+ actual_text="foo\n")
tests.add('failures/expected/text.html',
actual_text='text_fail-png')
tests.add('failures/unexpected/crash.html', crash=True)
@@ -126,7 +133,11 @@ class TestPort(base.Port):
tests.add('passes/error.html', error='stuff going to stderr')
tests.add('passes/image.html')
tests.add('passes/platform_image.html')
- tests.add('passes/text.html')
+ # Text output files contain "\r\n" on Windows. This may be
+ # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling.
+ tests.add('passes/text.html',
+ expected_text='\nfoo\n\n',
+ actual_text='\nfoo\r\n\r\r\n')
tests.add('websocket/tests/passes/text.html')
self._tests = tests
@@ -272,6 +283,9 @@ WONTFIX : failures/expected/image_checksum.html = IMAGE
WONTFIX : failures/expected/missing_check.html = MISSING PASS
WONTFIX : failures/expected/missing_image.html = MISSING PASS
WONTFIX : failures/expected/missing_text.html = MISSING PASS
+WONTFIX : failures/expected/newlines_leading.html = TEXT
+WONTFIX : failures/expected/newlines_trailing.html = TEXT
+WONTFIX : failures/expected/newlines_with_excess_CR.html = TEXT
WONTFIX : failures/expected/text.html = TEXT
WONTFIX : failures/expected/timeout.html = TIMEOUT
WONTFIX SKIP : failures/expected/hang.html = TIMEOUT
diff --git a/Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py b/Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
index ca4b17d..ad25262 100644
--- a/Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
+++ b/Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
@@ -49,11 +49,13 @@ _log = logging.getLogger("webkitpy.layout_tests.test_types.text_diff")
class TestTextDiff(test_type_base.TestTypeBase):
def _get_normalized_output_text(self, output):
- # Some tests produce "\r\n" explicitly. Our system (Python/Cygwin)
- # helpfully changes the "\n" to "\r\n", resulting in "\r\r\n".
- norm = output.replace("\r\r\n", "\r\n").strip("\r\n").replace(
- "\r\n", "\n")
- return norm + "\n"
+ """Returns the normalized text output, i.e. the output in which
+ the end-of-line characters are normalized to "\n"."""
+ # Running tests on Windows produces "\r\n". The "\n" part is helpfully
+ # changed to "\r\n" by our system (Python/Cygwin), resulting in
+ # "\r\r\n", when, in fact, we wanted to compare the text output with
+ # the normalized text expectation files.
+ return output.replace("\r\r\n", "\r\n").replace("\r\n", "\n")
def compare_output(self, port, filename, test_args, actual_test_output,
expected_test_output):
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list