summaryrefslogtreecommitdiff
path: root/tests.as-root/setup
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2013-01-22 16:28:09 +0000
committerJavier Jardón <javier.jardon@codethink.co.uk>2013-01-28 15:50:16 +0000
commit8c34d1e9d46b6802d8723f9d151019fe8a7c3250 (patch)
tree0353e32a842965b9cfaab86016157df8f7b30169 /tests.as-root/setup
parent3f19b84e03c3452c54f18c1a0ccc6008c6478a99 (diff)
downloadmorph-8c34d1e9d46b6802d8723f9d151019fe8a7c3250.tar.gz
Change build tests to use YAML morphologies
Diffstat (limited to 'tests.as-root/setup')
-rwxr-xr-xtests.as-root/setup144
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 .