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

Unified Diff: tools/perf/core/trybot_command_unittest.py

Issue 1765483002: [tools/perf] Skip try job run if trybot config file does not change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« tools/perf/core/trybot_command.py ('K') | « tools/perf/core/trybot_command.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/core/trybot_command_unittest.py
diff --git a/tools/perf/core/trybot_command_unittest.py b/tools/perf/core/trybot_command_unittest.py
index b18b0fd95ae79fa4373bf04f5901f2414336df8f..f26d9decbd9507b75b82dbc7ca3c0bc790fe5b1a 100644
--- a/tools/perf/core/trybot_command_unittest.py
+++ b/tools/perf/core/trybot_command_unittest.py
@@ -55,6 +55,9 @@ class TrybotCommandTest(unittest.TestCase):
counter = [-1]
def side_effect(args, **kwargs):
+ if not expected_args_list:
+ self.fail(
+ 'Not expect any Popen() call but got a Popen call with %s\n' % args)
del kwargs # unused
counter[0] += 1
expected_args, expected_responses = expected_args_list[counter[0]]
@@ -487,6 +490,24 @@ class TrybotCommandTest(unittest.TestCase):
trybot_command.TrybotError, command._UpdateConfigAndRunTryjob,
'android', cfg_filename, [])
+ def testUpdateConfigSkipTryjob(self):
+ self._MockTryserverJson({'win_perf_bisect': 'stuff'})
+ command = trybot_command.Trybot()
+ command._InitializeBuilderNames('win-x64')
+ self._ExpectProcesses(())
+ cfg_filename = 'tools/run-perf-test.cfg'
+ cfg_data = '''config = {
+ "command": "python tools\\\\perf\\\\run_benchmark --browser=release_x64",
+ "max_time_minutes": "120",
+ "repeat_count": "1",
+ "target_arch": "x64",
+ "truncate_percent": "0"
+}'''
+ self._stubs.open.files = {cfg_filename: cfg_data}
+ self.assertEquals((trybot_command.NO_CHANGES, ''),
+ command._UpdateConfigAndRunTryjob(
+ 'win-x64', cfg_filename, []))
+
def testUpdateConfigGitTry(self):
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
command = trybot_command.Trybot()
« tools/perf/core/trybot_command.py ('K') | « tools/perf/core/trybot_command.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698