Skip to content

Commit 4e08670

Browse files
committed
2011-04-15 Ojan Vafai <ojan@chromium.org>
Reviewed by Eric Seidel. only show pretty-diff/wdiff if they were generated https://bugs.webkit.org/show_bug.cgi?id=58682 * Scripts/webkitpy/layout_tests/layout_package/json_results.html: * Scripts/webkitpy/layout_tests/layout_package/test_runner.py: * Scripts/webkitpy/layout_tests/port/base.py: Canonical link: https://commits.webkit.org/73795@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 2a4f741 commit 4e08670

4 files changed

Lines changed: 35 additions & 11 deletions

File tree

Tools/ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2011-04-15 Ojan Vafai <ojan@chromium.org>
2+
3+
Reviewed by Eric Seidel.
4+
5+
only show pretty-diff/wdiff if they were generated
6+
https://bugs.webkit.org/show_bug.cgi?id=58682
7+
8+
* Scripts/webkitpy/layout_tests/layout_package/json_results.html:
9+
* Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
10+
* Scripts/webkitpy/layout_tests/port/base.py:
11+
112
2011-04-15 Andreas Kling <kling@webkit.org>
213

314
Reviewed by Antonio Gomes.

Tools/Scripts/webkitpy/layout_tests/layout_package/json_results.html

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
// FIXME: show expected/actual/diff contents inline in iframes
7878
// FIXME: allow zooming in on pixel diffs
7979
// FIXME: store stderr information in the json
80+
// FIXME: add links to the httpd access/error logs
81+
// FIXME: handle new tests
8082

8183
var hasTextFailures = false;
8284
var hasImageFailures = false;
@@ -93,26 +95,29 @@
9395
var test_prefix = stripExtension(test);
9496

9597
row += '<td>';
96-
// FIXME: only include timeout actual/expected results here if we actually spit out results for timeout tests.
9798
if (actual == 'CRASH')
98-
row += resultLink(test, '-stack.txt', 'stack');
99+
row += resultLink(test_prefix, '-stack.txt', 'stack');
99100
else if (actual.indexOf('TEXT' || actual == 'TIMEOUT') != -1) {
101+
// FIXME: only include timeout actual/expected results here if we actually spit out results for timeout tests.
100102
hasTextFailures = true;
101-
// FIXME: Show wdiff here too?
102-
// FIXME: store a bit in the JSON as to whether pretty-diff/wdiffs were generated
103-
row += resultLink(test, '-expected.txt', 'expected') +
104-
resultLink(test, '-actual.txt', 'actual') +
105-
resultLink(test, '-diff.txt', 'diff') +
106-
resultLink(test, '-pretty-diff.html', 'pretty diff');
103+
row += resultLink(test_prefix, '-expected.txt', 'expected') +
104+
resultLink(test_prefix, '-actual.txt', 'actual') +
105+
resultLink(test_prefix, '-diff.txt', 'diff');
106+
107+
if (results.has_pretty_patch)
108+
row += resultLink(test_prefix, '-pretty-diff.html', 'pretty diff');
109+
110+
if (results.has_wdiff)
111+
row += resultLink(test_prefix, '-wdiff.html', 'wdiff');
107112
}
108113

109114
row += '</td><td>';
110115

111116
if (actual.indexOf('IMAGE') != -1) {
112117
hasImageFailures = true;
113-
row += resultLink(test, '-expected.png', 'expected') +
114-
resultLink(test, '-actual.png', 'actual') +
115-
resultLink(test, '-diff.png', 'diff');
118+
row += resultLink(test_prefix, '-expected.png', 'expected') +
119+
resultLink(test_prefix, '-actual.png', 'actual') +
120+
resultLink(test_prefix, '-diff.png', 'diff');
116121
}
117122

118123
row += '</td>';

Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ def summarize_results(port_obj, expectations, result_summary, retry_summary, tes
158158
# we should make this check more robust.
159159
results['uses_expectations_file'] = port_obj.name().find('chromium') != -1
160160
results['layout_tests_dir'] = port_obj.layout_tests_dir()
161+
results['has_wdiff'] = port_obj.wdiff_available()
162+
results['has_pretty_patch'] = port_obj.pretty_patch_available()
161163

162164
return results
163165

Tools/Scripts/webkitpy/layout_tests/port/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ def __init__(self, port_name=None, options=None,
140140
self._multiprocessing_is_available = (multiprocessing is not None)
141141
self._results_directory = None
142142

143+
def wdiff_available(self):
144+
return bool(self._wdiff_available)
145+
146+
def pretty_patch_available(self):
147+
return bool(self._pretty_patch_available)
148+
143149
def default_child_processes(self):
144150
"""Return the number of DumpRenderTree instances to use for this
145151
port."""

0 commit comments

Comments
 (0)