Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Unified Diff: build/android/pylib/local/device/local_device_test_run.py

Issue 2541093004: [Android] Try harder to run every gtest within each try. (Closed)
Patch Set: Tweak NOTRUN handling. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698