summaryrefslogtreecommitdiff
path: root/tests.branching/setup
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-13 16:40:37 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-14 16:59:36 +0000
commit5374f53985d357255126a917b107ce78ece5941d (patch)
tree1ca7fe5a228c1d89a4d8e19f3885bd00966e98ad /tests.branching/setup
parent1c44afdafb32a803e2578ace2545c2fe36373538 (diff)
downloadmorph-5374f53985d357255126a917b107ce78ece5941d.tar.gz
Fix test suite to patch YAML instead of JSON
I shouldn't be doing this in the middle of refactoring, but trying to get the new code to emit exactly the right kind of JSON is too much pain, and these tests need to be rewritten to use YAML in the near future anyway (we'll drop JSON support eventually), so I don't want to spend more time on this than necessary. The changes in this commit convert morphologies in JSON to YAML, and fix test code that modifies the morphologies to work with the YAML. There is probably more JSON lurking about.
Diffstat (limited to 'tests.branching/setup')
-rwxr-xr-xtests.branching/setup49
1 files changed, 18 insertions, 31 deletions
diff --git a/tests.branching/setup b/tests.branching/setup
index 11fdf0f1..89fb392b 100755
--- a/tests.branching/setup
+++ b/tests.branching/setup
@@ -48,35 +48,24 @@ mkdir "$DATADIR/morphs"
ln -s "$DATADIR/morphs" "$DATADIR/morphs.git"
cat <<EOF > "$DATADIR/morphs/hello-system.morph"
-{
- "name": "hello-system",
- "kind": "system",
- "system-kind": "rootfs-tarball",
- "arch": "$(uname -m)",
- "disk-size": "1G",
- "strata": [
- {
- "morph": "hello-stratum",
- "repo": "test:morphs",
- "ref": "master"
- }
- ]
-}
+arch: $(uname -m)
+kind: system
+name: hello-system
+strata:
+- morph: hello-stratum
+ ref: master
+ repo: test:morphs
+system-kind: rootfs-tarball
EOF
cat <<EOF > "$DATADIR/morphs/hello-stratum.morph"
-{
- "name": "hello-stratum",
- "kind": "stratum",
- "chunks": [
- {
- "name": "hello",
- "repo": "test:hello",
- "ref": "master",
- "build-depends": []
- }
- ]
-}
+chunks:
+- build-depends: []
+ name: hello
+ ref: master
+ repo: test:hello
+kind: stratum
+name: hello-stratum
EOF
scripts/run-git-in "$DATADIR/morphs" init
@@ -96,11 +85,9 @@ scripts/run-git-in "$DATADIR/morphs" checkout master
mkdir "$DATADIR/hello"
cat <<EOF > "$DATADIR/hello/hello.morph"
-{
- "name": "hello",
- "kind": "chunk",
- "build-system": "dummy"
-}
+build-system: dummy
+kind: chunk
+name: hello
EOF
scripts/run-git-in "$DATADIR/hello" init