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

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

Issue 2400003002: Remove CL upload logic from Perf Try Job workflow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 2 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 6a2cef0aed88ac10cea9447d24a174045d2be939..c155a7d961d3fe3421311cfe1a42d6860fb059c8 100644
--- a/tools/perf/core/trybot_command_unittest.py
+++ b/tools/perf/core/trybot_command_unittest.py
@@ -442,49 +442,38 @@ class TrybotCommandTest(unittest.TestCase):
{'win_perf_bisect': 'stuff'}
)
- def testUploadPatchToRietveldGitCommandFailed(self):
- command, options = self._SetupTrybotCommand({'linux_perf_bisect': 'stuff'},
- 'linux')
+
+ def testGetChangeListCommandError(self):
+ command, _ = self._SetupTrybotCommand(
+ {'linux_perf_bisect': 'stuff'}, 'linux')
self._ExpectProcesses((
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for src perf tryjob to run sunspider benchmark on linux '
- 'platform(s)')],
- (128, None, None)),
+ (['git', 'cl', 'issue'], (128, None, None)),
))
self._AssertTryBotExceptions(
- 'Could not upload to rietveld for src',
- command._UploadPatchToRietveld,
- 'src',
- options
- )
+ 'Failed to run "git cl issue" command.',
+ command._GetChangeList)
- def testUploadPatchToRietveldNoURLMatchFound(self):
- command, options = self._SetupTrybotCommand({'linux_perf_bisect': 'stuff'},
- 'linux')
+ def testGetChangeListNoIssues(self):
+ command, _ = self._SetupTrybotCommand(
+ {'linux_perf_bisect': 'stuff'}, 'linux')
self._ExpectProcesses((
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for src perf tryjob to run sunspider benchmark on linux '
- 'platform(s)')],
- (0, 'stuff https://dummy.chromium.org/12345 stuff', None)),
+ (['git', 'cl', 'issue'], (0, 'Issue number: None (None)', None)),
))
self._AssertTryBotExceptions(
- 'Could not upload CL to rietveld for src!',
- command._UploadPatchToRietveld,
- 'src',
- options
- )
-
- def testUploadPatchToRietveldOnSuccess(self):
- command, options = self._SetupTrybotCommand({'linux_perf_bisect': 'stuff'},
- 'linux')
+ ('PLEASE NOTE: The workflow for Perf Try jobs is changed. '
+ 'In order to run the perf try job, you must first upload your '
+ 'changes to rietveld.'),
+ command._GetChangeList)
+
+ def testGetChangeListWithIssue(self):
+ command, _ = self._SetupTrybotCommand(
+ {'linux_perf_bisect': 'stuff'}, 'linux')
self._ExpectProcesses((
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for src perf tryjob to run sunspider benchmark on linux '
- 'platform(s)')],
+ (['git', 'cl', 'issue'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
))
- self.assertEquals(command._UploadPatchToRietveld('src', options),
- 'https://codereview.chromium.org/12345')
+ self.assertEquals('https://codereview.chromium.org/12345',
+ command._GetChangeList())
def testRunTryJobFailed(self):
test_args = self._ExpectedGitTryTestArgs('sunspider', 'release')
@@ -621,16 +610,14 @@ class TrybotCommandTest(unittest.TestCase):
(['git', 'update-index', '--refresh', '-q'], (0, '', None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'footers', 'HEAD'], (0, '', None)),
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for src perf tryjob to run sunspider benchmark on linux '
- 'platform(s)')],
+ (['git', 'cl', 'issue'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf',
'-p', test_args, '-b', 'linux_perf_bisect'], (0, '', None))
))
command._AttemptTryjob(options, [])
- output = ('Uploaded try job to rietveld.\n'
+ output = ('Running try job....\n'
'view progress here https://codereview.chromium.org/12345.\n'
'\tRepo Name: src\n'
'\tPath: %s\n'
@@ -663,9 +650,7 @@ class TrybotCommandTest(unittest.TestCase):
(['git', 'update-index', '--refresh', '-q'], (0, '', None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'footers', 'HEAD'], (0, '', None)),
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for src perf tryjob to run sunspider benchmark on all '
- 'platform(s)')],
+ (['git', 'cl', 'issue'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf',
'-p', default_config, '-b', 'win_perf_bisect'], (0, '', None)),
@@ -679,7 +664,7 @@ class TrybotCommandTest(unittest.TestCase):
'-p', default_config, '-b', 'linux_perf_bisect'], (0, '', None)),
))
command._AttemptTryjob(options, [])
- output = ('Uploaded try job to rietveld.\n'
+ output = ('Running try job....\n'
'view progress here https://codereview.chromium.org/12345.\n'
'\tRepo Name: src\n'
'\tPath: %s\n'
@@ -716,9 +701,7 @@ class TrybotCommandTest(unittest.TestCase):
(['git', 'config', 'remote.origin.url'],
(0, 'https://chromium.googlesource.com/v8/v8.git', None)),
(['git', 'rev-parse', 'br1@{upstream}'], (0, 'feedbeed', None)),
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for v8 perf tryjob to run sunspider benchmark on linux '
- 'platform(s)')],
+ (['git', 'cl', 'issue'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf',
'-p', test_args, '-p', deps_override_arg,
@@ -726,7 +709,7 @@ class TrybotCommandTest(unittest.TestCase):
))
command._AttemptTryjob(options, [])
- output = ('Uploaded try job to rietveld.\n'
+ output = ('Running try job....\n'
'view progress here https://codereview.chromium.org/12345.\n'
'\tRepo Name: v8\n'
'\tPath: root/path_to/repo/v8\n'
@@ -766,9 +749,7 @@ class TrybotCommandTest(unittest.TestCase):
(0, 'https://chromium.googlesource.com/v8/v8.git', None)),
(['git', 'rev-parse', 'br1@{upstream}'],
(0, 'feedbeed', None)),
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for v8 perf tryjob to run sunspider benchmark on all '
- 'platform(s)')],
+ (['git', 'cl', 'issue'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf',
'-p', android_config, '-p', deps_override_arg,
@@ -781,7 +762,7 @@ class TrybotCommandTest(unittest.TestCase):
'-b', 'linux_perf_bisect'], (0, '', None)),
))
command._AttemptTryjob(options, [])
- output = ('Uploaded try job to rietveld.\n'
+ output = ('Running try job....\n'
'view progress here https://codereview.chromium.org/12345.\n'
'\tRepo Name: v8\n'
'\tPath: root/path_to/repo/v8\n'
@@ -808,9 +789,7 @@ class TrybotCommandTest(unittest.TestCase):
(['git', 'update-index', '--refresh', '-q'], (0, '', None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'footers', 'HEAD'], (0, '', None)),
- (['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
- ('CL for v8 perf tryjob to run sunspider benchmark on linux '
- 'platform(s)')],
+ (['git', 'cl', 'issue'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf',
'-p', test_args, '-p', deps_override_arg,
@@ -818,7 +797,7 @@ class TrybotCommandTest(unittest.TestCase):
))
command._AttemptTryjob(options, [])
- output = ('Uploaded try job to rietveld.\n'
+ output = ('Running try job....\n'
'view progress here https://codereview.chromium.org/12345.\n'
'\tRepo Name: v8\n'
'\tPath: root/path_to/repo/v8\n'
« 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