From d5cdc5b9b9d0d5d3095883d024f457fc6c4138b0 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Thu, 26 Sep 2019 23:28:27 +0200 Subject: [PATCH] coverage.sh: add test for installing into / --- coverage.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/coverage.sh b/coverage.sh index 5950cfb..5dc15ad 100755 --- a/coverage.sh +++ b/coverage.sh @@ -48,7 +48,7 @@ if [ ! -e shared/mmdebstrap ] || [ mmdebstrap -nt shared/mmdebstrap ]; then fi starttime= -total=98 +total=99 i=1 print_header() { @@ -669,6 +669,24 @@ else ./run_null.sh fi +print_header "mode=root,variant=apt: fail installing to /" +cat << END > shared/test.sh +#!/bin/sh +set -eu +export LC_ALL=C.UTF-8 +ret=0 +$CMD --mode=root --variant=apt $DEFAULT_DIST / $mirror || ret=\$? +if [ "\$ret" = 0 ]; then + echo expected failure but got exit \$ret + exit 1 +fi +END +if [ "$HAVE_QEMU" = "yes" ]; then + ./run_qemu.sh +else + ./run_null.sh SUDO +fi + # to test foreign architecture package installation we choose a package which # - is not part of the native installation set # - does not have any dependencies