coverage.sh: test ubuntu focal

This commit is contained in:
Johannes 'josch' Schauer 2020-08-26 09:44:29 +02:00
parent 3713735240
commit 33b1ed5993
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1
2 changed files with 37 additions and 2 deletions

View file

@ -35,6 +35,7 @@ rm -f shared/cover_db.img
: "${DEFAULT_DIST:=unstable}" : "${DEFAULT_DIST:=unstable}"
: "${HAVE_QEMU:=yes}" : "${HAVE_QEMU:=yes}"
: "${RUN_MA_SAME_TESTS:=yes}" : "${RUN_MA_SAME_TESTS:=yes}"
: "${ONLINE:=no}"
HOSTARCH=$(dpkg --print-architecture) HOSTARCH=$(dpkg --print-architecture)
@ -86,7 +87,7 @@ if [ ! -e shared/hooks/eatmydata/customize.sh ] || [ hooks/eatmydata/customize.s
fi fi
starttime= starttime=
total=150 total=151
skipped=0 skipped=0
runtests=0 runtests=0
i=1 i=1
@ -3159,6 +3160,40 @@ END
fi fi
done done
print_header "mode=$defaultmode,variant=apt: test ubuntu focal"
cat << END > shared/test.sh
#!/bin/sh
set -eu
export LC_ALL=C.UTF-8
if ! /usr/lib/apt/apt-helper download-file http://archive.ubuntu.com/ubuntu/dists/focal/Release /dev/null && grep "QEMU Virtual CPU" /proc/cpuinfo; then
if [ ! -e /mmdebstrap-testenv ]; then
echo "this test modifies the system and should only be run inside a container" >&2
exit 1
fi
ip link set dev ens3 up
ip addr add 10.0.2.15/24 dev ens3
ip route add default via 10.0.2.2 dev ens3
echo "nameserver 10.0.2.3" > /etc/resolv.conf
fi
$CMD --mode=$defaultmode --variant=apt --customize-hook='grep UBUNTU_CODENAME=focal "\$1/etc/os-release"' focal /dev/null
END
if [ "$ONLINE" = "yes" ]; then
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))
fi
else
echo "HOSTARCH != amd64 -- Skipping test..." >&2
skipped=$((skipped+1))
fi
if [ -e shared/cover_db.img ]; then if [ -e shared/cover_db.img ]; then
# produce report inside the VM to make sure that the versions match or # produce report inside the VM to make sure that the versions match or
# otherwise we might get: # otherwise we might get:

View file

@ -424,7 +424,7 @@ if [ "$HAVE_QEMU" = "yes" ]; then
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
trap "cleanuptmpdir; cleanup_newcachedir" EXIT INT TERM trap "cleanuptmpdir; cleanup_newcachedir" EXIT INT TERM
pkgs=perl-doc,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,qemu-user-static,binfmt-support,qemu-user,dpkg-dev,mini-httpd,libdevel-cover-perl,libtemplate-perl,debootstrap,procps,apt-cudf,aspcud,squashfs-tools-ng,genext2fs,python3,libcap2-bin,gpg pkgs=perl-doc,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,qemu-user-static,binfmt-support,qemu-user,dpkg-dev,mini-httpd,libdevel-cover-perl,libtemplate-perl,debootstrap,procps,apt-cudf,aspcud,squashfs-tools-ng,genext2fs,python3,libcap2-bin,gpg,debootstrap,distro-info-data,iproute2,ubuntu-keyring
if [ "$HAVE_PROOT" = "yes" ]; then if [ "$HAVE_PROOT" = "yes" ]; then
pkgs="$pkgs,proot" pkgs="$pkgs,proot"
fi fi