summaryrefslogtreecommitdiff
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
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.
-rw-r--r--yarns/architecture.yarn2
-rw-r--r--yarns/building.yarn4
-rw-r--r--yarns/implementations.yarn22
3 files changed, 18 insertions, 10 deletions
diff --git a/yarns/architecture.yarn b/yarns/architecture.yarn
index 038492cd..521575a3 100644
--- a/yarns/architecture.yarn
+++ b/yarns/architecture.yarn
@@ -4,7 +4,7 @@ Morph Cross-Building Tests
SCENARIO building a system for a different architecture
GIVEN a workspace
AND a git server
- AND a system called base-system-testarch for architecture testarch in the git server
+ AND a system called base-system-testarch for the test architecture in the git server
WHEN the user checks out the system branch called master
AND the user attempts to build the system base-system-testarch in branch master
THEN morph failed
diff --git a/yarns/building.yarn b/yarns/building.yarn
index b78c69cd..6dad426e 100644
--- a/yarns/building.yarn
+++ b/yarns/building.yarn
@@ -5,7 +5,7 @@ Morph Building Tests
GIVEN a workspace
AND a git server
WHEN the user checks out the system branch called master
- AND the user creates an uncommitted system morphology called base-system-testarch for architecture testarch in system branch master
- AND the user attempts to build the system base-system-testarch in branch master
+ AND the user creates an uncommitted system morphology called base-system for our architecture in system branch master
+ AND the user attempts to build the system base-system in branch master
THEN morph failed
AND the build error message includes the string "Did you forget to commit it?"
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: