diff options
Diffstat (limited to 'tests.as-root/setup')
-rwxr-xr-x | tests.as-root/setup | 144 |
1 files changed, 56 insertions, 88 deletions
diff --git a/tests.as-root/setup b/tests.as-root/setup index d3ba7ef4..285a3143 100755 --- a/tests.as-root/setup +++ b/tests.as-root/setup @@ -10,7 +10,7 @@ # The stratum repository contains a single branch, "master", with a # stratum and a system morphology that include the chunk above. # -# Copyright (C) 2011, 2012 Codethink Limited +# Copyright (C) 2011, 2012, 2013 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -62,19 +62,15 @@ EOF git add hello.c cat <<EOF > hello.morph -{ - "name": "hello", - "kind": "chunk", - "build-system": "dummy", - "build-commands": [ - "gcc -o hello hello.c" - ], - "install-commands": [ - "install -d \\"\$DESTDIR\\"/etc", - "install -d \\"\$DESTDIR\\"/bin", - "install hello \\"\$DESTDIR\\"/bin/hello" - ] -} +name: hello +kind: chunk +build-system: dummy +build-commands: + - gcc -o hello hello.c +install-commands: + - install -d "\$DESTDIR"/etc + - install -d "\$DESTDIR"/bin + - install hello "\$DESTDIR"/bin/hello EOF git add hello.morph @@ -92,82 +88,57 @@ cd "$morphsrepo" git init --quiet cat <<EOF > hello-stratum.morph -{ - "name": "hello-stratum", - "kind": "stratum", - "chunks": [ - { - "name": "hello", - "repo": "test:chunk-repo", - "ref": "farrokh", - "build-depends": [] - } - ] -} +name: hello-stratum +kind: stratum +chunks: + - name: hello + repo: test:chunk-repo + ref: farrokh + build-depends: [] EOF git add hello-stratum.morph cat <<EOF > hello-system.morph -{ - "name": "hello-system", - "kind": "system", - "system-kind": "syslinux-disk", - "arch": "$(uname -m)", - "disk-size": "1G", - "strata": [ - { - "morph": "hello-stratum", - "repo": "test:morphs", - "ref": "master" - } - ] -} +name: hello-system +kind: system +system-kind: syslinux-disk +arch: `uname -m` +disk-size: 1G +strata: + - morph: hello-stratum + repo: test:morphs + ref: master EOF git add hello-system.morph cat <<EOF > linux-stratum.morph -{ - "name": "linux-stratum", - "kind": "stratum", - "build-depends": [ - { - "morph": "hello-stratum", - "repo": "test:morphs", - "ref": "master" - } - ], - "chunks": [ - { - "name": "linux", - "repo": "test:kernel-repo", - "ref": "master", - "build-depends": [] - } - ] -} +name: linux-stratum +kind: stratum +build-depends: + - morph: hello-stratum + repo: test:morphs + ref: master +chunks: + - name: linux + repo: test:kernel-repo + ref: master + build-depends: [] EOF git add linux-stratum.morph cat <<EOF > linux-system.morph -{ - "name": "linux-system", - "kind": "system", - "system-kind": "syslinux-disk", - "arch": "$(uname -m)", - "disk-size": "1G", - "strata": [ - { - "morph": "hello-stratum", - "repo": "test:morphs", - "ref": "master" - }, - { - "morph": "linux-stratum", - "repo": "test:morphs", - "ref": "master" - } - ] -} +name: linux-system +kind: system +system-kind: syslinux-disk +arch: `uname -m` +disk-size: 1G +strata: + - morph: hello-stratum + repo: test:morphs + ref: master + - morph: linux-stratum + repo: test:morphs + ref: master EOF git add linux-system.morph @@ -176,16 +147,13 @@ git commit --quiet -m "add morphs" # Make a dummy kernel chunk. mkdir "$DATADIR/kernel-repo" cat <<EOF > "$DATADIR/kernel-repo/linux.morph" -{ - "name": "linux", - "kind": "chunk", - "install-commands": [ - "mkdir -p \"\$DESTDIR/boot\"", - "touch \"\$DESTDIR\"/extlinux.conf", - "touch \"\$DESTDIR\"/boot/vmlinuz", - "touch \"\$DESTDIR\"/boot/System.map" - ] -} +name: linux +kind: chunk +install-commands: + - mkdir -p "\$DESTDIR/boot" + - touch "\$DESTDIR/extlinux.conf" + - touch "\$DESTDIR/boot/vmlinuz" + - touch "\$DESTDIR/boot/System.map" EOF "$SRCDIR/scripts/run-git-in" "$DATADIR/kernel-repo" init --quiet "$SRCDIR/scripts/run-git-in" "$DATADIR/kernel-repo" add . |