diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-23 18:09:43 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-23 18:09:43 +0000 |
commit | fc36d60419d57cef1af145974047ccd89deb84e3 (patch) | |
tree | 2e8881c81697a6b87842d56f23429a53b0374841 /tests | |
parent | abc009c2795131a4aaaf29a65dda3e03e608f6d6 (diff) | |
download | morph-fc36d60419d57cef1af145974047ccd89deb84e3.tar.gz |
make-patch test: dummy stratum has dummy boot info
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/make-patch.script | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/tests/make-patch.script b/tests/make-patch.script index 9b50ea96..b0b8e7ef 100755 --- a/tests/make-patch.script +++ b/tests/make-patch.script @@ -19,6 +19,39 @@ set -eu +( # make the dummy stratum contain a chunk for a fake kernel + mkdir -p "$DATADIR/dummykernel" + cd "$DATADIR/dummykernel" + git init --quiet + cat <<EOF >dummykernel.morph +{ + "name": "dummykernel", + "kind": "chunk", + "install-commands": [ + "mkdir -p \"\$DESTDIR/boot\"", + "touch \"\$DESTDIR\"/extlinux.conf", + "touch \"\$DESTDIR\"/boot/vmlinuz", + "touch \"\$DESTDIR\"/boot/System.map" + ] +} +EOF + + + git add . + git commit --quiet -m "Make dummy boot files" + + cd "$DATADIR/morphs-repo" + git checkout --quiet master + sed -i -e 's/^.*sources.*$/&\ + {\ + "name": "dummykernel",\ + "ref": "master"\ + },\ +/' hello-stratum.morph + + git commit --quiet -m "add dummy kernel" hello-stratum.morph +) + tests/morph build morphs-repo master hello-system.morph # save the stratum as we will apply the patch on top of this later @@ -43,7 +76,7 @@ tests/morph build morphs-repo evil hello-system.morph # make a patch to make the system evil PATCH="$DATADIR"/patchfile -tests/morph make_patch "$PATCH" morphs-repo master hello-system.morph \ +tests/morph make-patch "$PATCH" morphs-repo master hello-system.morph \ morphs-repo evil hello-system.morph UNPACKED="$DATADIR"/unpacked |