From c760661de3b7994e025f8049ee457881facdbeab Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sat, 28 Nov 2020 15:22:56 +0100 Subject: [PATCH] coverage.sh: test using /mnt requires qemu --- coverage.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/coverage.sh b/coverage.sh index d7a0b1a..c7dc627 100755 --- a/coverage.sh +++ b/coverage.sh @@ -2500,6 +2500,10 @@ cat << END > shared/test.sh set -eu export LC_ALL=C.UTF-8 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 \ --setup-hook='mkdir -p "\$1"/var/cache/apt/archives/partial' \ --setup-hook='touch "\$1"/var/cache/apt/archives/lock' \ @@ -2531,12 +2535,9 @@ END if [ "$HAVE_QEMU" = "yes" ]; then ./run_qemu.sh runtests=$((runtests+1)) - elif [ "$defaultmode" = "root" ]; then - ./run_null.sh SUDO - runtests=$((runtests+1)) else - ./run_null.sh - runtests=$((runtests+1)) + echo "HAVE_QEMU != yes -- Skipping test..." >&2 + skipped=$((skipped+1)) fi done