diff options
author | Helmut Grohne <helmutg@debian.org> | 2025-04-11 13:17:17 +0000 |
---|---|---|
committer | Helmut Grohne <helmutg@debian.org> | 2025-04-11 13:17:17 +0000 |
commit | c4faa82f9c451d06ee8598e633c3a8e77c449bfe (patch) | |
tree | 3bb2cd8e17d4493f61362412aa262bdfcb0ada76 /tests/autopkgtest-qemu-efi.sh | |
parent | 0ef75afe1fe982df1bacfcddd9c6dc354ad07ea5 (diff) | |
parent | 437a5587f1ac95fd340ba45a5c9933d4c7a24f4b (diff) | |
download | debvm-c4faa82f9c451d06ee8598e633c3a8e77c449bfe.tar.gz |
Merge branch 'debefivm' into 'main'
add a new family of wrappers for EFI based images
See merge request helmutg/debvm!49
Diffstat (limited to 'tests/autopkgtest-qemu-efi.sh')
-rwxr-xr-x | tests/autopkgtest-qemu-efi.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/autopkgtest-qemu-efi.sh b/tests/autopkgtest-qemu-efi.sh new file mode 100755 index 0000000..bc761d5 --- /dev/null +++ b/tests/autopkgtest-qemu-efi.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +set -eux + +IMAGE=test.img +RELEASE="${1:-}" + +cleanup() { + rm -f "$IMAGE" +} +trap cleanup EXIT +cleanup_abort() { + cleanup + echo aborted >&2 + exit 2 +} +trap cleanup_abort HUP INT TERM QUIT + +INSTALL_LOCATION=$(command -v debefivm-create) +if test "${INSTALL_LOCATION#/usr/}" = "$INSTALL_LOCATION"; then + USERADDHOOK="${INSTALL_LOCATION%/*}/../useraddhook" +else + USERADDHOOK=/usr/share/mmdebstrap/hooks/useradd +fi + +set -- -- +if test -z "$RELEASE"; then + # We no longer need usrmerge in trixie and later and it does not work + # with copy-host-apt-sources-and-preferences in the default order. + set -- \ + --skip=usrmerge \ + "$@" \ + --hook-dir=/usr/share/mmdebstrap/hooks/copy-host-apt-sources-and-preferences \ + --hook-dir=/usr/share/mmdebstrap/hooks/file-mirror-automount \ + "" +fi + +debefivm-create \ + -o "$IMAGE" \ + -r "$RELEASE" \ + "$@" \ + --include=linux-image-generic,libpam-systemd,passwd,python3 \ + --hook-dir="$USERADDHOOK" \ + --customize-hook=/usr/share/autopkgtest/setup-commands/setup-testbed + +autopkgtest hello -- qemu --boot=efi --show-boot "$IMAGE" |