Skip to content
Snippets Groups Projects
Commit 06879c04 authored by Dan Schaffer's avatar Dan Schaffer
Browse files

Bug 1466: add test262.py parameter to set loglevel

parent 1cb9ed43
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,8 @@ def BuildOptions(): ...@@ -66,6 +66,8 @@ def BuildOptions():
# to "both" # to "both"
result.add_option("--unmarked_default", default="non_strict", result.add_option("--unmarked_default", default="non_strict",
help="default mode for tests of unspecified strictness") 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 return result
...@@ -441,6 +443,16 @@ def Main(): ...@@ -441,6 +443,16 @@ def Main():
options.non_strict_only, options.non_strict_only,
options.unmarked_default) options.unmarked_default)
test_suite.Validate() 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: if options.cat:
test_suite.Print(args) test_suite.Print(args)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment