| 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..31eb0e9e9a4e4efa11cdcfe715d406c5a266fdb7 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:
|
| + logging.exception('Exception when reading chartjson.')
|
| + 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.
|
| @@ -266,6 +273,10 @@ class TestRunner(base_test_runner.BaseTestRunner):
|
| logging.info(
|
| 'temperature: %s (0.1 C)',
|
| str(self._device_battery.GetBatteryInfo().get('temperature')))
|
| + if self._options.max_battery_temp:
|
| + self._device_battery.LetBatteryCoolToTemperature(
|
| + self._options.max_battery_temp)
|
| +
|
| logging.info('%s : %s', test_name, cmd)
|
| start_time = datetime.datetime.now()
|
|
|
|
|