Chromium Code Reviews| Index: build/android/pylib/local/device/local_device_test_run.py |
| diff --git a/build/android/pylib/local/device/local_device_test_run.py b/build/android/pylib/local/device/local_device_test_run.py |
| index fabd3aa9af56cbb16a2ed2d0dd326e879bf526d9..3fa2d7f5f202e07bae31166a8852b2bd1cf17cdf 100644 |
| --- a/build/android/pylib/local/device/local_device_test_run.py |
| +++ b/build/android/pylib/local/device/local_device_test_run.py |
| @@ -73,8 +73,9 @@ class LocalDeviceTestRun(test_run.TestRun): |
| thread.exit() |
| result = None |
| + rerun = None |
| try: |
| - result = self._RunTest(dev, test) |
| + result, rerun = self._RunTest(dev, test) |
| if isinstance(result, base_test_result.BaseTestResult): |
| results.AddResult(result) |
| elif isinstance(result, list): |
| @@ -84,12 +85,13 @@ class LocalDeviceTestRun(test_run.TestRun): |
| 'Unexpected result type: %s' % type(result).__name__) |
| except: |
| if isinstance(tests, test_collection.TestCollection): |
| - tests.add(test) |
| + rerun = test |
| raise |
| finally: |
| if isinstance(tests, test_collection.TestCollection): |
| tests.test_completed() |
|
mikecase (-- gone --)
2016/12/01 20:42:08
This is super edge case, but if the slowest shard
jbudorick
2016/12/02 01:45:21
Good catch. Reordered.
|
| - |
| + if rerun: |
| + tests.add(rerun) |
| logging.info('Finished running tests on this device.') |
| @@ -117,7 +119,7 @@ class LocalDeviceTestRun(test_run.TestRun): |
| test_names = (self._GetUniqueTestName(t) for t in tests) |
| try_results.AddResults( |
| base_test_result.BaseTestResult( |
| - t, base_test_result.ResultType.UNKNOWN) |
| + t, base_test_result.ResultType.NOTRUN) |
| for t in test_names if not t.endswith('*')) |
| try: |