summaryrefslogtreecommitdiff
path: root/yarns/implementations.yarn
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-11-25 11:50:03 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-11-29 16:11:32 +0000
commit21d7299e927696c2536e2170f77eef9b25f80172 (patch)
tree5e6333d08174bca4b98d62aefede4caaf5d63356 /yarns/implementations.yarn
parent5ecc3651d4cab13d244e394ab63e45d79294f62d (diff)
downloadmorph-21d7299e927696c2536e2170f77eef9b25f80172.tar.gz
yarns: un-parameterise architecture in system morphologies
It doesn't make sense to be able to specify an architecture from the IMPLEMENTS name, since you either need your architecture for something to build, or testarch for something that consistently doesn't build.
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r--yarns/implementations.yarn22
1 files changed, 15 insertions, 7 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 65ac1283..132ce9b3 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -120,11 +120,14 @@ another to hold a chunk.
mkdir "$DATADIR/cache"
mkdir "$DATADIR/tmp"
- IMPLEMENTS GIVEN a system called (\S+) for architecture (\S+) in the git server
+We need a consistent value for the architecture in some tests, so we
+have a morphology using the test architecture.
+
+ IMPLEMENTS GIVEN a system called (\S+) for the test architecture in the git server
cat << EOF > "$DATADIR/gits/morphs/$MATCH_1.morph"
- arch: $MATCH_2
+ arch: testarch
configuration-extensions: []
- description: A system called $MATCH_1 for architectures $MATCH_2
+ description: A system called $MATCH_1 for test architecture
kind: system
name: $MATCH_1
strata:
@@ -265,11 +268,16 @@ Editing morphologies with `morph edit`.
cd "$DATADIR/workspace/$MATCH_3"
attempt_morph edit "$MATCH_2" "$MATCH_1"
- IMPLEMENTS WHEN the user creates an uncommitted system morphology called (\S+) for architecture (\S+) in system branch (\S+)
- cat << EOF > "$DATADIR/workspace/$MATCH_3/test:morphs/$MATCH_1.morph"
- arch: $MATCH_2
+To produce buildable morphologies, we need them to be of the same
+architecture as the machine doing the testing. This uses `morph
+print-architecture` to get a value appropriate for morph.
+
+ IMPLEMENTS WHEN the user creates an uncommitted system morphology called (\S+) for our architecture in system branch (\S+)
+ arch=$(morph print-architecture)
+ cat << EOF > "$DATADIR/workspace/$MATCH_2/test:morphs/$MATCH_1.morph"
+ arch: $arch
configuration-extensions: []
- description: A system called $MATCH_1 for architectures $MATCH_2
+ description: A system called $MATCH_1 for architectures $arch
kind: system
name: $MATCH_1
strata: