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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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
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']
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | build/android/pylib/remote/device/appurify_sanitized.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698