summaryrefslogtreecommitdiff
path: root/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-10-26 13:48:57 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-10-26 13:48:57 +0000
commit15243493b945d87bc56d625b722060dd10799d15 (patch)
tree6873b8fd2409852cea277d425ae242d0f55251dc /tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
parent2bcc7ba44734c73a4a80b40b80a42b1376af5e00 (diff)
parentc67afe0431f4abfc16eb9994239c3f21b56ad303 (diff)
downloadmorph-15243493b945d87bc56d625b722060dd10799d15.tar.gz
Merge branch 'samthursfield/write-metadata-for-system' of git://git.baserock.org/baserock/morph
This includes a fixup of shell quoting in tests.as-root/lib. Tests needs to be run with a larget TMPDIR than systemd's default, since system images can be large.
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"