coverage.sh: add test for missing /etc/resolv.conf and /etc/hostname

This commit is contained in:
Johannes 'josch' Schauer 2019-09-26 23:26:47 +02:00
parent c8b9a2ed96
commit 598d353def
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -48,7 +48,7 @@ if [ ! -e shared/mmdebstrap ] || [ mmdebstrap -nt shared/mmdebstrap ]; then
fi
starttime=
total=97
total=98
i=1
print_header() {
@ -974,6 +974,25 @@ else
./run_null.sh SUDO
fi
print_header "mode=$defaultmode,variant=apt: without /etc/resolv.conf and /etc/hostname"
cat << END > shared/test.sh
#!/bin/sh
set -eu
export LC_ALL=C.UTF-8
rm /etc/resolv.conf /etc/hostname
$CMD --mode=$defaultmode --variant=apt $DEFAULT_DIST /tmp/debian-chroot.tar $mirror
{ tar -tf /tmp/debian-chroot.tar;
printf "./etc/hostname\n";
printf "./etc/resolv.conf\n";
} | sort | diff -u tar1.txt -
rm /tmp/debian-chroot.tar
END
if [ "$HAVE_QEMU" = "yes" ]; then
./run_qemu.sh
else
echo "HAVE_QEMU != yes -- Skipping test..."
fi
# test all variants
for variant in essential apt required minbase buildd important debootstrap - standard; do