summaryrefslogtreecommitdiff
path: root/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
diff options
context:
space:
mode:
Diffstat (limited to 'tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script')
-rwxr-xr-xtests.as-root/syslinux-disk-builds-rootfs-and-kernel.script18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
index f996aaa4..746ca3c5 100755
--- a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
+++ b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# A system kind of syslinux-disk should create the disk image, plus a kernel
# file.
@@ -20,6 +20,8 @@
set -eu
+. "$SRCDIR/tests.as-root/lib"
+
# We only support x86 systems with syslinux-disk.
arch=$(uname -m)
case "$arch" in
@@ -90,8 +92,9 @@ git add linux.morph
git commit --quiet -m 'Make the kernel create a dummy zImage'
-"$SRCDIR/scripts/test-morph" \
- build-morphology test:morphs-repo custom system > /dev/null
+
+rootfs=$("$SRCDIR/scripts/test-morph" --find-system-artifact \
+ build-morphology test:morphs-repo custom system)
for suffix in kernel rootfs
do
@@ -103,3 +106,12 @@ do
fi
done
+mkdir -p "$DATADIR/mnt"
+device=$(loopback_rootfs "$rootfs")
+mount "$device" "$DATADIR/mnt"
+trap 'cd /; umount -d "$device"' INT TERM ERR
+
+cd "$DATADIR/mnt"
+find | LC_ALL=C sort -u
+cd "$DATADIR"
+umount -d "$device"