]> granicus.if.org Git - zziplib/commitdiff
add ubuntu18-build.dockerfile
authorGuido Draheim <guidod@gmx.de>
Mon, 13 Apr 2020 13:34:14 +0000 (15:34 +0200)
committerGuido Draheim <guidod@gmx.de>
Mon, 13 Apr 2020 13:34:14 +0000 (15:34 +0200)
testbuilds.py
testbuilds/ubuntu18-build.dockerfile [new file with mode: 0644]

index e7b2ff4b264f6df8c50b4e91b242f848ffb029f8..3d9ddaf854eb613f57fb3fd5df94ea364782262a 100755 (executable)
@@ -409,6 +409,48 @@ class ZZiplibBuildTest(unittest.TestCase):
         cmd = "docker rmi {images}:{testname}"
         sx____(cmd.format(**locals()))
         self.rm_testdir()
+    def test_212_centos8_build_dockerfile(self):
+        if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test")
+        testname=self.testname()
+        testdir = self.testdir()
+        dockerfile="testbuilds/centos8-build.dockerfile"
+        addhosts = self.local_addhosts(dockerfile)
+        savename = docname(dockerfile)
+        saveto = SAVETO
+        images = IMAGES
+        cmd = "docker build . -f {dockerfile} {addhosts} --tag {images}:{testname}"
+        sh____(cmd.format(**locals()))
+        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_222_ubuntu18_build_dockerfile(self):
+        if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test")
+        testname=self.testname()
+        testdir = self.testdir()
+        dockerfile="testbuilds/ubuntu18-build.dockerfile"
+        addhosts = self.local_addhosts(dockerfile)
+        savename = docname(dockerfile)
+        saveto = SAVETO
+        images = IMAGES
+        cmd = "docker build . -f {dockerfile} {addhosts} --tag {images}:{testname}"
+        sh____(cmd.format(**locals()))
+        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()
 
 
 if __name__ == "__main__":
diff --git a/testbuilds/ubuntu18-build.dockerfile b/testbuilds/ubuntu18-build.dockerfile
new file mode 100644 (file)
index 0000000..cfbdf35
--- /dev/null
@@ -0,0 +1,18 @@
+FROM ubuntu:18.04
+
+RUN apt-get update
+RUN apt-get install -y gcc zlib1g-dev python3 cmake unzip zip gzip tar
+
+RUN mkdir src
+COPY CMakeLists.txt README COPYING.LIB ChangeLog src/
+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 cd src/build && make check