diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 18:24:32 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 18:24:32 +0000 |
commit | c98d070ecff3c33ec0d28971a7dd57551378d45e (patch) | |
tree | 7ebb1c36a672dcd051978ec690beecc09320cf3e | |
parent | 162b1419e27ac164b60fd34d55d32d27d77ea5b3 (diff) | |
download | chromium_src-c98d070ecff3c33ec0d28971a7dd57551378d45e.zip chromium_src-c98d070ecff3c33ec0d28971a7dd57551378d45e.tar.gz chromium_src-c98d070ecff3c33ec0d28971a7dd57551378d45e.tar.bz2 |
Make wdiff work for Mac too
Review URL: http://codereview.chromium.org/9694
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4996 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed, 14 insertions, 5 deletions
diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_mac.py b/webkit/tools/layout_tests/layout_package/platform_utils_mac.py index 9411eba..2215503 100644 --- a/webkit/tools/layout_tests/layout_package/platform_utils_mac.py +++ b/webkit/tools/layout_tests/layout_package/platform_utils_mac.py @@ -115,7 +115,13 @@ class PlatformUtility(object): subprocess.Popen(('kill', '-TERM', '%d' % server_process.pid), stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() - + + def WDiffExecutablePath(self): + """Path to the WDiff executable, which we assume is already installed and + in the user's $PATH. + """ + return 'wdiff' + def TestShellBinary(self): """The name of the binary for TestShell.""" return 'TestShell' diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_win.py b/webkit/tools/layout_tests/layout_package/platform_utils_win.py index d0cd1c9..8f8c23d 100644 --- a/webkit/tools/layout_tests/layout_package/platform_utils_win.py +++ b/webkit/tools/layout_tests/layout_package/platform_utils_win.py @@ -171,6 +171,10 @@ class PlatformUtility(google.platform_utils_win.PlatformUtility): stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() + def WDiffExecutablePath(self): + """Path to the WDiff executable, whose binary is checked in on Win""" + return PathFromBase('third_party', 'cygwin', 'bin', 'wdiff.exe') + def TestShellBinary(self): """The name of the binary for TestShell.""" return 'test_shell.exe' 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 56e1c34..d748818 100644 --- a/webkit/tools/layout_tests/test_types/test_type_base.py +++ b/webkit/tools/layout_tests/test_types/test_type_base.py @@ -171,10 +171,9 @@ class TestTypeBase(object): if wdiff: # Shell out to wdiff to get colored inline diffs. - # TODO(evanm): make this work on other platforms. - cmd = [google.path_utils.FindUpward(path_utils.WebKitRoot(), - 'third_party', 'cygwin', 'bin', - 'wdiff.exe'), + platform_util = platform_utils.PlatformUtility('') + executable = platform_util.WDiffExecutablePath() + cmd = [executable, '--start-delete=##WDIFF_DEL##', '--end-delete=##WDIFF_END##', '--start-insert=##WDIFF_ADD##', '--end-insert=##WDIFF_END##', actual_filename, expected_win_filename] |