| 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 a8048d4a9e68946c9e2baa98f0239405be4817d4..b7fadd23e724807751dadbf00344378f3a18315b 100644
|
| --- a/build/android/pylib/perf/test_runner.py
|
| +++ b/build/android/pylib/perf/test_runner.py
|
| @@ -75,19 +75,12 @@ def OutputJsonList(json_input, json_output):
|
| return 0
|
|
|
|
|
| -def OutputChartjson(test_name, json_file_name):
|
| - file_name = os.path.join(constants.PERF_OUTPUT_DIR, test_name)
|
| - with file(file_name, 'r') as f:
|
| - persisted_result = pickle.load(f)
|
| - with open(json_file_name, 'w') as o:
|
| - o.write(persisted_result['chartjson'])
|
| -
|
| -
|
| -def PrintTestOutput(test_name):
|
| +def PrintTestOutput(test_name, json_file_name=None):
|
| """Helper method to print the output of previously executed test_name.
|
|
|
| Args:
|
| test_name: name of the test that has been previously executed.
|
| + json_file_name: name of the file to output chartjson data to.
|
|
|
| Returns:
|
| exit code generated by the test step.
|
| @@ -105,6 +98,10 @@ def PrintTestOutput(test_name):
|
| logging.info('*' * 80)
|
| print persisted_result['output']
|
|
|
| + if json_file_name:
|
| + with file(json_file_name, 'w') as f:
|
| + f.write(persisted_result['chartjson'])
|
| +
|
| return persisted_result['exit_code']
|
|
|
|
|
|
|