summaryrefslogtreecommitdiff
path: root/tests.branching/tag-works-with-multiple-morphs-repos.script
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/tag-works-with-multiple-morphs-repos.script
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/tag-works-with-multiple-morphs-repos.script')
-rwxr-xr-xtests.branching/tag-works-with-multiple-morphs-repos.script71
1 files changed, 26 insertions, 45 deletions
diff --git a/tests.branching/tag-works-with-multiple-morphs-repos.script b/tests.branching/tag-works-with-multiple-morphs-repos.script
index 5259b4c1..87c72d8e 100755
--- a/tests.branching/tag-works-with-multiple-morphs-repos.script
+++ b/tests.branching/tag-works-with-multiple-morphs-repos.script
@@ -33,40 +33,28 @@ mkdir "$DATADIR/repos/morphs1"
# Create system morphology in first morphs repository.
cat <<EOF > "$DATADIR/repos/morphs1/test-system.morph"
-{
- "name": "test-system",
- "kind": "system",
- "system-kind": "rootfs-tarball",
- "arch": "$(uname -m)",
- "disk-size": "1G",
- "strata": [
- {
- "morph": "stratum1",
- "repo": "repos:morphs1",
- "ref": "master"
- },
- {
- "morph": "stratum2",
- "repo": "repos:morphs2",
- "ref": "master"
- }
- ]
-}
+name: test-system
+kind: system
+system-kind: rootfs-tarball
+arch: $(uname -m)
+disk-size: 1G
+strata:
+- morph: stratum1
+ ref: master
+ repo: repos:morphs1
+- morph: stratum2
+ ref: master
+ repo: repos:morphs2
EOF
# Create stratum that depends on another stratum.
cat <<EOF > "$DATADIR/repos/morphs1/stratum1.morph"
-{
- "name": "stratum1",
- "kind": "stratum",
- "build-depends": [
- {
- "morph": "stratum3",
- "repo": "repos:morphs2",
- "ref": "master"
- }
- ]
-}
+name: stratum1
+kind: stratum
+build-depends:
+- morph: stratum3
+ ref: master
+ repo: repos:morphs2
EOF
# Commit all files to the first repository.
@@ -79,23 +67,16 @@ mkdir "$DATADIR/repos/morphs2"
# Create two strata in the second repository.
cat <<EOF > "$DATADIR/repos/morphs2/stratum2.morph"
-{
- "name": "stratum2",
- "kind": "stratum",
- "build-depends": [
- {
- "morph": "stratum3",
- "repo": "repos:morphs2",
- "ref": "master"
- }
- ]
-}
+name: stratum2
+kind: stratum
+build-depends:
+- morph: stratum3
+ repo: repos:morphs2
+ ref: master
EOF
cat <<EOF > "$DATADIR/repos/morphs2/stratum3.morph"
-{
- "name": "stratum3",
- "kind": "stratum"
-}
+kind: stratum
+name: stratum3
EOF
# Commit all files to the second repository.