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

Unified Diff: tools/perf/scripts_smoke_unittest.py

Issue 1506633002: [tools/perf] Add smoke test cover for record_wpr list command (Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/scripts_smoke_unittest.py
diff --git a/tools/perf/scripts_smoke_unittest.py b/tools/perf/scripts_smoke_unittest.py
index c8ea208794a02e8aa8c9a4dd7661eae0640d54a9..503d3890cde56e68af8840c293a25ae8ffe58b50 100644
--- a/tools/perf/scripts_smoke_unittest.py
+++ b/tools/perf/scripts_smoke_unittest.py
@@ -24,8 +24,8 @@ class ScriptsSmokeTest(unittest.TestCase):
def testRunBenchmarkHelp(self):
return_code, stdout = self.RunPerfScript('run_benchmark help')
+ self.assertEquals(return_code, 0, stdout)
self.assertIn('Available commands are', stdout)
- self.assertEquals(return_code, 0)
def testRunBenchmarkRunListsOutBenchmarks(self):
return_code, stdout = self.RunPerfScript('run_benchmark run')
@@ -39,14 +39,24 @@ class ScriptsSmokeTest(unittest.TestCase):
def testRunBenchmarkListListsOutBenchmarks(self):
return_code, stdout = self.RunPerfScript('run_benchmark list')
+ self.assertEquals(return_code, 0, stdout)
self.assertIn('Pass --browser to list benchmarks', stdout)
self.assertIn('dummy_benchmark.stable_benchmark_1', stdout)
- self.assertEquals(return_code, 0)
def testRunRecordWprHelp(self):
return_code, stdout = self.RunPerfScript('record_wpr')
+ self.assertEquals(return_code, 0, stdout)
self.assertIn('optional arguments:', stdout)
- self.assertEquals(return_code, 0)
+
+ def testRunRecordWprList(self):
+ return_code, stdout = self.RunPerfScript('record_wpr --list-benchmarks')
+ # TODO(nednguyen): Remove this once we figure out why importing
+ # small_profile_extender fails on Android dbg.
+ # crbug.com/561668
+ if 'ImportError: cannot import name small_profile_extender' in stdout:
+ self.skipTest('small_profile_extender is missing')
+ self.assertEquals(return_code, 0, stdout)
+ self.assertIn('kraken', stdout)
def testRunBenchmarkListJSONListsOutBenchmarks(self):
tmp_file = tempfile.NamedTemporaryFile(delete=False)
« 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