]> granicus.if.org Git - zziplib/commitdiff
ubuntu16-32bit.dockerfile
authorGuido Draheim <guidod@gmx.de>
Mon, 13 Apr 2020 17:43:53 +0000 (19:43 +0200)
committerGuido Draheim <guidod@gmx.de>
Mon, 13 Apr 2020 17:43:53 +0000 (19:43 +0200)
testbuilds.py
testbuilds/ubuntu16-32bit.dockerfile [new file with mode: 0644]

index c1746a46f0dd04d0bef113868ce042985061be1f..50a0a77cc569df4aeee4b76caf1d9ab52565bcb4 100755 (executable)
@@ -534,6 +534,47 @@ class ZZiplibBuildTest(unittest.TestCase):
         cmd = "docker rmi {images}:{testname}"
         sx____(cmd.format(**locals()))
         self.rm_testdir()
+    def test_225_ubuntu16_32bit_dockerfile(self):
+        if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test")
+        testname=self.testname()
+        testdir = self.testdir()
+        dockerfile="testbuilds/ubuntu16-32bit.dockerfile"
+        addhosts = self.local_addhosts(dockerfile)
+        savename = docname(dockerfile)
+        saveto = SAVETO
+        images = IMAGES
+        build = "build --build-arg=no_check=true"
+        cmd = "docker {build} . -f {dockerfile} {addhosts} --tag {images}:{testname}"
+        sh____(cmd.format(**locals()))
+        cmd = "docker rm --force {testname}"
+        sx____(cmd.format(**locals()))
+        cmd = "docker run -d --name {testname} {images}:{testname} sleep 600"
+        sh____(cmd.format(**locals()))
+        #:# container = self.ip_container(testname)
+        cmd = "docker exec {testname} ls -l /usr/local/bin"
+        sh____(cmd.format(**locals()))
+        cmd = "docker exec {testname} find /usr/local/include -type f"
+        sh____(cmd.format(**locals()))
+        cmd = "docker exec {testname} bash -c 'ls -l /usr/local/lib/libzz*'"
+        sh____(cmd.format(**locals()))
+        #
+        cmd = "docker exec {testname} bash -c 'test ! -d /usr/local/include/SDL_rwops_zzip'"
+        sh____(cmd.format(**locals()))
+        cmd = "docker exec {testname} dpkg -S /usr/lib/i386-linux-gnu/pkgconfig/zlib.pc"
+        sh____(cmd.format(**locals()))
+        cmd = "docker exec {testname} pkg-config --libs zlib"
+        zlib = output(cmd.format(**locals()))
+        self.assertEqual(zlib.strip(), "-lz")
+        #
+        cmd = "docker rm --force {testname}"
+        sx____(cmd.format(**locals()))
+        cmd = "docker rmi {saveto}/{savename}:latest"
+        sx____(cmd.format(**locals()))
+        cmd = "docker tag {images}:{testname} {saveto}/{savename}:latest"
+        sh____(cmd.format(**locals()))
+        cmd = "docker rmi {images}:{testname}"
+        sx____(cmd.format(**locals()))
+        self.rm_testdir()
     def test_301_opensuse15_sdl2_dockerfile(self):
         if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test")
         testname=self.testname()
diff --git a/testbuilds/ubuntu16-32bit.dockerfile b/testbuilds/ubuntu16-32bit.dockerfile
new file mode 100644 (file)
index 0000000..60fc669
--- /dev/null
@@ -0,0 +1,23 @@
+FROM 32bit/ubuntu:16.04
+ARG no_check=false
+ARG no_install=false
+
+RUN apt-get update
+RUN apt-get install -y gcc zlib1g-dev python3 cmake unzip zip gzip tar pkg-config
+
+RUN mkdir src
+COPY CMakeLists.txt README COPYING.LIB ChangeLog src/
+COPY CMakeScripts src/CMakeScripts
+COPY bins src/bins
+COPY docs src/docs
+COPY test src/test
+COPY SDL src/SDL
+COPY zzipwrap src/zzipwrap
+COPY zzip src/zzip
+
+RUN mkdir src/build
+RUN cd src/build && cmake ..
+RUN cd src/build && make
+RUN $no_check || (cd src/build && make check)
+RUN $no_install || (cd src/build && make install)
+