From 598d353defc43348b1fee352268eac43944d9198 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Thu, 26 Sep 2019 23:26:47 +0200 Subject: [PATCH] coverage.sh: add test for missing /etc/resolv.conf and /etc/hostname --- coverage.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/coverage.sh b/coverage.sh index 7b53ea7..5950cfb 100755 --- a/coverage.sh +++ b/coverage.sh @@ -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