summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-09-22 02:40:19 +0200
committerStefan Metzmacher <metze@samba.org>2012-09-22 23:21:59 +0200
commitf339c1fd91baaff1d727cda1a30b0963423dcb5b (patch)
tree2a237c4eaa524bd814dd39dd3e147b83a601a883
parent1362bb548c9cb6d3e688ab102bd1d8166d73d95f (diff)
downloadsamba-f339c1fd91baaff1d727cda1a30b0963423dcb5b.tar.gz
samba-f339c1fd91baaff1d727cda1a30b0963423dcb5b.tar.bz2
samba-f339c1fd91baaff1d727cda1a30b0963423dcb5b.zip
script/autobuild.py: add --log-base option
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Sep 22 23:21:59 CEST 2012 on sn-devel-104
-rwxr-xr-xscript/autobuild.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/script/autobuild.py b/script/autobuild.py
index ec1868ad47..9fdea3b1a6 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -487,6 +487,8 @@ parser.add_option("", "--daemon", help="daemonize after initial setup",
action="store_true")
parser.add_option("", "--branch", help="the branch to work on (default=master)",
default="master", type='str')
+parser.add_option("", "--log-base", help="location where the logs can be found (default=cwd)",
+ default=None, type='str')
def email_failure(status, failed_task, failed_stage, failed_tag, errstr, log_base=None):
'''send an email to options.email about the failure'''
@@ -622,7 +624,8 @@ while True:
cleanup_list.append(gitroot + "/autobuild.pid")
cleanup()
email_failure(-1, 'rebase', 'rebase', 'rebase',
- 'rebase on %s failed' % options.branch)
+ 'rebase on %s failed' % options.branch,
+ log_base=options.log_base)
sys.exit(1)
blist = buildlist(tasks, args, rebase_url, rebase_branch=options.branch)
if options.tail:
@@ -655,7 +658,7 @@ if status == 0:
blist.tarlogs("logs.tar.gz")
print("Logs in logs.tar.gz")
if options.always_email:
- email_success()
+ email_success(log_base=options.log_base)
blist.remove_logs()
cleanup()
print(errstr)
@@ -665,7 +668,7 @@ if status == 0:
blist.tarlogs("logs.tar.gz")
if options.email is not None:
- email_failure(status, failed_task, failed_stage, failed_tag, errstr)
+ email_failure(status, failed_task, failed_stage, failed_tag, errstr, log_base=options.log_base)
cleanup()
print(errstr)