From: Andrew Bartlett Date: Wed, 21 Oct 2015 01:35:33 +0000 (+1300) Subject: autobuild: Give a clearer failure message X-Git-Tag: samba-4.3.12~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b5b848c7d5fcf445b77431d7c52408873721a6a;p=thirdparty%2Fsamba.git autobuild: Give a clearer failure message 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 Reviewed-by: Stefan Metzmacher (cherry picked from commit 9a91fce2deccfe0445363b2a35f2cfb72fdff766) --- diff --git a/script/autobuild.py b/script/autobuild.py index c7ca632ac81..54e88f95200 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -680,6 +680,24 @@ blist.tarlogs("logs.tar.gz") 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)