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

Unified Diff: infra/bots/recipes/swarm_perf.py

Issue 2263323002: Apply gerrit ref if it is a Gerrit patch (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Align Created 4 years, 4 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: infra/bots/recipes/swarm_perf.py
diff --git a/infra/bots/recipes/swarm_perf.py b/infra/bots/recipes/swarm_perf.py
index 60ebaee88beff80b3c7fa4d59a98cb731a653bad..5651a8742862e402a19da54af652d19c58279cd4 100644
--- a/infra/bots/recipes/swarm_perf.py
+++ b/infra/bots/recipes/swarm_perf.py
@@ -170,10 +170,18 @@ def perf_steps(api):
'build_number', api.vars.build_number,
]
if api.vars.is_trybot:
- properties.extend([
- 'issue', api.vars.issue,
- 'patchset', api.vars.patchset,
- ])
+ if api.vars.patch_storage == 'gerrit':
+ properties.extend([
+ 'patch_storage', api.vars.patch_storage,
+ 'repository', api.vars.gerrit_repository,
+ 'event.patchSet.ref', api.vars.gerrit_ref,
+ 'event.change.number', api.vars.gerrit_issue,
+ ])
+ else:
+ properties.extend([
+ 'issue', api.vars.issue,
+ 'patchset', api.vars.patchset,
+ ])
target = 'nanobench'
if 'VisualBench' in api.vars.builder_name:
@@ -327,3 +335,23 @@ def GenTests(api):
) +
api.platform('win', 64)
)
+
+ gerrit_kwargs = {
+ 'patch_storage': 'gerrit',
+ 'repository': 'skia',
+ 'event.patchSet.ref': 'refs/changes/00/2100/2',
+ 'event.change.number': '2100',
+ }
+ yield (
+ api.test('recipe_with_gerrit_patch') +
+ api.properties(
+ buildername='Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-' +
+ 'Valgrind-Trybot',
+ mastername='client.skia',
+ slavename='skiabot-linux-swarm-000',
+ buildnumber=5,
+ path_config='kitchen',
+ swarm_out_dir='[SWARM_OUT_DIR]',
+ revision='abc123',
+ **gerrit_kwargs)
+ )

Powered by Google App Engine
This is Rietveld 408576698