diff options
author | Dan Schaffer <dschaffe@adobe.com> | 2013-05-10 16:19:32 -0400 |
---|---|---|
committer | Dan Schaffer <dschaffe@adobe.com> | 2013-05-10 16:19:32 -0400 |
commit | 15342c548918029827b7c5fa5b6a6d7ccac2a19a (patch) | |
tree | de52f9db66f858765478cce9812acf19033b3bde | |
parent | dabe32dd2cf730958920fcbcccf600c33a0468c8 (diff) | |
download | test262-15342c548918029827b7c5fa5b6a6d7ccac2a19a.tar.gz |
Bug 1466: add test262.py parameter to set loglevel
-rwxr-xr-x | tools/packaging/test262.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py index 7df05fa88..237584d03 100755 --- a/tools/packaging/test262.py +++ b/tools/packaging/test262.py @@ -66,6 +66,8 @@ def BuildOptions(): # to "both" result.add_option("--unmarked_default", default="non_strict", help="default mode for tests of unspecified strictness") + result.add_option("--loglevel", default="warning", + help="sets log level to debug, info, warning, error, or critical") return result @@ -441,6 +443,16 @@ def Main(): options.non_strict_only, options.unmarked_default) test_suite.Validate() + if options.loglevel == 'debug': + logging.basicConfig(level=logging.DEBUG) + elif options.loglevel == 'info': + logging.basicConfig(level=logging.INFO) + elif options.loglevel == 'warning': + logging.basicConfig(level=logging.WARNING) + elif options.loglevel == 'error': + logging.basicConfig(level=logging.ERROR) + elif options.loglevel == 'critical': + logging.basicConfig(level=logging.CRITICAL) if options.cat: test_suite.Print(args) else: |