Title: [123382] trunk/Tools
Revision
123382
Author
[email protected]
Date
2012-07-23 14:21:25 -0700 (Mon, 23 Jul 2012)

Log Message

nrwt swallows early exceptions
https://bugs.webkit.org/show_bug.cgi?id=91884

Reviewed by Dirk Pranke.

Put everything in a try block so we won't miss any error.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(run):
(main):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (123381 => 123382)


--- trunk/Tools/ChangeLog	2012-07-23 21:07:12 UTC (rev 123381)
+++ trunk/Tools/ChangeLog	2012-07-23 21:21:25 UTC (rev 123382)
@@ -1,3 +1,16 @@
+2012-07-23  Balazs Kelemen  <[email protected]>
+
+        nrwt swallows early exceptions
+        https://bugs.webkit.org/show_bug.cgi?id=91884
+
+        Reviewed by Dirk Pranke.
+
+        Put everything in a try block so we won't miss any error.
+
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+        (run):
+        (main):
+
 2012-07-23  Christophe Dumez  <[email protected]>
 
         [WK2] WebKitTestRunner needs to print information about Web intents

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (123381 => 123382)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2012-07-23 21:07:12 UTC (rev 123381)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2012-07-23 21:21:25 UTC (rev 123382)
@@ -89,25 +89,26 @@
 
 
 def run(port, options, args, regular_output=sys.stderr, buildbot_output=sys.stdout):
-    warnings = _set_up_derived_options(port, options)
+    try:
+        warnings = _set_up_derived_options(port, options)
 
-    printer = printing.Printer(port, options, regular_output, buildbot_output, logger=logging.getLogger())
+        printer = printing.Printer(port, options, regular_output, buildbot_output, logger=logging.getLogger())
 
-    for warning in warnings:
-        _log.warning(warning)
+        for warning in warnings:
+            _log.warning(warning)
 
-    if options.help_printing:
-        printer.help_printing()
-        printer.cleanup()
-        return 0
+        if options.help_printing:
+            printer.help_printing()
+            printer.cleanup()
+            return 0
 
-    if options.lint_test_files:
-        return lint(port, options)
+        if options.lint_test_files:
+            return lint(port, options)
 
-    # We wrap any parts of the run that are slow or likely to raise exceptions
-    # in a try/finally to ensure that we clean up the logging configuration.
-    unexpected_result_count = -1
-    try:
+        # We wrap any parts of the run that are slow or likely to raise exceptions
+        # in a try/finally to ensure that we clean up the logging configuration.
+        unexpected_result_count = -1
+
         manager = Manager(port, options, printer)
         printer.print_config()
 
@@ -462,17 +463,16 @@
 
 
 def main(argv=None):
-    options, args = parse_args(argv)
-    if options.platform and 'test' in options.platform:
-        # It's a bit lame to import mocks into real code, but this allows the user
-        # to run tests against the test platform interactively, which is useful for
-        # debugging test failures.
-        from webkitpy.common.host_mock import MockHost
-        host = MockHost()
-    else:
-        host = Host()
-
     try:
+        options, args = parse_args(argv)
+        if options.platform and 'test' in options.platform:
+            # It's a bit lame to import mocks into real code, but this allows the user
+            # to run tests against the test platform interactively, which is useful for
+            # debugging test failures.
+            from webkitpy.common.host_mock import MockHost
+            host = MockHost()
+        else:
+            host = Host()
         port = host.port_factory.get(options.platform, options)
     except NotImplementedError, e:
         # FIXME: is this the best way to handle unsupported port names?
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to