Repository navigation
Use blessings when possible for WPT UI - #8551
Conversation
There was a problem hiding this comment.
Can we make this except ImportError just so we silence+catch all exceptions in case one occurs from something else?
There was a problem hiding this comment.
The idea here was that if the import failed, if creating the Terminal failed, or if the __getattr__ call in blessings fails (which just calls into curses), we should always fall back. If you like I can split the work into two try/except blocks and print an error in the second one.
There was a problem hiding this comment.
try and except with no condition is never a good idea; even except Exception: is better because it won't catch KeyboardInterrupt. In this case I agree that splitting into two blocks is a better idea.
|
Reviewed 1 of 1 files at r1. Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion. tests/wpt/grouping_formatter.py, line 33 [r1] (raw file): Comments from the review on Reviewable.io |
|
Reviewed 1 of 1 files at r2. tests/wpt/grouping_formatter.py, line 53 [r2] (raw file): tests/wpt/grouping_formatter.py, line 58 [r2] (raw file): Comments from the review on Reviewable.io |
There was a problem hiding this comment.
This probably needs a \n since write doesn't add one
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. tests/wpt/grouping_formatter.py, line 60 [r2] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. tests/wpt/grouping_formatter.py, line 60 [r2] (raw file): Comments from the review on Reviewable.io |
Use blessings when it is possible for the WPT UI and fall back to using raw control characters. This also fixes a bug where the UI didn't work correctly in iTerm.app. Remove the one line version of the UI, since it is no longer used as the iTerm fallback.
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. tests/wpt/grouping_formatter.py, line 53 [r2] (raw file): tests/wpt/grouping_formatter.py, line 58 [r2] (raw file): Comments from the review on Reviewable.io |
|
Reviewed 1 of 1 files at r3. tests/wpt/grouping_formatter.py, line 60 [r2] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 2 unresolved discussions. tests/wpt/grouping_formatter.py, line 60 [r2] (raw file): Comments from the review on Reviewable.io |
|
@bors-servo: r+ |
|
📌 Commit 7225e36 has been approved by |
Use blessings when possible for WPT UI Use blessings when it is possible for the WPT UI and fall back to using raw control characters. This also fixes a bug where the UI didn't work correctly in iTerm.app. Remove the one line version of the UI, since it is no longer used as the iTerm fallback. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8551) <!-- Reviewable:end -->
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt |
There was a problem hiding this comment.
clear_eol and move_up are in the wrong order :)
There was a problem hiding this comment.
Will do. Can I put my other suggestion in a separate commit in the same PR?
Fix redraw of WPT UI output, and slightly improve line counting See discussion in PR #8551. Redraw of the first test name was broken due to a mix-up between two ANSI escape codes. I also took the opportunity to change the way line count is calculated. It's a bit cleaner that way (the new operation is ~%20 faster, but that's unnoticeable). <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8861) <!-- Reviewable:end -->
Use blessings when it is possible for the WPT UI and fall back to using
raw control characters. This also fixes a bug where the UI didn't work
correctly in iTerm.app. Remove the one line version of the UI, since it
is no longer used as the iTerm fallback.