Summary: | test-webkitpy: Add support for a flag that enables verbose logging | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Jerdonek <cjerdonek> | ||||||||
Component: | Tools / Tests | Assignee: | Chris Jerdonek <cjerdonek> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, cjerdonek, eric, hamaji, levin | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Chris Jerdonek
2010-03-21 14:48:17 PDT
Created attachment 51277 [details] Proposed patch This is preparatory work for revisiting the autoinstall rewrite, now that the versioning stuff is all worked out now: https://bugs.webkit.org/show_bug.cgi?id=35163 Created attachment 51366 [details] Proposed patch 2 Changed to using a try-except block instead of using a version check in autoinstalled/__init__.py since it is cleaner. Also FYI, I found a bug in Python 2.6 while working on this patch (which they have now fixed): http://bugs.python.org/issue8200 I think it's better to use --verbose instead of --debug as --debug usually means "debug build" in WebKit. Same discussion was done in Bug 36100. Bug 36521 is also related. Comment on attachment 51366 [details]
Proposed patch 2
--versbose, or --log-level=debug
FYI, --verbose is already taken by Python's unittest module, so we will need to use a different flag name:
> test-webkitpy --help
[INFO] test-webkitpy: Suppressing most webkitpy logging while running unit tests.
Usage: test-webkitpy [options] [test] [...]
Options:
-h, --help Show this message
-v, --verbose Verbose output
-q, --quiet Minimal output
Also, I do think the functionality in this report should be distinct from what unittest's --verbose flag already does, which is display a line for every unit test. In other words, I don't think we should use the existing flag to do both.
Created attachment 51842 [details]
Proposed patch 3
(In reply to comment #6) > Created an attachment (id=51842) [details] > Proposed patch 3 If you don't like my choice to use --verbose-logging, then how about --verbose-webkit to distinguish from the unittest module's --verbose flag? I chose --verbose-logging because it relates to Python's logging module. I'd prefer not to expose a --logging-level flag since that seems like over-kill. Comment on attachment 51842 [details]
Proposed patch 3
I'm not wild about mucking around with argv so much, but I don't think we have any better solutions at the moment.
I don't really understand Python logging, but if the code does what it says, that's great.
(In reply to comment #8) Thanks! > (From update of attachment 51842 [details]) > I'm not wild about mucking around with argv so much, but I don't think we have > any better solutions at the moment. Yeah, I'm with you. This is an odd case since test-webkitpy wraps unittest.main(). It's along the same lines as your --all hack. There may not be an elegant solution, unfortunately. Maybe the best we can do is re-implementing unittest.main's argument parser so we can get command-line help working for the command options we added, etc. > I don't really understand Python logging, but if the code does what it says, > that's great. It's really not too hard. It's just that test-webkitpy is a bit trickier than the others since we want to avoid rendering to the screen the log messages that occur as a side effect of executing code. I didn't (and don't) like the --all thing either. I just needed to solve that painpoint somehow. :( (In reply to comment #10) > I didn't (and don't) like the --all thing either. I just needed to solve that > painpoint somehow. :( Yeah, we'll solve them both together (--all and --verbose-logging) when the time comes... Committed: http://trac.webkit.org/changeset/56893 |