Bug 91129

Summary: NRWT doesn't print exceptions
Product: WebKit Reporter: Xianzhu Wang <wangxianzhu>
Component: Tools / TestsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dpranke, ojan, tmpsantos, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 91370    
Bug Blocks:    
Attachments:
Description Flags
Patch ojan: review+

Description Xianzhu Wang 2012-07-12 11:50:16 PDT
On exception occurred in the main program, NRWT just exits with status EXCEPTIONAL_EXIT_STATUS but doesn't print the exception, making it difficult to debug the issue.

To test:
1. Create a syntax error in port/webkit.py
2. Run NRWT

Actual result:
NRWT just exists without any error message

Expected result:
NRWT should print the error.

In addition, if some worker raises some exception, NRWT just print the stack trace without the type and message of the exception.
Comment 1 Dirk Pranke 2012-07-12 18:53:30 PDT
Created attachment 152129 [details]
Patch
Comment 2 WebKit Review Bot 2012-07-12 18:56:06 PDT
Attachment 152129 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/Scripts/webkitpy..." exit_code: 1
Tools/Scripts/webkitpy/common/message_pool.py:277:  deprecated form of raising exception  [pep8/W602] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dirk Pranke 2012-07-12 18:57:35 PDT
(In reply to comment #2)
> Attachment 152129 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/Scripts/webkitpy..." exit_code: 1
> Tools/Scripts/webkitpy/common/message_pool.py:277:  deprecated form of raising exception  [pep8/W602] [5]
> Total errors found: 1 in 4 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

This style error is unavoidable and can be ignored.
Comment 4 Ojan Vafai 2012-07-13 09:29:50 PDT
Comment on attachment 152129 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152129&action=review

> Tools/Scripts/webkitpy/common/message_pool.py:284
> +            _log.error("%s: %s('%s') raised:" % (
> +                    self.name, exception_value.__class__.__name__, str(exception_value)))

Nit: I think this would be easier to read on one long line.
Comment 5 Dirk Pranke 2012-07-13 12:07:19 PDT
(In reply to comment #4)
> (From update of attachment 152129 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=152129&action=review
> 
> > Tools/Scripts/webkitpy/common/message_pool.py:284
> > +            _log.error("%s: %s('%s') raised:" % (
> > +                    self.name, exception_value.__class__.__name__, str(exception_value)))
> 
> Nit: I think this would be easier to read on one long line.

You're right. Done.
Comment 6 Dirk Pranke 2012-07-13 12:08:36 PDT
Committed r122615: <http://trac.webkit.org/changeset/122615>
Comment 7 Thiago Marcos P. Santos 2012-07-16 03:45:24 PDT
This patch makes the runner returns a error code when it succeeds. I have a fix for it at bug 91370.