Commit 568f473e authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

bot_update: add mooooooore chars in logs.

Before, bot_update would print after command:
  Succeeded (Failed) in 0.1 mins
but figuring out which command takes a lot of scrolling/searching
for previous
  Running <cmd with args>
This CL fixes that:
  Succeeded (Failed) in 0.1 mins <cmd with args>



R=machenbach@chromium.org, maruel@chromium.org
TEST=end-to-end with led tool, but only on LUCI stack.

Bug: 749709
Change-Id: Id3031a12b9013ab136ea03cdf6d325930722e50f
Reviewed-on: https://chromium-review.googlesource.com/787175Reviewed-by: 's avatarMarc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
parent d51ed57e
......@@ -151,7 +151,7 @@ def call(*args, **kwargs): # pragma: no cover
print '===Injecting Environment Variables==='
for k, v in sorted(new_env.items()):
print '%s: %s' % (k, v)
print '===Running %s===' % (' '.join(args),)
print '===Running %s ===' % (' '.join(args),)
print 'In directory: %s' % cwd
start_time = time.time()
proc = subprocess.Popen(args, **kwargs)
......@@ -184,13 +184,13 @@ def call(*args, **kwargs): # pragma: no cover
elapsed_time = ((time.time() - start_time) / 60.0)
outval = out.getvalue()
if code:
print '===Failed in %.1f mins===' % elapsed_time
print '===Failed in %.1f mins of %s ===' % (elapsed_time, ' '.join(args))
print
raise SubprocessFailed('%s failed with code %d in %s.' %
(' '.join(args), code, cwd),
code, outval)
print '===Succeeded in %.1f mins===' % elapsed_time
print '===Succeeded in %.1f mins of %s ===' % (elapsed_time, ' '.join(args))
print
return outval
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment