From c633a9ac0dc7438b56f814669d0f2c45598d04e9 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 24 Jun 2020 23:10:29 +0200 Subject: [PATCH] coverage.sh: add test for known-good chrootless packages --- coverage.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/coverage.sh b/coverage.sh index 3992b12..2f61baa 100755 --- a/coverage.sh +++ b/coverage.sh @@ -72,7 +72,7 @@ if [ ! -e shared/taridshift ] || [ taridshift -nt shared/taridshift ]; then fi starttime= -total=149 +total=150 skipped=0 runtests=0 i=1 @@ -2643,6 +2643,30 @@ else runtests=$((runtests+1)) fi +print_header "mode=chrootless,variant=custom: install known-good from essential:yes" +cat << END > shared/test.sh +#!/bin/sh +set -eu +export LC_ALL=C.UTF-8 +if [ "\$(id -u)" -eq 0 ] && ! id -u user > /dev/null 2>&1; then + if [ ! -e /mmdebstrap-testenv ]; then + echo "this test modifies the system and should only be run inside a container" >&2 + exit 1 + fi + adduser --gecos user --disabled-password user +fi +prefix= +[ "\$(id -u)" -eq 0 ] && prefix="runuser -u user --" +\$prefix $CMD --mode=chrootless --variant=custom --include=bsdutils,coreutils,debianutils,diffutils,dpkg,findutils,grep,gzip,hostname,init-system-helpers,ncurses-base,ncurses-bin,perl-base,sed,tar $DEFAULT_DIST /dev/null $mirror +END +if [ "$HAVE_QEMU" = "yes" ]; then + ./run_qemu.sh + runtests=$((runtests+1)) +else + ./run_null.sh + runtests=$((runtests+1)) +fi + print_header "mode=chrootless,variant=custom: install doc-debian and output tarball" cat << END > shared/test.sh #!/bin/sh