]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Move Cirrus CI commands to a separate script
authorMartin Matuska <martin@matuska.org>
Mon, 14 Jan 2019 15:11:07 +0000 (16:11 +0100)
committerMartin Matuska <martin@matuska.org>
Tue, 15 Jan 2019 00:59:32 +0000 (01:59 +0100)
Test FreeBSD POSIX.1e and NFSv4 ACLs on Cirrus CI

.cirrus.yml
build/ci/cirrus_ci.sh [new file with mode: 0755]

index 6a321c6dac90bef57f9967619a03657b1c6a757a..c5266e21452fda03561603f9276aaf06c5564135 100644 (file)
@@ -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 (executable)
index 0000000..521402d
--- /dev/null
@@ -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