diff options
-rwxr-xr-x | script/autobuild.py | 24 | ||||
-rwxr-xr-x | script/commit_mark.sh | 5 |
2 files changed, 26 insertions, 3 deletions
diff --git a/script/autobuild.py b/script/autobuild.py index 4a10092bce..a1b45906a9 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -8,43 +8,53 @@ import os, signal, tarfile, sys, time from optparse import OptionParser +samba_master = os.getenv('SAMBA_MASTER', 'git://git.samba.org/samba.git') +samba_master_ssh = os.getenv('SAMBA_MASTER_SSH', 'git+ssh://git.samba.org/data/git/samba.git') + cleanup_list = [] tasks = { "source3" : [ "./autogen.sh", "./configure.developer ${PREFIX}", "make basics", - "make -j", - "make test" ], + "make -j 4 everything", # don't use too many processes + "make install", + "TDB_NO_FSYNC=1 make test" ], "source4" : [ "./autogen.sh", "./configure.developer ${PREFIX}", "make -j", - "make test" ], + "make install", + "TDB_NO_FSYNC=1 make test" ], "source4/lib/ldb" : [ "./autogen-waf.sh", "./configure --enable-developer -C ${PREFIX}", "make -j", + "make install", "make test" ], "lib/tdb" : [ "./autogen-waf.sh", "./configure --enable-developer -C ${PREFIX}", "make -j", + "make install", "make test" ], "lib/talloc" : [ "./autogen-waf.sh", "./configure --enable-developer -C ${PREFIX}", "make -j", + "make install", "make test" ], "lib/replace" : [ "./autogen-waf.sh", "./configure --enable-developer -C ${PREFIX}", "make -j", + "make install", "make test" ], "lib/tevent" : [ "./autogen-waf.sh", "./configure --enable-developer -C ${PREFIX}", "make -j", + "make install", "make test" ], } @@ -226,8 +236,12 @@ parser.add_option("", "--verbose", help="show all commands as they are run", default=False, action="store_true") parser.add_option("", "--rebase", help="rebase on the given tree before testing", default=None, type='str') +parser.add_option("", "--rebase-master", help="rebase on %s before testing" % samba_master, + default=False, action='store_true') parser.add_option("", "--pushto", help="push to a git url on success", default=None, type='str') +parser.add_option("", "--push-master", help="push to %s on success" % samba_master_ssh, + default=False, action='store_true') parser.add_option("", "--mark", help="add a Tested-By signoff before pushing", default=False, action="store_true") @@ -258,6 +272,8 @@ except: try: if options.rebase is not None: rebase_tree(options.rebase) + elif options.rebase_master: + rebase_tree(samba_master) blist = buildlist(tasks, args) if options.tail: blist.start_tail() @@ -278,6 +294,8 @@ if status == 0: run_cmd(options.passcmd, dir=test_master) if options.pushto is not None: push_to(options.pushto) + elif options.push_master: + push_to(samba_master_ssh) if options.keeplogs: blist.tarlogs("logs.tar.gz") print("Logs in logs.tar.gz") diff --git a/script/commit_mark.sh b/script/commit_mark.sh index 38328c4827..bb1e9428a0 100755 --- a/script/commit_mark.sh +++ b/script/commit_mark.sh @@ -1,6 +1,11 @@ #!/bin/sh # add a autobuild message to the HEAD commit +if grep -q '^Autobuild.User' "$1"; then + echo "Already marked as tested" + exit 0 +fi + fullname=$(getent passwd $USER | cut -d: -f5| cut -d',' -f1) cat <<EOF >> "$1" Autobuild-User: $fullname <$USER@samba.org> |