From e20f9de6e4235d7ab2087031d405827253faeccb Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 26 Jul 2012 11:24:14 +0100 Subject: Fix rootfs-tarball to create kernel image on all arches Previously, it was only being created on ARM. --- .../rootfs-tarball-builds-rootfs-and-kernel.script | 38 ++++++++++++++-------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script') diff --git a/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script b/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script index 680bee68..e88e7717 100755 --- a/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script +++ b/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script @@ -25,23 +25,25 @@ kernelrepo="$DATADIR/kernel-repo" morphsrepo="$DATADIR/morphs-repo" log="$DATADIR/morph.log" +arch=$(uname -m) + cd "$morphsrepo" -git checkout --quiet -b arm master -cat <arm-system.morph +git checkout --quiet -b custom master +cat <system.morph { - "name": "arm-system", + "name": "system", "kind": "system", "system-kind": "rootfs-tarball", - "arch": "arm", + "arch": "$(arch)", "disk-size": "1G", "strata": [ - "arm-stratum" + "stratum" ] } EOF -cat <arm-stratum.morph +cat <stratum.morph { - "name": "arm-stratum", + "name": "stratum", "kind": "stratum", "sources": [ { @@ -53,17 +55,17 @@ cat <arm-stratum.morph { "name": "linux", "repo": "test:kernel-repo", - "ref": "arm", + "ref": "custom", "build-depends": ["hello"] } ] } EOF -git add arm-system.morph arm-stratum.morph -git commit --quiet -m "add arm system" +git add system.morph stratum.morph +git commit --quiet -m "add custom system" cd "$kernelrepo" -git checkout --quiet -b arm master +git checkout --quiet -b custom master cat <linux.morph { "name": "linux", @@ -79,7 +81,15 @@ git add linux.morph git commit --quiet -m 'Make the kernel create a dummy zImage' "$SRCDIR/scripts/test-morph" \ - build test:morphs-repo arm arm-system.morph > /dev/null -[ -e "$cache"/*system.arm-system-kernel ] || find "$cache" -[ -e "$cache"/*system.arm-system-rootfs ] || find "$cache" + build test:morphs-repo custom system.morph > /dev/null + +for suffix in kernel rootfs +do + if [ ! -e "$cache"/*system.system-$suffix ] + then + echo "can't find $cache/*system.system-$suffix" 1>&2 + find "$cache" 1>&2 + exit 1 + fi +done -- cgit v1.2.1