Bug 37785

Summary: new-run-webkit-tests: add more --log options
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: Tools / TestsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, cjerdonek, eric, ojan, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch none

Description Dirk Pranke 2010-04-18 17:43:04 PDT
We should add options to be able to turn off and on all of the blocks that are sent to stderr. Most are currently configurable, but we can't turn off the default progress meter, or the unexpected results or the summary at the end of the run. It would also be good to have a way to indicate that you explicitly want nothing logged (--log '' can be easily lost in shell escaping mechanisms).
Comment 1 Dirk Pranke 2010-04-18 17:43:38 PDT
Created attachment 53647 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-04-19 00:07:33 PDT
Comment on attachment 53647 [details]
Patch

Seems strange that some of these are constants and some are not:
 LOG_VALUES = ",".join(("actual", "config", LOG_DETAILED_PROGRESS, "expected",
 100                       LOG_NOTHING, LOG_PROGRESS, LOG_SUMMARY, "timing",
 101                       LOG_UNEXPECTED, LOG_UNEXPECTED_RESULTS))

Seems OK.  I don't know much about python's built in logging.  I wonder if we're re-inventing any of that here.
Comment 3 Chris Jerdonek 2010-04-19 00:47:23 PDT
(In reply to comment #2)
> (From update of attachment 53647 [details])
> Seems strange that some of these are constants and some are not:
>  LOG_VALUES = ",".join(("actual", "config", LOG_DETAILED_PROGRESS, "expected",
>  100                       LOG_NOTHING, LOG_PROGRESS, LOG_SUMMARY, "timing",
>  101                       LOG_UNEXPECTED, LOG_UNEXPECTED_RESULTS))
> 
> Seems OK.  I don't know much about python's built in logging.  I wonder if
> we're re-inventing any of that here.

I was wondering that myself.  The logging module allows one to turn various loggers on and off using different techniques when configuring logging (e.g. by name using the name hierarchy, based on the message, etc).

By the way, a function (e.g. log_values()) might be more appropriate here than a constant built from other constants.
Comment 4 Dirk Pranke 2010-04-19 14:38:09 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 53647 [details] [details])
> > Seems strange that some of these are constants and some are not:
> >  LOG_VALUES = ",".join(("actual", "config", LOG_DETAILED_PROGRESS, "expected",
> >  100                       LOG_NOTHING, LOG_PROGRESS, LOG_SUMMARY, "timing",
> >  101                       LOG_UNEXPECTED, LOG_UNEXPECTED_RESULTS))
> > 
> > Seems OK.  I don't know much about python's built in logging.  I wonder if
> > we're re-inventing any of that here.
> 
> I was wondering that myself.  The logging module allows one to turn various
> loggers on and off using different techniques when configuring logging (e.g. by
> name using the name hierarchy, based on the message, etc).
>

From my limited looking at the logging docs, it looked like it would be a lot more cumbersome, if possible at all.
 
> By the way, a function (e.g. log_values()) might be more appropriate here than
> a constant built from other constants.

This whole thing is about to get rewritten to be easier to maintain, so I'll deal with it then.
Comment 5 Dirk Pranke 2010-04-19 14:39:48 PDT
Comment on attachment 53647 [details]
Patch

Clearing flags on attachment: 53647

Committed r57840: <http://trac.webkit.org/changeset/57840>
Comment 6 Dirk Pranke 2010-04-19 14:39:53 PDT
All reviewed patches have been landed.  Closing bug.