Chromium Code Reviews| Index: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py |
| diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py |
| index d5a059be956e4d231714091670361e37ebd449af..490390c7ff24f53882ac83e3564ec649dc2dd6f1 100644 |
| --- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py |
| +++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py |
| @@ -31,12 +31,12 @@ |
| import logging |
| import optparse |
| import os |
| -import signal |
| import sys |
| import traceback |
| from webkitpy.common.host import Host |
| from webkitpy.layout_tests.controllers.manager import Manager |
| +from webkitpy.layout_tests.models.test_run_results import TestRunResults |
|
Dirk Pranke
2013/09/13 05:37:31
Change this to
from webkitpy.layout_tests.models
r.kasibhatla
2013/09/13 13:43:35
Done.
|
| from webkitpy.layout_tests.port import configuration_options, platform_options |
| from webkitpy.layout_tests.views import buildbot_results |
| from webkitpy.layout_tests.views import printing |
| @@ -45,9 +45,6 @@ from webkitpy.layout_tests.views import printing |
| _log = logging.getLogger(__name__) |
| -# This mirrors what the shell normally does. |
| -INTERRUPTED_EXIT_STATUS = signal.SIGINT + 128 |
| - |
| # This is a randomly chosen exit code that can be tested against to |
| # indicate that an unexpected exception occurred. |
| EXCEPTIONAL_EXIT_STATUS = 254 |
| @@ -78,13 +75,14 @@ def main(argv, stdout, stderr): |
| try: |
| run_details = run(port, options, args, stderr) |
| - if run_details.exit_code != -1: |
| + if run_details.exit_code != -1 and not run_details.initial_results.keyboard_interrupted: |
| bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug_rwt_logging) |
| bot_printer.print_results(run_details) |
| return run_details.exit_code |
| + # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest cases. |
| except KeyboardInterrupt: |
| - return INTERRUPTED_EXIT_STATUS |
| + return TestRunResults.INTERRUPTED_EXIT_STATUS |
|
Dirk Pranke
2013/09/13 05:37:31
Now you can use the old unqualified name here.
r.kasibhatla
2013/09/13 13:43:35
Done.
|
| except BaseException as e: |
| if isinstance(e, Exception): |
| print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) |