diff options
author | Andrew Bartlett <abartlet@samba.org> | 2016-01-04 14:20:54 +1300 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-01-05 09:10:24 +0100 |
commit | cce16123feedfbf0e325182c6e301377d8a60749 (patch) | |
tree | a8777a7c0ec9b9993785445dee8cdc62399a5b22 | |
parent | 9a91fce2deccfe0445363b2a35f2cfb72fdff766 (diff) | |
download | samba-cce16123feedfbf0e325182c6e301377d8a60749.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>
-rwxr-xr-x | script/autobuild.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/script/autobuild.py b/script/autobuild.py index 8d1060e9115..952bbb58e70 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -220,7 +220,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] @@ -243,7 +243,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): @@ -282,7 +285,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" @@ -306,7 +309,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): |