From fcf1c407de472fbe77d4a09c5d1c799066e96112 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Fri, 10 Jan 2025 01:36:08 +0100 Subject: [PATCH] tests/empty-suite: do not rely on existing ./cache/mmdebstrap-unstable-apt.tar 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. --- tests/empty-suite | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/empty-suite b/tests/empty-suite index 411d456..846d849 100644 --- a/tests/empty-suite +++ b/tests/empty-suite @@ -3,11 +3,14 @@ set -eu export LC_ALL=C.UTF-8 export SOURCE_DATE_EPOCH={{ SOURCE_DATE_EPOCH }} -trap "rm -f /tmp/debian-chroot.tar" EXIT INT TERM +trap "rm -f /tmp/debian-chroot1.tar /tmp/debian-chroot2.tar" EXIT INT TERM -{{ CMD }} --variant={{ VARIANT }} --verbose \ +{{ 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-chroot.tar + '' /tmp/debian-chroot2.tar -cmp ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.tar /tmp/debian-chroot.tar \ - || diffoscope ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.tar /tmp/debian-chroot.tar +cmp /tmp/debian-chroot1.tar /tmp/debian-chroot2.tar \ + || diffoscope /tmp/debian-chroot1.tar /tmp/debian-chroot2.tar