Permalink
Browse files

Switch up testing to allow separation of image creation and building

Signed-off-by: Jonathan Dieter <jdieter@gmail.com>:
  • Loading branch information...
jdieter committed Nov 14, 2018
1 parent 20f15d4 commit 90453bd925c9691cdedf404f3e54b0ee00fe3444
Showing with 212 additions and 69 deletions.
  1. +1 −1 .gitignore
  2. +1 −1 DOCKER_TESTING.md
  3. +0 −8 autotest/centos-latest/Dockerfile
  4. +12 −0 autotest/centos-latest/build.sh
  5. +6 −0 autotest/centos-latest/build/Dockerfile
  6. +0 −6 autotest/centos-latest/docker-compose.yml
  7. +7 −0 autotest/centos-latest/prep.sh
  8. +2 −0 autotest/centos-latest/prep/Dockerfile
  9. +15 −0 autotest/centos-latest/test.sh
  10. +0 −10 autotest/debian-latest/Dockerfile
  11. +12 −0 autotest/debian-latest/build.sh
  12. +6 −0 autotest/debian-latest/build/Dockerfile
  13. +0 −6 autotest/debian-latest/docker-compose.yml
  14. +7 −0 autotest/debian-latest/prep.sh
  15. +2 −0 autotest/debian-latest/prep/Dockerfile
  16. +15 −0 autotest/debian-latest/test.sh
  17. +0 −6 autotest/fedora-latest/Dockerfile
  18. +12 −0 autotest/fedora-latest/build.sh
  19. +6 −0 autotest/fedora-latest/build/Dockerfile
  20. +0 −6 autotest/fedora-latest/docker-compose.yml
  21. +7 −0 autotest/fedora-latest/prep.sh
  22. +2 −0 autotest/fedora-latest/prep/Dockerfile
  23. +15 −0 autotest/fedora-latest/test.sh
  24. +0 −6 autotest/opensuse-leap/Dockerfile
  25. +12 −0 autotest/opensuse-leap/build.sh
  26. +6 −0 autotest/opensuse-leap/build/Dockerfile
  27. +0 −6 autotest/opensuse-leap/docker-compose.yml
  28. +7 −0 autotest/opensuse-leap/prep.sh
  29. +2 −0 autotest/opensuse-leap/prep/Dockerfile
  30. +15 −0 autotest/opensuse-leap/test.sh
  31. +0 −7 autotest/ubuntu-rolling/Dockerfile
  32. +12 −0 autotest/ubuntu-rolling/build.sh
  33. +6 −0 autotest/ubuntu-rolling/build/Dockerfile
  34. +0 −6 autotest/ubuntu-rolling/docker-compose.yml
  35. +7 −0 autotest/ubuntu-rolling/prep.sh
  36. +2 −0 autotest/ubuntu-rolling/prep/Dockerfile
  37. +15 −0 autotest/ubuntu-rolling/test.sh
@@ -1,4 +1,4 @@
cov-int
build
/build
test/abi/new
test/abi/stable/ABI.dump
@@ -7,4 +7,4 @@ Dockerfiles are available to test the latest build on different platforms:
* debian:latest - autotest/debian-latest

To test, in the project root directory, run:<br>
```docker-compose --file autotest/<platform directory>/docker-compose.yml build```
```./autotest/<platform directory>/test.sh```

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,12 @@
#!/bin/sh
# Build zchunk-centos:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-centos:latest)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/centos-latest/prep.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker image rm zchunk-centos:test -f 2>/dev/null 1>/dev/null
docker image build -t zchunk-centos:test --file autotest/centos-latest/build/Dockerfile ./

@@ -0,0 +1,6 @@
FROM zchunk-centos:latest
ADD ./ /code
WORKDIR /code
RUN meson build --auto-features=enabled && cd build && ninja-build
WORKDIR /code/build
CMD ninja-build test

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,7 @@
#!/bin/sh
docker pull centos:latest
if [ "$?" -ne 0 ]; then
exit 1
fi
docker image rm -f zchunk-centos:latest 2>/dev/null 1>/dev/null
docker image build -t zchunk-centos:latest --file autotest/centos-latest/prep/Dockerfile ./
@@ -0,0 +1,2 @@
FROM centos:latest
RUN yum -y install epel-release && yum -y update epel-release && yum -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" && rm -rf /var/cache/yum
@@ -0,0 +1,15 @@
#!/bin/sh
# Build zchunk-centos:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-centos:test)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/centos-latest/build.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker rm zchunk-centos-test -f 2>/dev/null 1>/dev/null
docker run --name zchunk-centos-test zchunk-centos:test
RETVAL=$?
docker rm zchunk-centos-test -f 2>/dev/null 1>/dev/null
docker image rm zchunk-centos:test -f 2>/dev/null 1>/dev/null
exit $RETVAL

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,12 @@
#!/bin/sh
# Build zchunk-debian:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-debian:latest)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/debian-latest/prep.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker image rm zchunk-debian:test -f 2>/dev/null 1>/dev/null
docker image build -t zchunk-debian:test --file autotest/debian-latest/build/Dockerfile ./

@@ -0,0 +1,6 @@
FROM zchunk-debian:latest
ADD ./ /code
WORKDIR /code
RUN meson build && cd build && ninja
WORKDIR /code/build
CMD ninja test

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,7 @@
#!/bin/sh
docker pull debian:latest
if [ "$?" -ne 0 ]; then
exit 1
fi
docker image rm -f zchunk-debian:latest 2>/dev/null 1>/dev/null
docker image build -t zchunk-debian:latest --file autotest/debian-latest/prep/Dockerfile ./
@@ -0,0 +1,2 @@
FROM debian:latest
RUN /bin/bash -c 'echo deb http://ftp.debian.org/debian stretch-backports main >> /etc/apt/sources.list && apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get -yqt stretch-backports install meson libzstd-dev && apt-get -yq install gcc pkg-config libcurl4-openssl-dev libssl-dev'
@@ -0,0 +1,15 @@
#!/bin/sh
# Build zchunk-debian:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-debian:test)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/debian-latest/build.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker rm zchunk-debian-test -f 2>/dev/null 1>/dev/null
docker run --name zchunk-debian-test zchunk-debian:test
RETVAL=$?
docker rm zchunk-debian-test -f 2>/dev/null 1>/dev/null
docker image rm zchunk-debian:test -f 2>/dev/null 1>/dev/null
exit $RETVAL

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,12 @@
#!/bin/sh
# Build zchunk-fedora:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-fedora:latest)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/fedora-latest/prep.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker image rm zchunk-fedora:test -f 2>/dev/null 1>/dev/null
docker image build -t zchunk-fedora:test --file autotest/fedora-latest/build/Dockerfile ./

@@ -0,0 +1,6 @@
FROM zchunk-fedora:latest
ADD ./ /code
WORKDIR /code
RUN meson build && cd build && ninja
WORKDIR /code/build
CMD ninja test

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,7 @@
#!/bin/sh
docker pull fedora:latest
if [ "$?" -ne 0 ]; then
exit 1
fi
docker image rm -f zchunk-fedora:latest 2>/dev/null 1>/dev/null
docker image build -t zchunk-fedora:latest --file autotest/fedora-latest/prep/Dockerfile ./
@@ -0,0 +1,2 @@
FROM fedora:latest
RUN dnf -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" && rm -rf /var/cache/dnf
@@ -0,0 +1,15 @@
#!/bin/sh
# Build zchunk-fedora:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-fedora:test)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/fedora-latest/build.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker rm zchunk-fedora-test -f 2>/dev/null 1>/dev/null
docker run --name zchunk-fedora-test zchunk-fedora:test
RETVAL=$?
docker rm zchunk-fedora-test -f 2>/dev/null 1>/dev/null
docker image rm zchunk-fedora:test -f 2>/dev/null 1>/dev/null
exit $RETVAL

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,12 @@
#!/bin/sh
# Build zchunk-opensuse:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-opensuse:latest)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/opensuse-leap/prep.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker image rm zchunk-opensuse:test -f 2>/dev/null 1>/dev/null
docker image build -t zchunk-opensuse:test --file autotest/opensuse-leap/build/Dockerfile ./

@@ -0,0 +1,6 @@
FROM zchunk-opensuse:latest
ADD ./ /code
WORKDIR /code
RUN meson build && cd build && ninja
WORKDIR /code/build
CMD ninja test

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,7 @@
#!/bin/sh
docker pull opensuse/leap
if [ "$?" -ne 0 ]; then
exit 1
fi
docker image rm -f zchunk-opensuse:latest 2>/dev/null 1>/dev/null
docker image build -t zchunk-opensuse:latest --file autotest/opensuse-leap/prep/Dockerfile ./
@@ -0,0 +1,2 @@
FROM opensuse/leap
RUN zypper --non-interactive install meson gcc pkgconfig "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" && rm -rf /var/cache/zypp
@@ -0,0 +1,15 @@
#!/bin/sh
# Build zchunk-opensuse:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-opensuse:test)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/opensuse-leap/build.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker rm zchunk-opensuse-test -f 2>/dev/null 1>/dev/null
docker run --name zchunk-opensuse-test zchunk-opensuse:test
RETVAL=$?
docker rm zchunk-opensuse-test -f 2>/dev/null 1>/dev/null
docker image rm zchunk-opensuse:test -f 2>/dev/null 1>/dev/null
exit $RETVAL

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,12 @@
#!/bin/sh
# Build zchunk-ubuntu:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-ubuntu:latest)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/ubuntu-rolling/prep.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker image rm zchunk-ubuntu:test -f 2>/dev/null 1>/dev/null
docker image build -t zchunk-ubuntu:test --file autotest/ubuntu-rolling/build/Dockerfile ./

@@ -0,0 +1,6 @@
FROM zchunk-ubuntu:latest
ADD ./ /code
WORKDIR /code
RUN meson build && cd build && ninja
WORKDIR /code/build
CMD ninja test

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,7 @@
#!/bin/sh
docker pull ubuntu:rolling
if [ "$?" -ne 0 ]; then
exit 1
fi
docker image rm -f zchunk-ubuntu:latest 2>/dev/null 1>/dev/null
docker image build -t zchunk-ubuntu:latest --file autotest/ubuntu-rolling/prep/Dockerfile ./
@@ -0,0 +1,2 @@
FROM ubuntu:rolling
RUN /bin/bash -c 'apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get -yq install meson gcc pkg-config libzstd-dev libcurl4-openssl-dev libssl-dev'
@@ -0,0 +1,15 @@
#!/bin/sh
# Build zchunk-ubuntu:latest if it doesn't exist
HAVE_IMAGE=$(docker image ls -q zchunk-ubuntu:test)
if [ "$HAVE_IMAGE" == "" ]; then
autotest/ubuntu-rolling/build.sh
if [ "$?" -ne 0 ]; then
exit 1
fi
fi
docker rm zchunk-ubuntu-test -f 2>/dev/null 1>/dev/null
docker run --name zchunk-ubuntu-test zchunk-ubuntu:test
RETVAL=$?
docker rm zchunk-ubuntu-test -f 2>/dev/null 1>/dev/null
docker image rm zchunk-ubuntu:test -f 2>/dev/null 1>/dev/null
exit $RETVAL

0 comments on commit 90453bd

Please sign in to comment.