summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-01-04 14:20:54 +1300
committerKarolin Seeger <kseeger@samba.org>2016-10-20 10:43:28 +0200
commitcdc53e774037733578df50a2663719f27dd9b41f (patch)
tree01b8210174b84d802dd08a1e4bd7b135077a95b2
parent69ea4baefdb858b33a72c2f8226d54a2292f6dd1 (diff)
downloadsamba-cdc53e774037733578df50a2663719f27dd9b41f.tar.gz
autobuild: Use cp --recursive --link --archive
This works on waf based builds as source files are not modified during the build TODO: In order to make sure build doesn't influence each other, we need to add something like: try: if options.rebase is not None: rebase_tree(options.rebase, rebase_branch=options.branch) + run_cmd("find -type f | xargs chmod -w", show=True, dir=test_master) except Exception: But that means we need to change the way 'make distcheck' works for the standalone libraries. For now this will help to reduce the (mem)disk usage of an autobuild a lot. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit cce16123feedfbf0e325182c6e301377d8a60749)
-rwxr-xr-xscript/autobuild.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/script/autobuild.py b/script/autobuild.py
index 3777de7ce64..4b43bc9490a 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -192,7 +192,7 @@ def run_cmd(cmd, dir=".", show=None, output=False, checkfail=True):
class builder(object):
'''handle build of one directory'''
- def __init__(self, name, sequence):
+ def __init__(self, name, sequence, cp=True):
self.name = name
self.dir = builddirs[name]
@@ -215,7 +215,10 @@ class builder(object):
cleanup_list.append(self.prefix)
os.makedirs(self.sdir)
run_cmd("rm -rf %s" % self.sdir)
- run_cmd("git clone --recursive --shared %s %s" % (test_master, self.sdir), dir=test_master, show=True)
+ if cp:
+ run_cmd("cp --recursive --link --archive %s %s" % (test_master, self.sdir), dir=test_master, show=True)
+ else:
+ run_cmd("git clone --recursive --shared %s %s" % (test_master, self.sdir), dir=test_master, show=True)
self.start_next()
def start_next(self):
@@ -254,7 +257,7 @@ class buildlist(object):
os.environ['AUTOBUILD_RANDOM_SLEEP_OVERRIDE'] = '1'
for n in tasknames:
- b = builder(n, tasks[n])
+ b = builder(n, tasks[n], cp=n is not "pidl")
self.tlist.append(b)
if options.retry:
rebase_remote = "rebaseon"
@@ -278,7 +281,7 @@ class buildlist(object):
),
"test/plain" ) ]
- self.retry = builder('retry', retry_task)
+ self.retry = builder('retry', retry_task, cp=False)
self.need_retry = False
def kill_kids(self):