From 9a91fce2deccfe0445363b2a35f2cfb72fdff766 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 21 Oct 2015 14:35:33 +1300 Subject: 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 --- script/autobuild.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/script/autobuild.py b/script/autobuild.py index 2d3af2a7db2..8d1060e9115 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -720,6 +720,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) -- cgit v1.2.1