diff --git a/git_cl.py b/git_cl.py index f884eaa6c6..6c7afe48f5 100755 --- a/git_cl.py +++ b/git_cl.py @@ -1591,6 +1591,14 @@ def CMDtry(parser, args): (b, forced_tests) for b, t in builders_and_tests.iteritems() if t != ['compile']) + if any('triggered' in b for b in builders_and_tests): + print >> sys.stderr, ( + 'ERROR You are trying to send a job to a triggered bot. This type of' + ' bot requires an\ninitial job from a parent (usually a builder). ' + 'Instead send your job to the parent.\n' + 'Bot list: %s' % builders_and_tests) + return 1 + patchset = cl.GetPatchset() if not cl.GetPatchset(): patchset = cl.GetMostRecentPatchset(cl.GetIssue()) diff --git a/trychange.py b/trychange.py index 39b827b10b..73c81ee543 100755 --- a/trychange.py +++ b/trychange.py @@ -836,6 +836,13 @@ def TryChange(argv, # If no bot is specified, either the default pool will be selected or the # try server will refuse the job. Either case we don't need to interfere. + if any('triggered' in b.split(':', 1)[0] for b in options.bot): + print >> sys.stderr, ( + 'ERROR You are trying to send a job to a triggered bot. This type of' + ' bot requires an\ninitial job from a parent (usually a builder). ' + 'Instead send your job to the parent.\nBot list: %s' % options.bot) + return 1 + if options.print_bots: print 'Bots which would be used:' for bot in options.bot: