From: Guido Draheim Date: Tue, 14 Apr 2020 00:33:57 +0000 (+0200) Subject: allow to compare automake vs cmake builds X-Git-Tag: v0.13.71~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=029a8eaee06d98ff9ea1d90f187eb9d75f87859d;p=zziplib allow to compare automake vs cmake builds --- diff --git a/testbuilds.py b/testbuilds.py index 23b8b0d..4c194fa 100755 --- a/testbuilds.py +++ b/testbuilds.py @@ -936,6 +936,47 @@ class ZZiplibBuildTest(unittest.TestCase): cmd = "docker rmi {images}:{testname}" sx____(cmd.format(**locals())) self.rm_testdir() + def test_911_centos7_automake_dockerfile(self): + if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") + testname1=self.testname() + "_1" + testname2=self.testname() + "_2" + testdir = self.testdir() + dockerfile1="testbuilds/centos7-automake.dockerfile" + dockerfile2="testbuilds/centos7-build.dockerfile" + addhosts = self.local_addhosts(dockerfile1) + savename1 = docname(dockerfile1) + savename2 = docname(dockerfile2) + saveto = SAVETO + images = IMAGES + cmd = "docker rm --force {testname1}" + sx____(cmd.format(**locals())) + cmd = "docker rm --force {testname2}" + sx____(cmd.format(**locals())) + cmd = "docker run -d --name {testname1} {addhosts} {saveto}/{savename1} sleep 600" + sh____(cmd.format(**locals())) + cmd = "docker run -d --name {testname2} {addhosts} {saveto}/{savename2} sleep 600" + # + sh____(cmd.format(**locals())) + cmd = "docker exec {testname2} bash -c 'cd /usr/local && tar czvf /local.tgz .'" + sh____(cmd.format(**locals())) + cmd = "docker cp {testname2}:/local.tgz tmp.local.tgz" + sh____(cmd.format(**locals())) + cmd = "docker cp tmp.local.tgz {testname1}:/local.tgz" + sh____(cmd.format(**locals())) + cmd = "rm tmp.local.tgz" + sh____(cmd.format(**locals())) + cmd = "docker exec {testname1} mkdir -p /new/local" + sh____(cmd.format(**locals())) + cmd = "docker exec {testname1} bash -c 'cd /new/local && tar xzvf /local.tgz'" + sh____(cmd.format(**locals())) + cmd = "docker exec {testname1} diff -urw --no-dereference /usr/local /new/local" + sh____(cmd.format(**locals())) + # + cmd = "docker rm --force {testname1}" + sx____(cmd.format(**locals())) + cmd = "docker rm --force {testname2}" + sx____(cmd.format(**locals())) + self.rm_testdir() if __name__ == "__main__": diff --git a/testbuilds/centos7-automake.dockerfile b/testbuilds/centos7-automake.dockerfile index 55ad2d3..32f1852 100644 --- a/testbuilds/centos7-automake.dockerfile +++ b/testbuilds/centos7-automake.dockerfile @@ -20,7 +20,7 @@ COPY zzipwrap src/zzipwrap COPY zzip src/zzip RUN mkdir src/build -RUN cd src/build && sh ../configure --libdir=$_libdir --with-docdir=$_docdir +RUN cd src/build && sh ../configure --libdir=$_libdir --with-docdir=$_docdir --disable-static RUN cd src/build && make RUN $no_check || (cd src/build && make check) RUN $no_install || (cd src/build && make install) diff --git a/testbuilds/centos8-automake.dockerfile b/testbuilds/centos8-automake.dockerfile index 24b9695..e9dbe4e 100644 --- a/testbuilds/centos8-automake.dockerfile +++ b/testbuilds/centos8-automake.dockerfile @@ -19,7 +19,7 @@ COPY zzipwrap src/zzipwrap COPY zzip src/zzip RUN mkdir src/build -RUN cd src/build && sh ../configure --libdir=$_libdir --with-docdir=$_docdir +RUN cd src/build && sh ../configure --libdir=$_libdir --with-docdir=$_docdir --disable-static RUN cd src/build && make RUN $no_check || (cd src/build && make check) RUN $no_install || (cd src/build && make install)