coverage.sh: test using /mnt requires qemu

This commit is contained in:
Johannes 'josch' Schauer 2020-11-28 15:22:56 +01:00
parent f76bcb5750
commit c760661de3
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -2500,6 +2500,10 @@ cat << END > shared/test.sh
set -eu set -eu
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
export SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH export SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH
if [ ! -e /mmdebstrap-testenv ]; then
echo "this test requires the cache directory to be mounted on /mnt and should only be run inside a container" >&2
exit 1
fi
$CMD --include=doc-debian --mode=$defaultmode --variant=$variant \ $CMD --include=doc-debian --mode=$defaultmode --variant=$variant \
--setup-hook='mkdir -p "\$1"/var/cache/apt/archives/partial' \ --setup-hook='mkdir -p "\$1"/var/cache/apt/archives/partial' \
--setup-hook='touch "\$1"/var/cache/apt/archives/lock' \ --setup-hook='touch "\$1"/var/cache/apt/archives/lock' \
@ -2531,12 +2535,9 @@ END
if [ "$HAVE_QEMU" = "yes" ]; then if [ "$HAVE_QEMU" = "yes" ]; then
./run_qemu.sh ./run_qemu.sh
runtests=$((runtests+1)) runtests=$((runtests+1))
elif [ "$defaultmode" = "root" ]; then
./run_null.sh SUDO
runtests=$((runtests+1))
else else
./run_null.sh echo "HAVE_QEMU != yes -- Skipping test..." >&2
runtests=$((runtests+1)) skipped=$((skipped+1))
fi fi
done done