Chromium Code Reviews| Index: Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py |
| diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py |
| index b51066a0125297d2dacb6ace36f174d9ee7e8a10..889b18f14c981a337ec2a07b11aefa7f018ac36b 100644 |
| --- a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py |
| +++ b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py |
| @@ -37,6 +37,7 @@ from webkitpy.layout_tests.models.test_run_results import TestRunResults |
| from webkitpy.layout_tests.models import test_expectations |
| from webkitpy.layout_tests.models import test_failures |
| from webkitpy.layout_tests.models import test_results |
| +from webkitpy.layout_tests.port import driver |
| from webkitpy.tool import grammar |
| @@ -238,9 +239,16 @@ class Worker(object): |
| def handle(self, name, source, test_list_name, test_inputs): |
| assert name == 'test_list' |
| for i, test_input in enumerate(test_inputs): |
| - device_offline = self._run_test(test_input, test_list_name) |
| - if device_offline: |
| - self._caller.post('device_offline', test_list_name, test_inputs[i + 1:]) |
| + try: |
| + device_offline = self._run_test(test_input, test_list_name) |
| + # FIXME: Do we need both the DriverOutput.device_offline and the exception? |
| + if device_offline: |
|
Peter Beverloo
2013/10/15 16:40:08
nit: throw a DeviceOffline exception to avoid code
|
| + self._caller.post('device_offline', test_list_name, test_inputs[i + 1:]) |
| + self._caller.stop_running() |
| + return |
| + except driver.DeviceOffline as e: |
| + _log.error('Device offline: %s' % repr(e)) |
| + self._caller.post('device_offline', test_list_name, test_inputs[i:]) |
| self._caller.stop_running() |
| return |