From 7e5bab59aa4c292e93654892e656d807891084ba Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Mon, 23 Mar 2015 16:00:23 +0000 Subject: Add a test for partial deployment Change-Id: Iaab620f3d9ebc037fe024db933b03e8f40ca40a4 --- yarns/implementations.yarn | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'yarns/implementations.yarn') diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index ce49d4b1..365076c1 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -332,6 +332,29 @@ another to hold a chunk. - copy files EOF + install -m644 -D /dev/stdin << EOF "clusters/partial-test-cluster.morph" + name: partial-test-cluster + kind: cluster + systems: + - morph: systems/test-system.morph + deploy: + tar: + type: tar + location: test.tar + partial-deploy-components: + - strata/build-essential.morph + sysroot: + type: sysroot + location: test.sysroot + partial-deploy-components: + - strata/build-essential.morph + rawdisk: + type: rawdisk + location: test.img + partial-deploy-components: + - strata/build-essential.morph + EOF + git add . git commit -m Initial. git tag -a "test-tag" -m "Tagging test-tag" @@ -440,7 +463,6 @@ You need an architecture to build a system, we don't default to the host archite run_in "$DATADIR/gits/morphs" git add "$MATCH_1" run_in "$DATADIR/gits/morphs" git commit -m "Added $MATCH_1." - Implementation sections for system branch operations ---------------------------------------------------- @@ -825,6 +847,15 @@ them, so they can be added to the end of the implements section. if [ "$MATCH_1" = "deploys" ]; then run_morph "$@" else attempt_morph "$@"; fi + IMPLEMENTS WHEN the user (attempts to partially deploy|partially deploys) (.*) from cluster (\S+) in branch (\S+) + cd "$DATADIR/workspace/$MATCH_4/test/morphs" + set -- deploy "$MATCH_3" + systems=$(echo "$MATCH_2" | sed -e 's/, /\n/g' -e 's/ and /\n/g') + echo "partial=True" >> "$DATADIR/morph.conf" + set -- "$@" $systems + if [ "$MATCH_1" = "partially deploys" ]; then run_morph "$@" + else attempt_morph "$@"; fi + IMPLEMENTS WHEN the user (attempts to upgrade|upgrades) the (system|cluster) (\S+) in branch (\S+)( with options (.*))? cd "$DATADIR/workspace/$MATCH_4/test/morphs" set -- upgrade "$MATCH_3" -- cgit v1.2.1