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

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

Issue 1176613002: Catch IOError when reading chartjson results in test_runner.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 991fc003049152246d89d15f290b88c8c1b228c9..0dd7be3f7d7daa300a6cf691b23147317dcfb443 100644
--- a/build/android/pylib/perf/test_runner.py
+++ b/build/android/pylib/perf/test_runner.py
@@ -233,8 +233,15 @@ class TestRunner(base_test_runner.BaseTestRunner):
return ''
json_output_path = os.path.join(self._output_dir, 'results-chart.json')
- with open(json_output_path) as f:
- return f.read()
+ try:
+ with open(json_output_path) as f:
+ return f.read()
+ except IOError, e:
+ logging.error('Exception when reading chartjson: %s', e)
jbudorick 2015/06/09 19:54:17 logging.exception
+ logging.error('This usually means that telemetry did not run, so it could'
+ ' not generate the file. Please check the device running'
+ ' the test.')
+ return ''
def _LaunchPerfTest(self, test_name):
"""Runs a perf test.
« 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