From 5374f53985d357255126a917b107ce78ece5941d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 13 Aug 2013 16:40:37 +0000 Subject: 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. --- tests.as-root/build-with-external-strata.script | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tests.as-root') 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 <> 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 -- cgit v1.2.1