forked from josch/mmdebstrap
tests: fall back to diffoscope if cmp failed
This commit is contained in:
parent
a23dd36bb6
commit
b474150f27
5 changed files with 8 additions and 8 deletions
|
@ -11,6 +11,6 @@ for INCLUDE in '' 'apt' 'apt,build-essential' 'systemd-sysv'; do
|
||||||
${INCLUDE:+--include="$INCLUDE"} \
|
${INCLUDE:+--include="$INCLUDE"} \
|
||||||
{{ DIST }} "/tmp/$MODE.tar" {{ MIRROR }}
|
{{ DIST }} "/tmp/$MODE.tar" {{ MIRROR }}
|
||||||
done
|
done
|
||||||
cmp /tmp/root.tar /tmp/chrootless.tar
|
cmp /tmp/root.tar /tmp/chrootless.tar || diffoscope /tmp/root.tar /tmp/chrootless.tar
|
||||||
rm /tmp/chrootless.tar /tmp/root.tar
|
rm /tmp/chrootless.tar /tmp/root.tar
|
||||||
done
|
done
|
||||||
|
|
|
@ -30,6 +30,6 @@ for INCLUDE in '' 'apt' 'apt,build-essential' 'systemd-sysv'; do
|
||||||
$prefix fakeroot {{ CMD }} --mode={{ MODE }} --variant={{ VARIANT }} --hook-dir=./hooks/merged-usr \
|
$prefix fakeroot {{ CMD }} --mode={{ MODE }} --variant={{ VARIANT }} --hook-dir=./hooks/merged-usr \
|
||||||
${INCLUDE:+--include="$INCLUDE"} \
|
${INCLUDE:+--include="$INCLUDE"} \
|
||||||
{{ DIST }} /tmp/chrootless.tar {{ MIRROR }}
|
{{ DIST }} /tmp/chrootless.tar {{ MIRROR }}
|
||||||
cmp /tmp/root.tar /tmp/chrootless.tar
|
cmp /tmp/root.tar /tmp/chrootless.tar || diffoscope /tmp/root.tar /tmp/chrootless.tar
|
||||||
rm /tmp/chrootless.tar /tmp/root.tar
|
rm /tmp/chrootless.tar /tmp/root.tar
|
||||||
done
|
done
|
||||||
|
|
|
@ -63,6 +63,6 @@ for INCLUDE in '' 'apt' 'systemd-sysv'; do
|
||||||
> "/tmp/$tar.tar.tmp"
|
> "/tmp/$tar.tar.tmp"
|
||||||
mv "/tmp/$tar.tar.tmp" "/tmp/$tar.tar"
|
mv "/tmp/$tar.tar.tmp" "/tmp/$tar.tar"
|
||||||
done
|
done
|
||||||
cmp /tmp/root.tar /tmp/chrootless.tar
|
cmp /tmp/root.tar /tmp/chrootless.tar || diffoscope /tmp/root.tar /tmp/chrootless.tar
|
||||||
rm /tmp/chrootless.tar /tmp/root.tar
|
rm /tmp/chrootless.tar /tmp/root.tar
|
||||||
done
|
done
|
||||||
|
|
|
@ -46,4 +46,4 @@ chmod +x script.sh
|
||||||
--customize-hook=./script.sh \
|
--customize-hook=./script.sh \
|
||||||
--customize-hook="copy-out /tmp/chroot-fakechroot.tar /tmp" \
|
--customize-hook="copy-out /tmp/chroot-fakechroot.tar /tmp" \
|
||||||
{{ DIST }} /dev/null {{ MIRROR }}
|
{{ DIST }} /dev/null {{ MIRROR }}
|
||||||
cmp /tmp/chroot-fakechroot.tar /tmp/chroot-root.tar
|
cmp /tmp/chroot-fakechroot.tar /tmp/chroot-root.tar || diffoscope /tmp/chroot-fakechroot.tar /tmp/chroot-root.tar
|
||||||
|
|
|
@ -38,8 +38,8 @@ if [ {{ MODE }} = "unshare" ]; then
|
||||||
--customize-hook='umount -l mnt sys' \
|
--customize-hook='umount -l mnt sys' \
|
||||||
{{ DIST }} /tmp/chroot2.tar {{ MIRROR }}
|
{{ DIST }} /tmp/chroot2.tar {{ MIRROR }}
|
||||||
|
|
||||||
cmp /tmp/chroot1.tar /tmp/chroot2.tar
|
cmp /tmp/chroot1.tar /tmp/chroot2.tar || diffoscope /tmp/chroot1.tar /tmp/chroot2.tar
|
||||||
cmp /tmp/chroot1.tar /tmp/chroot3.tar
|
cmp /tmp/chroot1.tar /tmp/chroot3.tar || diffoscope /tmp/chroot1.tar /tmp/chroot3.tar
|
||||||
rm /tmp/chroot2.tar /tmp/chroot3.tar
|
rm /tmp/chroot2.tar /tmp/chroot3.tar
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -51,5 +51,5 @@ $prefix {{ CMD }} --mode={{ MODE }} --variant=apt --include=mount \
|
||||||
--customize-hook='rm "$1/'"$MMDEBSTRAP"'"' \
|
--customize-hook='rm "$1/'"$MMDEBSTRAP"'"' \
|
||||||
{{ DIST }} /tmp/chroot2.tar {{ MIRROR }}
|
{{ DIST }} /tmp/chroot2.tar {{ MIRROR }}
|
||||||
|
|
||||||
cmp /tmp/chroot1.tar /tmp/chroot2.tar
|
cmp /tmp/chroot1.tar /tmp/chroot2.tar || diffoscope /tmp/chroot1.tar /tmp/chroot2.tar
|
||||||
cmp /tmp/chroot1.tar /tmp/chroot3.tar
|
cmp /tmp/chroot1.tar /tmp/chroot3.tar || diffoscope /tmp/chroot1.tar /tmp/chroot3.tar
|
||||||
|
|
Loading…
Reference in a new issue