From 99bcb0e676eb396bcf8e1af3903aa4b578aeeee0 Mon Sep 17 00:00:00 2001 From: "nodir@chromium.org" Date: Thu, 19 Mar 2015 16:37:01 +0000 Subject: [PATCH] git try -t support for Gerrit If testfilter parameter is passed, put it in to the gerrit tryjob as a property. Later it will be processed by GerritPoller on Buildbot master. R=victorhsieh@chromium.org BUG=468075 Review URL: https://codereview.chromium.org/1019713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294500 0039d316-1c4b-4281-b951-d872f2087c98 --- trychange.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trychange.py b/trychange.py index 719275a12c..03e59b37f7 100755 --- a/trychange.py +++ b/trychange.py @@ -727,6 +727,7 @@ def _SendChangeGerrit(bot_spec, options): Gerrit message format: starts with !tryjob, optionally followed by a tryjob definition in JSON format: buildNames: list of strings specifying build names. + build_properties: a dict of build properties. """ logging.info('Sending by Gerrit') @@ -752,9 +753,14 @@ def _SendChangeGerrit(bot_spec, options): def FormatMessage(): # Build job definition. job_def = {} + build_properties = {} + if options.testfilter: + build_properties['testfilter'] = options.testfilter builderNames = [builder for builder, _ in bot_spec] if builderNames: job_def['builderNames'] = builderNames + if build_properties: + job_def['build_properties'] = build_properties # Format message. msg = '!tryjob'