summaryrefslogtreecommitdiff
path: root/tests.as-root
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.as-root
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.as-root')
-rwxr-xr-xtests.as-root/build-with-external-strata.script28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests.as-root/build-with-external-strata.script b/tests.as-root/build-with-external-strata.script
index fd021399..028bdef1 100755
--- a/tests.as-root/build-with-external-strata.script
+++ b/tests.as-root/build-with-external-strata.script
@@ -30,20 +30,20 @@ cd "$DATADIR/workspace"
cd "branch1"
"$SRCDIR/scripts/test-morph" edit hello-system stratum2
cd "test:external-strata"
-cat stratum2.morph | \
- head -n $(expr $(wc -l < stratum2.morph) - 3) > stratum2.morph
-cat <<EOF >> stratum2.morph
- },
- {
- "name": "linux",
- "repo": "test:kernel-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": []
- }
- ]
-}
-EOF
+
+awk '
+ /^chunks:/ {
+ print $0
+ print "- name: linux"
+ print " repo: test:kernel-repo"
+ print " ref: master"
+ print " build-mode: test"
+ print " build-depends: []"
+ next
+ }
+ { print }
+' stratum2.morph > temp
+mv temp stratum2.morph
# Ignore Morph's output for now because it gives us:
# 2012-11-07 16:26:12 Overlaps in system artifact hello-system-rootfs detected