summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools')
-rwxr-xr-xwebkit/tools/layout_tests/run_webkit_tests.py4
-rw-r--r--webkit/tools/layout_tests/test_types/test_type_base.py15
-rw-r--r--webkit/tools/layout_tests/test_types/text_diff.py5
3 files changed, 16 insertions, 8 deletions
diff --git a/webkit/tools/layout_tests/run_webkit_tests.py b/webkit/tools/layout_tests/run_webkit_tests.py
index 12eaf08..9f320bc 100755
--- a/webkit/tools/layout_tests/run_webkit_tests.py
+++ b/webkit/tools/layout_tests/run_webkit_tests.py
@@ -253,7 +253,6 @@ class TestRunner:
shell_args.append("--pixel-tests=" + png_path)
test_args.png_path = png_path
- test_args.wdiff = self._options.wdiff
test_args.new_baseline = self._options.new_baseline
test_args.show_sources = self._options.sources
@@ -607,9 +606,6 @@ if '__main__' == __name__:
option_parser.add_option("", "--no-pixel-tests", action="store_true",
default=False,
help="disable pixel-to-pixel PNG comparisons")
- option_parser.add_option("", "--wdiff", action="store_true",
- default=False,
- help="enable word-by-word diffing")
option_parser.add_option("", "--results-directory",
default="layout-test-results",
help="Output results directory source dir,"
diff --git a/webkit/tools/layout_tests/test_types/test_type_base.py b/webkit/tools/layout_tests/test_types/test_type_base.py
index ea5308b..fe1e25e 100644
--- a/webkit/tools/layout_tests/test_types/test_type_base.py
+++ b/webkit/tools/layout_tests/test_types/test_type_base.py
@@ -9,6 +9,7 @@ Also defines the TestArguments "struct" to pass them additional arguments.
import cgi
import difflib
+import errno
import os.path
import subprocess
@@ -178,7 +179,19 @@ class TestTypeBase(object):
actual_filename, expected_win_filename]
filename = self.OutputFilename(filename,
test_type + self.FILENAME_SUFFIX_WDIFF)
- wdiff = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ try:
+ wdiff = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ except OSError, e:
+ if errno.ENOENT != e.errno:
+ raise e
+ out = open(filename, 'wb')
+ out.write(
+ """wdiff not installed.<br/>"""
+ """If you're running OS X, you can install via macports.<br/>"""
+ """If running Ubuntu linux, you can run "sudo apt-get install"""
+ """ wdiff".""")
+ out.close()
+ return
wdiff = cgi.escape(wdiff)
wdiff = wdiff.replace('##WDIFF_DEL##', '<span class=del>')
wdiff = wdiff.replace('##WDIFF_ADD##', '<span class=add>')
diff --git a/webkit/tools/layout_tests/test_types/text_diff.py b/webkit/tools/layout_tests/test_types/text_diff.py
index cf3c6c4..7cf6627 100644
--- a/webkit/tools/layout_tests/test_types/text_diff.py
+++ b/webkit/tools/layout_tests/test_types/text_diff.py
@@ -63,13 +63,12 @@ class TestTextDiff(test_type_base.TestTypeBase):
if output != expected:
# Text doesn't match, write output files.
self.WriteOutputFiles(filename, "", ".txt", output, expected,
- diff=True, wdiff=test_args.wdiff)
+ diff=True, wdiff=True)
if expected == '':
failures.append(test_failures.FailureMissingResult(self))
else:
- failures.append(test_failures.FailureTextMismatch(self,
- test_args.wdiff))
+ failures.append(test_failures.FailureTextMismatch(self, True))
return failures