coverage.sh: change busybox test to not be super sensitive about changes in unstable anymore

This commit is contained in:
Johannes 'josch' Schauer 2020-01-05 20:58:20 +01:00
parent ca9cb3145e
commit 46c9d4e058
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1987,36 +1987,28 @@ cat << END > shared/test.sh
#!/bin/sh #!/bin/sh
set -eu set -eu
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
pkgs=base-files,base-passwd,busybox,debianutils,dpkg,libc-bin,mawk,tar
$CMD --mode=root --variant=custom \ $CMD --mode=root --variant=custom \
--include=dpkg,busybox,libc-bin,base-files,base-passwd,debianutils \ --include=\$pkgs \
--setup-hook='mkdir -p "\$1/bin"' \ --setup-hook='mkdir -p "\$1/bin"' \
--setup-hook='for p in awk cat chmod chown cp diff echo env grep less ln mkdir mount rm rmdir sed sh sleep sort touch uname; do ln -s busybox "\$1/bin/\$p"; done' \ --setup-hook='for p in awk cat chmod chown cp diff echo env grep less ln mkdir mount rm rmdir sed sh sleep sort touch uname; do ln -s busybox "\$1/bin/\$p"; done' \
--setup-hook='echo root:x:0:0:root:/root:/bin/sh > "\$1/etc/passwd"' \ --setup-hook='echo root:x:0:0:root:/root:/bin/sh > "\$1/etc/passwd"' \
--setup-hook='printf "root:x:0:\nmail:x:8:\nutmp:x:43:\n" > "\$1/etc/group"' \ --setup-hook='printf "root:x:0:\nmail:x:8:\nutmp:x:43:\n" > "\$1/etc/group"' \
$DEFAULT_DIST /tmp/debian-chroot $mirror $DEFAULT_DIST /tmp/debian-chroot $mirror
cat << FILE > expected echo "\$pkgs" | tr ',' '\n' > /tmp/expected
base-files chroot /tmp/debian-chroot dpkg-query -f '\${binary:Package}\n' -W \
base-passwd | comm -12 - /tmp/expected \
busybox | diff -u - /tmp/expected
debianutils rm /tmp/expected
dpkg for cmd in echo cat sort sed grep; do
gcc-9-base:amd64 test -L /tmp/debian-chroot/bin/\$cmd
libacl1:amd64 test "\$(readlink /tmp/debian-chroot/bin/\$cmd)" = "busybox"
libbz2-1.0:amd64 done
libc-bin chroot /tmp/debian-chroot echo foobar \
libc6:amd64 | chroot /tmp/debian-chroot cat \
libcrypt1:amd64 | chroot /tmp/debian-chroot sort \
libdebconfclient0:amd64 | chroot /tmp/debian-chroot sed 's/foobar/blubber/' \
libgcc1:amd64 | chroot /tmp/debian-chroot grep blubber
liblzma5:amd64
libpcre2-8-0:amd64
libselinux1:amd64
mawk
tar
zlib1g:amd64
FILE
chroot /tmp/debian-chroot dpkg-query -f '\${binary:Package}\n' -W | diff -u - expected
rm expected
rm -r /tmp/debian-chroot rm -r /tmp/debian-chroot
END END
if [ "$HAVE_QEMU" = "yes" ]; then if [ "$HAVE_QEMU" = "yes" ]; then