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

Unified Diff: build/android/pylib/perf/test_runner.py

Issue 649423002: Try to wait for devices to come back after a perf test failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use new api Created 6 years, 2 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf/test_runner.py
diff --git a/build/android/pylib/perf/test_runner.py b/build/android/pylib/perf/test_runner.py
index d74499f704850588a755ea79fb3d9930772a6f78..c8563a69fbf92ad533b803d044a0803e25335348 100644
--- a/build/android/pylib/perf/test_runner.py
+++ b/build/android/pylib/perf/test_runner.py
@@ -61,6 +61,7 @@ from pylib import constants
from pylib import forwarder
from pylib.base import base_test_result
from pylib.base import base_test_runner
+from pylib.device import device_errors
def OutputJsonList(json_input, json_output):
@@ -252,9 +253,19 @@ class TestRunner(base_test_runner.BaseTestRunner):
logging.info('%s : exit_code=%d in %d secs at %s',
test_name, exit_code, (end_time - start_time).seconds,
self.device_serial)
- result_type = base_test_result.ResultType.FAIL
+
if exit_code == 0:
result_type = base_test_result.ResultType.PASS
+ else:
+ result_type = base_test_result.ResultType.FAIL
+ # Since perf tests use device affinity, give the device a chance to
+ # recover if it is offline after a failure. Otherwise, the master sharder
+ # will remove it from the pool and future tests on this device will fail.
+ try:
+ self.device.WaitUntilFullyBooted(timeout=120)
+ except device_errors.CommandTimeoutError as e:
+ logging.error('Device failed to return after %s: %s' % (test_name, e))
+
actual_exit_code = exit_code
if test_name in self._flaky_tests:
# The exit_code is used at the second stage when printing the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698