From ce8ddb0ae1ea6b92e4ccac827e1cb79b76e6df80 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Mon, 14 Jan 2019 16:11:07 +0100 Subject: [PATCH] Move Cirrus CI commands to a separate script Test FreeBSD POSIX.1e and NFSv4 ACLs on Cirrus CI --- .cirrus.yml | 4 ++-- build/ci/cirrus_ci.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100755 build/ci/cirrus_ci.sh diff --git a/.cirrus.yml b/.cirrus.yml index 6a321c6da..c5266e214 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ task: image: freebsd-12-0-release-amd64 image: freebsd-11-2-release-amd64 install_script: - - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf - - if [ `uname` = "FreeBSD" ]; then pkg upgrade -y; pkg install -y autoconf automake libiconv libtool pkgconf expat libxml2 liblz4 zstd; fi + - ./build/ci/cirrus_ci.sh install script: - ./build/ci_build.sh + - ./build/ci/cirrus_ci.sh test diff --git a/build/ci/cirrus_ci.sh b/build/ci/cirrus_ci.sh new file mode 100755 index 000000000..521402df6 --- /dev/null +++ b/build/ci/cirrus_ci.sh @@ -0,0 +1,37 @@ +#!/bin/sh +UNAME=`uname` +if [ "$1" = "install" ] +then + if [ "$UNAME" = "FreeBSD" ] + then + set -x -e + sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf + mount -u -o acls / + mkdir /tmp_acl_nfsv4 + MD=`mdconfig -a -t swap -s 128M` + newfs /dev/$MD + tunefs -N enable /dev/$MD + mount /dev/$MD /tmp_acl_nfsv4 + chmod 1777 /tmp_acl_nfsv4 + pkg install -y autoconf automake libiconv libtool pkgconf expat libxml2 liblz4 zstd + elif [ "$UNAME" = "Darwin" ] + then + set -x -e + brew update + brew install xz lz4 zstd + fi +elif [ "$1" = "test" ] +then + if [ "$UNAME" = "FreeBSD" ] + then + set -e + echo "Additional NFSv4 ACL tests" + CURDIR=`pwd` + BUILDDIR="${CURDIR}/build_ci/autotools" + cd "${BUILDDIR}" + TMPDIR=/tmp_acl_nfsv4 ./libarchive_test -r "${CURDIR}/libarchive/test" -v test_acl_platform_nfs4 + fi +else + echo "Usage $0 install | test_nfsv4_acls" + exit 1 +fi -- 2.47.2