]> granicus.if.org Git - zziplib/commitdiff
allow to compare automake vs cmake builds
authorGuido Draheim <guidod@gmx.de>
Tue, 14 Apr 2020 00:33:57 +0000 (02:33 +0200)
committerGuido Draheim <guidod@gmx.de>
Tue, 14 Apr 2020 00:33:57 +0000 (02:33 +0200)
testbuilds.py
testbuilds/centos7-automake.dockerfile
testbuilds/centos8-automake.dockerfile

index 23b8b0d1815ca5b01f317a9950459fd5fbeca7b2..4c194fa17d62e26ea3e08abc8137b7a100d9d248 100755 (executable)
@@ -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__":
index 55ad2d3ba75095203340c5334674fd1e5886c439..32f18526a67c62769f41839e7894d9a59b105069 100644 (file)
@@ -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)
index 24b9695aa3f834a2d14192d0941b05fb59b19bec..e9dbe4e5dc2affb0a4405c5ec3061e7335d06dd8 100644 (file)
@@ -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)