From 6c39fe8b5a70518c40efe0c8ef3f5008f06edcb1 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sun, 24 Mar 2019 08:16:45 +0100 Subject: [PATCH] coverage.sh: add test for aspcud external apt solver --- coverage.sh | 24 +++++++++++++++++++++++- make_mirror.sh | 2 +- run_qemu.sh | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/coverage.sh b/coverage.sh index cf3fe1b..2d76301 100755 --- a/coverage.sh +++ b/coverage.sh @@ -51,7 +51,7 @@ if [ ! -e shared/mmdebstrap ] || [ mmdebstrap -nt shared/mmdebstrap ]; then fi starttime= -total=88 +total=89 i=1 print_header() { @@ -470,6 +470,28 @@ else echo "HAVE_QEMU != yes -- Skipping test..." fi +print_header "mode=$defaultmode,variant=apt: test aspcud apt solver" +cat << END > shared/test.sh +#!/bin/sh +set -eu +export LC_ALL=C.UTF-8 +$CMD --mode=$defaultmode --variant=custom \ + --include apt,base-files,base-passwd,bash,bsdutils,coreutils,dash,debianutils,diffutils,dpkg,findutils,gpgv,grep,gzip,hostname,init-system-helpers,libc-bin,login,mawk,ncurses-base,ncurses-bin,perl-base,sed,sysvinit-utils,tar,util-linux \ + --aptopt='APT::Solver "aspcud"' \ + unstable /tmp/unstable-chroot.tar $mirror +tar -tf /tmp/unstable-chroot.tar | sort \ + | grep -v '^./etc/apt/apt.conf.d/99mmdebstrap$' \ + | diff -u tar1.txt - +rm /tmp/unstable-chroot.tar +END +if [ "$HAVE_QEMU" = "yes" ]; then + ./run_qemu.sh +elif [ "$defaultmode" = "root" ]; then + ./run_null.sh SUDO +else + ./run_null.sh +fi + print_header "mode=$defaultmode,variant=apt: mirror is -" cat << END > shared/test.sh #!/bin/sh diff --git a/make_mirror.sh b/make_mirror.sh index 1078c8e..9571647 100755 --- a/make_mirror.sh +++ b/make_mirror.sh @@ -245,7 +245,7 @@ if [ "$HAVE_QEMU" = "yes" ]; then # procps is needed for /sbin/sysctl tmpdir="$(mktemp -d)" ./mmdebstrap --variant=apt --architectures=amd64,armhf --mode=unshare \ - --include=perl-doc,linux-image-amd64,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,proot,qemu-user-static,binfmt-support,qemu-user,dpkg-dev,mini-httpd,libdevel-cover-perl,debootstrap,libfakechroot:armhf,libfakeroot:armhf,procps \ + --include=perl-doc,linux-image-amd64,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,proot,qemu-user-static,binfmt-support,qemu-user,dpkg-dev,mini-httpd,libdevel-cover-perl,debootstrap,libfakechroot:armhf,libfakeroot:armhf,procps,apt-cudf,aspcud \ unstable - "$mirror" > "$tmpdir/debian-unstable.tar" cat << END > "$tmpdir/extlinux.conf" diff --git a/run_qemu.sh b/run_qemu.sh index f6963a8..b7b925a 100755 --- a/run_qemu.sh +++ b/run_qemu.sh @@ -32,7 +32,7 @@ if [ -e /dev/kvm ]; then fi # to connect to serial use: # minicom -D 'unix#/tmp/ttyS0' -qemu-system-x86_64 $KVM -m 512M -nographic \ +qemu-system-x86_64 $KVM -m 1G -nographic \ -monitor unix:/tmp/monitor,server,nowait \ -serial unix:/tmp/ttyS0,server,nowait \ -serial unix:/tmp/ttyS1,server,nowait \