RESOLVED FIXED 88709
nrwt outputs empty files for wdiff output if wdiff is not installed
https://bugs.webkit.org/show_bug.cgi?id=88709
Summary nrwt outputs empty files for wdiff output if wdiff is not installed
Balazs Kelemen
Reported 2012-06-09 06:09:18 PDT
It would be nice to avoid generating these useless files. Furthermore, I think we should print a warning message if wdiff is not installed, otherwise folks will likely not notice this useful feature at all (on Linux it's usually not installed by default).
Attachments
Patch (8.70 KB, patch)
2012-06-19 21:34 PDT, Dirk Pranke
no flags
update w/ review feedback (11.41 KB, patch)
2012-06-20 14:13 PDT, Dirk Pranke
tony: review+
Dirk Pranke
Comment 1 2012-06-09 15:58:14 PDT
It's not supposed to generate the files if wdiff isn't installed, so you've found a bug :).
Dirk Pranke
Comment 2 2012-06-19 21:34:41 PDT
Tony Chang
Comment 3 2012-06-20 10:15:44 PDT
Comment on attachment 148500 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=148500&action=review Is there a test for this? Do we need to update the code that generates results.html to make sure it doesn't include links to the non-existent diffs? We should have a test for that. > Tools/Scripts/webkitpy/layout_tests/port/base.py:239 > + def _log_wdiff_missing(self): > + _log.warning("wdiff is not installed; please install it to generate word-by-word diffs.") > + _log.warning('') I would change this method to just return the string to output. Then you don't have to duplicate the calls to _log.warning and the calls to _log.warning are next to the 'if logging' check.
Dirk Pranke
Comment 4 2012-06-20 11:19:10 PDT
(In reply to comment #3) > (From update of attachment 148500 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=148500&action=review > > Is there a test for this? > No ... I realized after I uploaded this last night that I needed to add some tests. Will do so. > Do we need to update the code that generates results.html to make sure it doesn't include links to the non-existent diffs? We should have a test for that. > No, the code already handles that, but I'll add tests. > > Tools/Scripts/webkitpy/layout_tests/port/base.py:239 > > + def _log_wdiff_missing(self): > > + _log.warning("wdiff is not installed; please install it to generate word-by-word diffs.") > > + _log.warning('') > > I would change this method to just return the string to output. Then you don't have to duplicate the calls to _log.warning and the calls to _log.warning are next to the 'if logging' check. Ok.
Dirk Pranke
Comment 5 2012-06-20 14:13:45 PDT
Created attachment 148652 [details] update w/ review feedback
Dirk Pranke
Comment 6 2012-06-20 14:30:26 PDT
Note You need to log in before you can comment on or make changes to this bug.