Bug 28060 - bugzilla-tool needs a --quiet option
Summary: bugzilla-tool needs a --quiet option
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-06 20:56 PDT by Adam Barth
Modified: 2009-08-08 09:02 PDT (History)
2 users (show)

See Also:


Attachments
An 80% solution. (4.79 KB, patch)
2009-08-07 12:00 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch v1 (4.79 KB, patch)
2009-08-07 18:50 PDT, Adam Barth
eric: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2009-08-06 20:56:11 PDT
When running bugzilla-tool in --commit-queue mode, it produces a ton of output, most of which is not helpful for understanding what's going on.  It would be useful to have a --quiet option for land-patches that suppressed most of the noise.

In order of importance:

1) I don't need to see the build spew.  It fine just to see "Building...".
2) I don't need to see the test spew.  "Testing..." is fine.
3) If the tests fail it would be useful to see which ones.  For example, grep the ouput for "fail" and "crash".
4) If a build fails, it would be useful to see which file failed to compile.

This would make commit-queue about a 100x easy to run.
Comment 1 Eric Seidel (no email) 2009-08-06 20:59:30 PDT
I think some of this should be added to the sub-tools.

maybe a --failures only mode for both run-webkit-tests and build-webkit.  run-webkit-tests would be easy to add that for.  build-webkit might be a little harder, but certainly doable!
Comment 2 Eric Seidel (no email) 2009-08-06 20:59:45 PDT
--failures-only is what I meant.
Comment 3 Adam Barth 2009-08-07 12:00:30 PDT
Created attachment 34310 [details]
An 80% solution.
Comment 4 Eric Seidel (no email) 2009-08-07 14:31:19 PDT
Comment on attachment 34310 [details]
An 80% solution.

I'm not sure this is the best way to ignore output.  Not I've used .communicate() and ginored the results in other places.

Python has a ternary operator.  You better sit down before you read it though:

child_stdout = open(os.devnull, "w") if quiet else None

Why not just print before every subcommand?
print "build-webkit..."
I don't really like the "..."
Comment 5 Adam Barth 2009-08-07 18:50:07 PDT
Created attachment 34354 [details]
Patch v1
Comment 6 Adam Barth 2009-08-07 18:51:55 PDT
(In reply to comment #4)
> (From update of attachment 34310 [details])
> I'm not sure this is the best way to ignore output.  Not I've used
> .communicate() and ginored the results in other places.

I've changed to the communicate() way.  That wastes memory because the output ends up in memory, but (1) I don't think it matters here and (2) we'll probably wan the contents in memory to report errors later.

> Python has a ternary operator.  You better sit down before you read it though:
> 
> child_stdout = open(os.devnull, "w") if quiet else None

Whatever.  Fixed.

> Why not just print before every subcommand?
> print "build-webkit..."
> I don't really like the "..."

Done.  Well, run-webkit-tests doesn't get a print, but it makes enough noise on its own even with --quiet.
Comment 7 Eric Seidel (no email) 2009-08-08 08:53:06 PDT
Comment on attachment 34354 [details]
Patch v1

/dev/null is a fine solution.  I just wanted you to be aware of the other version.  I still think we should eventually log these to files in --commit-queue mode instead of just silencing them.  But this is fine for now. :)
Comment 8 Adam Barth 2009-08-08 09:01:58 PDT
Comment on attachment 34354 [details]
Patch v1

Clearing review flag on attachment: 34354

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/bugzilla-tool
Committed r46954
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/bugzilla-tool
r46954 = 591e054feb134601f8ebf2784475b55e8f82f3ff (trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
http://trac.webkit.org/changeset/46954
Comment 9 Adam Barth 2009-08-08 09:02:03 PDT
All reviewed patches have been landed.  Closing bug.