X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=debian%2Ftests%2Fsmoke-grml2usb-py3;fp=debian%2Ftests%2Fsmoke-grml2usb-py3;h=d91a60be1b648bd5b2bd0ae59505b94bce9a3267;hp=0000000000000000000000000000000000000000;hb=b2b68f02058e0798ec3a16a4fad337a710892f5c;hpb=3fd61a430a9f728629866603d10788d00f7e796d diff --git a/debian/tests/smoke-grml2usb-py3 b/debian/tests/smoke-grml2usb-py3 new file mode 100755 index 0000000..d91a60b --- /dev/null +++ b/debian/tests/smoke-grml2usb-py3 @@ -0,0 +1,36 @@ +#!/bin/bash +exec 2>&1 +set -ex + +TMPDIR=$(mktemp -d) +LODEV=$(losetup -f) +cleanup() { + kpartx -d "$LODEV" || true + losetup -d "$LODEV" || true + rm -rf "$TMPDIR" +} +trap cleanup EXIT + +mkdir "$TMPDIR"/isoroot "$TMPDIR"/isoroot/boot "$TMPDIR"/isoroot/boot/isolinux +cp /usr/lib/ISOLINUX/isolinux.bin "$TMPDIR"/isoroot/boot/isolinux/ +echo 'FAKE' > "$TMPDIR"/isoroot/grml-version +echo 'LOGO' > "$TMPDIR"/isoroot/boot/logo.16 +touch "$TMPDIR"/isoroot/boot/isolinux/FAKE_default.cfg +touch "$TMPDIR"/isoroot/boot/isolinux/FAKE_grml.cfg +touch "$TMPDIR"/isoroot/boot/isolinux/hidden.cfg +xorriso -as mkisofs -l -r -J -no-pad -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o "$TMPDIR"/fake.iso "$TMPDIR"/isoroot +xorriso -dev "$TMPDIR"/fake.iso -ls + +dd if=/dev/zero of="$TMPDIR"/blockdev bs=1M count=50 + +sfdisk "$TMPDIR"/blockdev <