| Index: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
|
| diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
|
| index df65f7dda022ed78d4994128eee6e7a333699ae3..137f259a3805b1cc1ede473343e20b2822f3de7c 100644
|
| --- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
|
| +++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
|
| @@ -36,6 +36,7 @@ import platform
|
| import Queue
|
| import re
|
| import StringIO
|
| +import signal
|
| import sys
|
| import thread
|
| import time
|
| @@ -56,6 +57,8 @@ from webkitpy.test.skip import skip_if
|
| from webkitpy.tool import grammar
|
| from webkitpy.tool.mocktool import MockOptions
|
|
|
| +# This mirrors what the shell normally does.
|
| +INTERRUPTED_EXIT_STATUS = signal.SIGINT + 128
|
|
|
| def parse_args(extra_args=None, tests_included=False, new_results=False, print_nothing=True):
|
| extra_args = extra_args or []
|
| @@ -291,11 +294,13 @@ class RunTest(unittest.TestCase, StreamTestingMixin):
|
| def test_keyboard_interrupt(self):
|
| # Note that this also tests running a test marked as SKIP if
|
| # you specify it explicitly.
|
| - self.assertRaises(KeyboardInterrupt, logging_run, ['failures/expected/keyboard.html', '--child-processes', '1'], tests_included=True)
|
| + host = MockHost()
|
| + details, _, _ = logging_run(['failures/expected/keyboard.html', '--child-processes', '1'], tests_included=True, host=host)
|
| + self.assertEqual(details.exit_code, INTERRUPTED_EXIT_STATUS)
|
|
|
| if self.should_test_processes:
|
| - self.assertRaises(KeyboardInterrupt, logging_run,
|
| - ['failures/expected/keyboard.html', 'passes/text.html', '--child-processes', '2', '--skipped=ignore'], tests_included=True, shared_port=False)
|
| + _, regular_output, _ = logging_run(['failures/expected/keyboard.html', 'passes/text.html', '--child-processes', '2', '--skipped=ignore'], tests_included=True, shared_port=False)
|
| + self.assertTrue(any(['Running 1 ' in line for line in regular_output.buflist]))
|
|
|
| def test_no_tests_found(self):
|
| details, err, _ = logging_run(['resources'], tests_included=True)
|
| @@ -962,7 +967,7 @@ class MainTest(unittest.TestCase):
|
| try:
|
| run_webkit_tests.run = interrupting_run
|
| res = run_webkit_tests.main([], stdout, stderr)
|
| - self.assertEqual(res, run_webkit_tests.INTERRUPTED_EXIT_STATUS)
|
| + self.assertEqual(res, INTERRUPTED_EXIT_STATUS)
|
|
|
| run_webkit_tests.run = successful_run
|
| res = run_webkit_tests.main(['--platform', 'test'], stdout, stderr)
|
|
|