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

Unified Diff: tools/unittests/run_perf_test.py

Issue 768143002: Add Android platform to performance runner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « tools/run_perf.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/unittests/run_perf_test.py
diff --git a/tools/unittests/run_perf_test.py b/tools/unittests/run_perf_test.py
index a384fb6d35f3cf30a601c8275b0cd0b154be9206..5ac0789ae86438923576c07b88830281dc2a9a81 100644
--- a/tools/unittests/run_perf_test.py
+++ b/tools/unittests/run_perf_test.py
@@ -391,3 +391,22 @@ class PerfTest(unittest.TestCase):
])
self._VerifyMock(
path.join("out", "x64.release", "d7"), "--flag", "run.js", timeout=70)
+
+ # Simple test that mocks out the android platform. Testing the platform would
+ # require lots of complicated mocks for the android tools.
+ def testAndroid(self):
+ self._WriteTestInput(V8_JSON)
+ platform = run_perf.Platform
+ platform.PreExecution = MagicMock(return_value=None)
+ platform.PostExecution = MagicMock(return_value=None)
+ platform.PreTests = MagicMock(return_value=None)
+ platform.Run = MagicMock(
+ return_value="Richards: 1.234\nDeltaBlue: 10657567\n")
+ run_perf.AndroidPlatform = MagicMock(return_value=platform)
+ self.assertEquals(
+ 0, self._CallMain("--android-build-tools", "/some/dir",
+ "--arch", "android_arm"))
+ self._VerifyResults("test", "score", [
+ {"name": "Richards", "results": ["1.234"], "stddev": ""},
+ {"name": "DeltaBlue", "results": ["10657567"], "stddev": ""},
+ ])
« no previous file with comments | « tools/run_perf.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698