forked from josch/mmdebstrap
tests: output to stderr to prevent interleaving with set -x output
This commit is contained in:
parent
4048293be5
commit
10c3d3e5f4
4 changed files with 11 additions and 11 deletions
|
@ -83,11 +83,11 @@ rm /tmp/debian-{{ DIST }}-mm/var/lib/dpkg/arch
|
|||
# thus we first check for equality and then remove the files
|
||||
chroot /tmp/debian-{{ DIST }}-debootstrap dpkg --list > dpkg1
|
||||
chroot /tmp/debian-{{ DIST }}-mm dpkg --list > dpkg2
|
||||
diff -u dpkg1 dpkg2
|
||||
diff -u dpkg1 dpkg2 >&2
|
||||
rm dpkg1 dpkg2
|
||||
grep -v '^Priority: ' /tmp/debian-{{ DIST }}-debootstrap/var/lib/dpkg/status > status1
|
||||
grep -v '^Priority: ' /tmp/debian-{{ DIST }}-mm/var/lib/dpkg/status > status2
|
||||
diff -u status1 status2
|
||||
diff -u status1 status2 >&2
|
||||
rm status1 status2
|
||||
rm /tmp/debian-{{ DIST }}-debootstrap/var/lib/dpkg/status /tmp/debian-{{ DIST }}-mm/var/lib/dpkg/status
|
||||
# debootstrap exposes the hosts's kernel version
|
||||
|
@ -223,7 +223,7 @@ tar -C /tmp/debian-{{ DIST }}-debootstrap --numeric-owner --sort=name --clamp-mt
|
|||
tar -C /tmp/debian-{{ DIST }}-mm --numeric-owner --sort=name --clamp-mtime --mtime=$(date --utc --date=@{{ SOURCE_DATE_EPOCH }} --iso-8601=seconds) -cf /tmp/root2.tar .
|
||||
tar --full-time --verbose -tf /tmp/root1.tar > /tmp/root1.tar.list
|
||||
tar --full-time --verbose -tf /tmp/root2.tar > /tmp/root2.tar.list
|
||||
diff -u /tmp/root1.tar.list /tmp/root2.tar.list
|
||||
diff -u /tmp/root1.tar.list /tmp/root2.tar.list >&2
|
||||
rm /tmp/root1.tar /tmp/root2.tar /tmp/root1.tar.list /tmp/root2.tar.list
|
||||
|
||||
# check if file properties (permissions, ownership, symlink names, modification time) differ
|
||||
|
|
|
@ -39,5 +39,5 @@ $prefix {{ CMD }} --mode={{ MODE }} --variant=apt --architectures=arm64 {{ DIST
|
|||
| grep -v '^\./usr/share/doc/[^/]\+/changelog\(\.Debian\)\?\.amd64\.gz$' \
|
||||
| grep -v '^\./usr/share/man/man8/i386\.8\.gz$' \
|
||||
| grep -v '^\./usr/share/man/man8/x86_64\.8\.gz$';
|
||||
} | sort | diff -u - tar2.txt
|
||||
} | sort | diff -u - tar2.txt >&2
|
||||
rm /tmp/debian-chroot.tar
|
||||
|
|
|
@ -34,5 +34,5 @@ apt-get remove --yes qemu-user-static binfmt-support qemu-user
|
|||
| grep -v '^\./usr/share/doc/[^/]\+/changelog\(\.Debian\)\?\.amd64\.gz$' \
|
||||
| grep -v '^\./usr/share/man/man8/i386\.8\.gz$' \
|
||||
| grep -v '^\./usr/share/man/man8/x86_64\.8\.gz$';
|
||||
} | sort | diff -u - tar2.txt
|
||||
} | sort | diff -u - tar2.txt >&2
|
||||
rm /tmp/debian-chroot.tar
|
||||
|
|
|
@ -20,7 +20,7 @@ runuser -u user -- {{ CMD }} --mode=unshare --variant=apt --include=iputils-ping
|
|||
mkdir /tmp/debian-chroot
|
||||
tar --xattrs --xattrs-include='*' --directory /tmp/debian-chroot -xf /tmp/debian-chroot.tar ./bin/ping
|
||||
echo "/tmp/debian-chroot/bin/ping cap_net_raw=ep" > /tmp/expected
|
||||
getcap /tmp/debian-chroot/bin/ping | diff -u /tmp/expected -
|
||||
getcap /tmp/debian-chroot/bin/ping | diff -u /tmp/expected - >&2
|
||||
rm /tmp/debian-chroot/bin/ping
|
||||
rmdir /tmp/debian-chroot/bin
|
||||
rmdir /tmp/debian-chroot
|
||||
|
@ -44,16 +44,16 @@ tar --numeric-owner -tvf /tmp/debian-chroot.tar \
|
|||
> /tmp/debian-chroot.txt
|
||||
tar --numeric-owner -tvf /tmp/debian-chroot-shifted.tar \
|
||||
| sed 's/ \+/ /g' \
|
||||
| diff -u /tmp/debian-chroot.txt -
|
||||
| diff -u /tmp/debian-chroot.txt - >&2
|
||||
mkdir /tmp/debian-chroot
|
||||
tar --xattrs --xattrs-include='*' --directory /tmp/debian-chroot -xf /tmp/debian-chroot-shifted.tar
|
||||
echo "100000 100000" > /tmp/expected
|
||||
stat --format="%u %g" /tmp/debian-chroot/bin/ping | diff -u /tmp/expected -
|
||||
stat --format="%u %g" /tmp/debian-chroot/bin/ping | diff -u /tmp/expected - >&2
|
||||
echo "/tmp/debian-chroot/bin/ping cap_net_raw=ep" > /tmp/expected
|
||||
getcap /tmp/debian-chroot/bin/ping | diff -u /tmp/expected -
|
||||
getcap /tmp/debian-chroot/bin/ping | diff -u /tmp/expected - >&2
|
||||
echo "0 0" > /tmp/expected
|
||||
runuser -u user -- {{ CMD }} --unshare-helper /usr/sbin/chroot /tmp/debian-chroot stat --format="%u %g" /bin/ping \
|
||||
| diff -u /tmp/expected -
|
||||
| diff -u /tmp/expected - >&2
|
||||
echo "/bin/ping cap_net_raw=ep" > /tmp/expected
|
||||
runuser -u user -- {{ CMD }} --unshare-helper /usr/sbin/chroot /tmp/debian-chroot getcap /bin/ping \
|
||||
| diff -u /tmp/expected -
|
||||
| diff -u /tmp/expected - >&2
|
||||
|
|
Loading…
Reference in a new issue