summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-09-24 20:54:18 +0000
committerRichard Maw <richard.maw@gmail.com>2014-10-01 09:30:15 +0000
commit3c27e08f558bd55b9a39ee8a0a43a08881126f1c (patch)
treec8e89623e5de6f49d2b982a412cf1bf6df7d3274 /yarns
parent54c81674db48d5c9eb151199ef1bc434fd1bd4a6 (diff)
downloadmorph-3c27e08f558bd55b9a39ee8a0a43a08881126f1c.tar.gz
Move architecture existing test to yarn
Diffstat (limited to 'yarns')
-rw-r--r--yarns/architecture.yarn12
-rw-r--r--yarns/implementations.yarn19
2 files changed, 31 insertions, 0 deletions
diff --git a/yarns/architecture.yarn b/yarns/architecture.yarn
index d4de308e..07274ec3 100644
--- a/yarns/architecture.yarn
+++ b/yarns/architecture.yarn
@@ -22,3 +22,15 @@ Morph Cross-Bootstrap Tests
WHEN the user checks out the system branch called master
THEN the user cross-bootstraps the system base-system-testarch.morph in branch master of repo test:morphs to the arch testarch
FINALLY the git server is shut down
+
+Architecture validation Tests
+=============================
+
+ SCENARIO building a system with no architecture
+ GIVEN a workspace
+ AND a git server
+ AND a system called base-system-noarch.morph with no 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.morph in branch master
+ THEN morph failed
+ FINALLY the git server is shut down
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 9cf497fc..86c3a9c4 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -363,6 +363,25 @@ have a morphology using the test architecture.
run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
run_in "$DATADIR/gits/morphs" git commit -m "Added $MATCH_1 and strata morphologies."
+You need an architecture to build a system, we don't default to the host architecture.
+
+ IMPLEMENTS GIVEN a system called (\S+) with no architecture in the git server
+ name="$(basename "${MATCH_1%.*}")"
+ cat << EOF > "$DATADIR/gits/morphs/$MATCH_1"
+ configuration-extensions: []
+ description: A system called $name for test architecture
+ kind: system
+ name: $name
+ strata:
+ - name: build-essential
+ morph: strata/build-essential.morph
+ - name: core
+ morph: strata/core.morph
+ EOF
+
+ 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
----------------------------------------------------