From 1304eb9e12ccfa6c1b01126cb2748f974cd29e75 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 24 Feb 2021 17:32:12 +0100 Subject: [PATCH] btrfs-progs: ci: add CentOS 8 image Build tests inside CentOS 8, long term support distro. Signed-off-by: David Sterba --- ci/images/ci-centos-8-x86_64/Dockerfile | 35 +++++++++++++++++++++++ ci/images/ci-centos-8-x86_64/docker-build | 1 + ci/images/ci-centos-8-x86_64/docker-run | 1 + ci/images/ci-centos-8-x86_64/run-tests | 12 ++++++++ ci/images/ci-centos-8-x86_64/test-build | 22 ++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 ci/images/ci-centos-8-x86_64/Dockerfile create mode 120000 ci/images/ci-centos-8-x86_64/docker-build create mode 120000 ci/images/ci-centos-8-x86_64/docker-run create mode 100755 ci/images/ci-centos-8-x86_64/run-tests create mode 100755 ci/images/ci-centos-8-x86_64/test-build diff --git a/ci/images/ci-centos-8-x86_64/Dockerfile b/ci/images/ci-centos-8-x86_64/Dockerfile new file mode 100644 index 00000000..7e52cd83 --- /dev/null +++ b/ci/images/ci-centos-8-x86_64/Dockerfile @@ -0,0 +1,35 @@ +FROM centos:8 + +WORKDIR /tmp + +RUN rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org +RUN yum -y install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm +RUN yum -y install epel-release + +RUN yum -y install autoconf automake pkg-config +RUN yum -y install libattr-devel libblkid-devel libuuid-devel +RUN yum -y install e2fsprogs-libs e2fsprogs-devel reiserfs-utils +RUN yum -y install zlib-devel lzo-devel libzstd-devel zstd +RUN yum -y install make gcc tar gzip +RUN yum -y install python3 python3-devel python3-setuptools + +# For downloading fresh sources +RUN yum -y install wget + +# For running tests +RUN yum -y install util-linux e2fsprogs findutils grep +RUN yum -y install udev device-mapper acl attr xz + +# For debugging +RUN yum -y install less vim + +COPY ./test-build . +COPY ./run-tests . +COPY ./devel.tar.gz . + +CMD ./test-build devel --disable-documentation + +# Continue with: +# cd /tmp +# (see CMD above) +# ./run-tests /tmp/btrfs-progs-devel diff --git a/ci/images/ci-centos-8-x86_64/docker-build b/ci/images/ci-centos-8-x86_64/docker-build new file mode 120000 index 00000000..60c47fef --- /dev/null +++ b/ci/images/ci-centos-8-x86_64/docker-build @@ -0,0 +1 @@ +/home/dsterba/labs/btrfs-progs/ci/images/docker-build \ No newline at end of file diff --git a/ci/images/ci-centos-8-x86_64/docker-run b/ci/images/ci-centos-8-x86_64/docker-run new file mode 120000 index 00000000..50b77930 --- /dev/null +++ b/ci/images/ci-centos-8-x86_64/docker-run @@ -0,0 +1 @@ +/home/dsterba/labs/btrfs-progs/ci/images/docker-run \ No newline at end of file diff --git a/ci/images/ci-centos-8-x86_64/run-tests b/ci/images/ci-centos-8-x86_64/run-tests new file mode 100755 index 00000000..c4266df4 --- /dev/null +++ b/ci/images/ci-centos-8-x86_64/run-tests @@ -0,0 +1,12 @@ +#!/bin/sh -x + +where="$1" + +cd "$where" || { echo "ERROR: $1 not found"; exit 1; } + +make TEST_LOG=dump test-cli +make TEST_LOG=dump test-mkfs +make TEST_LOG=dump test-check +make TEST_LOG=dump test-misc +make TEST_LOG=dump test-convert +make TEST_LOG=dump test-fuzz diff --git a/ci/images/ci-centos-8-x86_64/test-build b/ci/images/ci-centos-8-x86_64/test-build new file mode 100755 index 00000000..a8e4951c --- /dev/null +++ b/ci/images/ci-centos-8-x86_64/test-build @@ -0,0 +1,22 @@ +#!/bin/sh +# usage: $0 [branch name] [configure parameters] + +urlbase="https://github.com/kdave/btrfs-progs/archive" +branch=${1:-devel} +fname=${branch}.tar.gz +url="${urlbase}/${fname}" + +shift + +echo "btrfs-progs build test of branch ${branch}" +cd /tmp +if [ -f "$fname" -a -s "$fname" ]; then + echo "Found local file $fname, not downloading" +else + echo "Missing or empty tar, downloading devel branch from git" + rm -- "$fname" + wget "$url" -O "$fname" +fi +tar xf "$fname" +cd btrfs-progs-$branch +ci/build-default "$@"