Clean up --remote output.
Use cros_build_lib.DebugLevel to filter out the debug output.
BUG=chromium-os:21095
TEST=Ran locally
Change-Id: I29a670a255f5e470735aea4e9bfd07b529cdd67b
Reviewed-on: https://gerrit.chromium.org/gerrit/17674
Commit-Ready: Ryan Cui <rcui@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index 9f857e0..335ab60 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -691,7 +691,6 @@
dest='profile',
help=('Name of profile to sub-specify board variant.'))
parser.add_option('--remote', default=False, action='store_true',
- dest='remote',
help=('Specifies that this tryjob should be run remotely.'))
# Advanced options
@@ -836,7 +835,11 @@
if options.debug:
options.debug_forced = True
else:
- options.debug = not options.buildbot
+ # We don't set debug by default for
+ # 1. --buildbot invocations.
+ # 2. --remote invocations, because it needs to push changes to the tryjob
+ # repo.
+ options.debug = not options.buildbot and not options.remote
def _PostParseCheck(options, args):
@@ -883,14 +886,23 @@
_PostParseCheck(options, args)
if options.remote:
+ cros_lib.DebugLevel.SetDebugLevel(cros_lib.DebugLevel.WARNING)
+
# Verify configs are valid.
for bot in args:
_GetConfig(bot)
# Verify gerrit patches are valid.
+ print 'Verifying patches...'
_PreProcessPatches(options.gerrit_patches, options.local_patches)
- remote_try.RemoteTryJob(options, args).Submit()
+ print 'Submitting tryjob...'
+ tryjob = remote_try.RemoteTryJob(options, args)
+ tryjob.Submit(dryrun=options.debug)
+ print 'Tryjob submitted!'
+ print ('Go to %s to view the status of your job.'
+ % tryjob.GetTrybotConsoleLink())
+ print '**Please allow 1 minute for this job to show up on the console.**'
sys.exit(0)
if args: