summaryrefslogtreecommitdiff
path: root/tests.branching/setup-second-chunk
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-second-chunk
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-second-chunk')
-rwxr-xr-xtests.branching/setup-second-chunk39
1 files changed, 15 insertions, 24 deletions
diff --git a/tests.branching/setup-second-chunk b/tests.branching/setup-second-chunk
index 0bbb0e27..985db1dc 100755
--- a/tests.branching/setup-second-chunk
+++ b/tests.branching/setup-second-chunk
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2012 Codethink Limited
+# Copyright (C) 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
@@ -28,11 +28,9 @@ create_chunk() {
cd "$1"
cat <<EOF > "$1/$2.morph"
-{
- "name": "$2",
- "kind": "chunk",
- "build-system": "dummy"
-}
+build-system: dummy
+kind: chunk
+name: $2
EOF
git init --quiet
@@ -44,24 +42,17 @@ create_chunk "$DATADIR/goodbye" "hello"
cd "$DATADIR/morphs"
cat <<EOF > hello-stratum.morph
-{
- "name": "hello-stratum",
- "kind": "stratum",
- "chunks": [
- {
- "name": "hello",
- "repo": "test:hello",
- "ref": "master",
- "build-depends": []
- },
- {
- "name": "goodbye",
- "repo": "test:goodbye",
- "ref": "master",
- "build-depends": []
- }
- ]
-}
+name: hello-stratum
+kind: stratum
+chunks:
+- build-depends: []
+ name: hello
+ ref: master
+ repo: test:hello
+- build-depends: []
+ name: goodbye
+ ref: master
+ repo: test:goodbye
EOF
git commit -q --all -m "Add goodbye to hello-stratum"