Skip to content

Commit

Permalink
autobuild: Give a clearer failure message
Browse files Browse the repository at this point in the history
This helps when autobuild.py is used in --tail mode and
where there is neither e-mail nor access to the logs.tar.gz

Working back to find where the error happened is typically
quite difficult, as many failures are actually due to the
cleanup.

Signed-off-by: Andrew Bartlett <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>
  • Loading branch information
abartlet authored and metze-samba committed Jan 5, 2016
1 parent d60465c commit 9a91fce
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions script/autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,24 @@ def email_success(elapsed_time, log_base=None):
if options.email is not None:
email_failure(status, failed_task, failed_stage, failed_tag, errstr,
elapsed_time, log_base=options.log_base)
else:
elapsed_minutes = elapsed_time / 60.0
print '''
####################################################################
AUTOBUILD FAILURE
Your autobuild on %s failed after %.1f minutes
when trying to test %s with the following error:
%s
the autobuild has been abandoned. Please fix the error and resubmit.
####################################################################
''' % (platform.node(), elapsed_minutes, failed_task, errstr)

cleanup()
print(errstr)
Expand Down

0 comments on commit 9a91fce

Please sign in to comment.