Bug 33238

Summary: run-webkit-tests should catch control-C and offer to show you the failures/diffs so far
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, dpranke, jamesr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch ojan: review+

Description Eric Seidel (no email) 2010-01-05 17:06:06 PST
run-webkit-tests should catch control-C and offer to show you the failures/diffs so far

I would find this useful.  If we don't implement it in the perl version we should be sure to add it to the python version once it's upstream.
Comment 1 Alexey Proskuryakov 2010-01-05 20:02:10 PST
That would be awesome!
Comment 2 Dirk Pranke 2010-05-21 19:01:49 PDT
Created attachment 56771 [details]
Patch
Comment 3 Dirk Pranke 2010-05-21 19:04:28 PDT
Patch added. Note that I decided that prompting the user would just be annoying, so we go ahead and display the results we have.

Also, this patch changes the code to explicitly catch a ctrl-C and call sys.exit(); if you don't do that, Python waits for all of the threads currently exiting to complete. If some threads are wedged and don't get the interrupt, the process hangs and can't be killed.
Comment 4 Dirk Pranke 2010-05-21 19:05:27 PDT
(In reply to comment #3)
> Patch added. Note that I decided that prompting the user would just be annoying, so we go ahead and display the results we have. 

Of course, if no tests have failed, there's nothing to display.

Note that we can certainly change the behavior if it is annoying this way.
Comment 5 Ojan Vafai 2010-05-28 15:50:52 PDT
Comment on attachment 56771 [details]
Patch

This is a great change.

WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py:290
 +              exp_str = str(expected)
Both these abbreviations are hard to read. incomplete_str and expected_str are much more readable.

WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:765
 +              not self._retrying and not interrupted):
Nit: here and above, can you call this keyboard_interrupted? Makes it more clear what this means without having to trace back to where this was set.
Comment 6 Dirk Pranke 2010-05-28 17:12:38 PDT
(In reply to comment #5)
> (From update of attachment 56771 [details])
> This is a great change.
> 
> WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py:290
>  +              exp_str = str(expected)
> Both these abbreviations are hard to read. incomplete_str and expected_str are much more readable.
>

Done.
 
> WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:765
>  +              not self._retrying and not interrupted):
> Nit: here and above, can you call this keyboard_interrupted? Makes it more clear what this means without having to trace back to where this was set.

Done.
Comment 7 Dirk Pranke 2010-05-28 17:14:23 PDT
Committed r60381: <http://trac.webkit.org/changeset/60381>