diff --git a/testbuilds.py b/testbuilds.py index 77effdd0..66cb59fa 100755 --- a/testbuilds.py +++ b/testbuilds.py @@ -682,6 +682,53 @@ def test_224_ubuntu22_cmake_build_dockerfile(self) -> None: cmd = "{docker} rmi {images}:{testname}" sx____(cmd.format(**locals())) self.rm_testdir() + @unittest.expectedFailure + def test_225_ubuntu24_cmake_build_dockerfile(self) -> None: + # no universe yet (in February 2024) + if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") + self.rm_old() + self.rm_testdir() + testname = self.testname() + testdir = self.testdir() + docker = DOCKER + dockerfile = "testbuilds/ubuntu24-cm-build.dockerfile" + addhosts = self.local_addhosts(dockerfile) + savename = docname(dockerfile) + saveto = SAVETO + images = IMAGES + build = "build --build-arg=no_check=true" + self.nocache() + 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/x86_64-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") + # + if not KEEP: + 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_228_ubuntu16_32bit_dockerfile(self) -> None: if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") self.rm_old() @@ -1086,7 +1133,7 @@ def test_323_ubuntu20_cmake_sdl2_dockerfile(self) -> None: cmd = "{docker} rmi {images}:{testname}" sx____(cmd.format(**locals())) self.rm_testdir() - def test_324_ubuntu23_cmake_sdl2_dockerfile(self) -> None: + def test_324_ubuntu22_cmake_sdl2_dockerfile(self) -> None: if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") self.rm_old() self.rm_testdir() @@ -1126,6 +1173,46 @@ def test_324_ubuntu23_cmake_sdl2_dockerfile(self) -> None: cmd = "{docker} rmi {images}:{testname}" sx____(cmd.format(**locals())) self.rm_testdir() + def test_325_ubuntu24_cmake_sdl2_dockerfile(self) -> None: + if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") + self.rm_old() + self.rm_testdir() + testname = self.testname() + testdir = self.testdir() + docker = DOCKER + dockerfile = "testbuilds/ubuntu24-cm-sdl2.dockerfile" + addhosts = self.local_addhosts(dockerfile, "--universe") + savename = docname(dockerfile) + saveto = SAVETO + images = IMAGES + build = "build --build-arg=no_check=true" + self.nocache() + 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())) + # + if not KEEP: + 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_335_opensuse15_cmake_sdl2_dockerfile(self) -> None: if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") self.rm_old() diff --git a/testbuilds/ubuntu24-cm-build.dockerfile b/testbuilds/ubuntu24-cm-build.dockerfile new file mode 100644 index 00000000..0e03fd48 --- /dev/null +++ b/testbuilds/ubuntu24-cm-build.dockerfile @@ -0,0 +1,24 @@ +FROM ubuntu:24.04 +ARG no_check=false +ARG no_install=false + +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +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) + diff --git a/testbuilds/ubuntu24-cm-sdl2.dockerfile b/testbuilds/ubuntu24-cm-sdl2.dockerfile new file mode 100644 index 00000000..13710ad0 --- /dev/null +++ b/testbuilds/ubuntu24-cm-sdl2.dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:24.04 +ARG no_check=false +ARG no_install=false + +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt-get install -y gcc zlib1g-dev python3 cmake unzip zip gzip tar pkg-config libsdl2-dev +## libsdl2-dev is on "universe" + +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) +