This is useful for running this test standalone or as part of the Debian package autopkgtest where it is run in the optional set of tests.
16 lines
523 B
Bash
16 lines
523 B
Bash
#!/bin/sh
|
|
set -eu
|
|
export LC_ALL=C.UTF-8
|
|
export SOURCE_DATE_EPOCH={{ SOURCE_DATE_EPOCH }}
|
|
|
|
trap "rm -f /tmp/debian-chroot1.tar /tmp/debian-chroot2.tar" EXIT INT TERM
|
|
|
|
{{ CMD }} --variant={{ VARIANT }} \
|
|
{{ DIST }} /tmp/debian-chroot1.tar {{ MIRROR }}
|
|
|
|
{{ CMD }} --variant={{ VARIANT }} \
|
|
--setup-hook='echo deb {{ MIRROR }} {{ DIST }} main >> "$1"/etc/apt/sources.list' \
|
|
'' /tmp/debian-chroot2.tar
|
|
|
|
cmp /tmp/debian-chroot1.tar /tmp/debian-chroot2.tar \
|
|
|| diffoscope /tmp/debian-chroot1.tar /tmp/debian-chroot2.tar
|