diff options
Diffstat (limited to '')
-rw-r--r-- | tests/create-directory | 9 | ||||
-rw-r--r-- | tests/create-directory-dry-run | 29 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/create-directory b/tests/create-directory new file mode 100644 index 0000000..2d5461b --- /dev/null +++ b/tests/create-directory @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu +export LC_ALL=C.UTF-8 + +trap "rm -rf /tmp/debian-chroot" EXIT INT TERM + +{{ CMD }} --mode=root --variant=apt {{ DIST }} /tmp/debian-chroot {{ MIRROR }} +chroot /tmp/debian-chroot dpkg-query --showformat '${binary:Package}\n' --show > pkglist.txt +tar -C /tmp/debian-chroot --one-file-system -c . | tar -t | sort > tar1.txt diff --git a/tests/create-directory-dry-run b/tests/create-directory-dry-run new file mode 100644 index 0000000..03226e4 --- /dev/null +++ b/tests/create-directory-dry-run @@ -0,0 +1,29 @@ +#!/bin/sh +set -eu +export LC_ALL=C.UTF-8 +{{ CMD }} --mode={{ MODE }} --dry-run --variant=apt \ + --setup-hook="exit 1" \ + --essential-hook="exit 1" \ + --customize-hook="exit 1" \ + {{ DIST }} /tmp/debian-chroot {{ MIRROR }} +rm /tmp/debian-chroot/dev/console +rm /tmp/debian-chroot/dev/fd +rm /tmp/debian-chroot/dev/full +rm /tmp/debian-chroot/dev/null +rm /tmp/debian-chroot/dev/ptmx +rm /tmp/debian-chroot/dev/random +rm /tmp/debian-chroot/dev/stderr +rm /tmp/debian-chroot/dev/stdin +rm /tmp/debian-chroot/dev/stdout +rm /tmp/debian-chroot/dev/tty +rm /tmp/debian-chroot/dev/urandom +rm /tmp/debian-chroot/dev/zero +rm /tmp/debian-chroot/etc/apt/sources.list +rm /tmp/debian-chroot/etc/fstab +rm /tmp/debian-chroot/etc/hostname +rm /tmp/debian-chroot/etc/resolv.conf +rm /tmp/debian-chroot/var/lib/apt/lists/lock +rm /tmp/debian-chroot/var/lib/dpkg/status +rm /tmp/debian-chroot/var/lib/dpkg/arch +# the rest should be empty directories that we can rmdir recursively +find /tmp/debian-chroot -depth -print0 | xargs -0 rmdir |