]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
autobuild: Give a clearer failure message
authorAndrew Bartlett <abartlet@samba.org>
Wed, 21 Oct 2015 01:35:33 +0000 (14:35 +1300)
committerStefan Metzmacher <metze@samba.org>
Tue, 16 Aug 2016 07:59:11 +0000 (09:59 +0200)
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 <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 9a91fce2deccfe0445363b2a35f2cfb72fdff766)

script/autobuild.py

index c7ca632ac8145044ad309b7fae9abca38bc44e15..54e88f952007c5412767a0ea84ef710f18bc02cf 100755 (executable)
@@ -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)