summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-11-23 13:07:07 (GMT)
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-11-25 17:04:57 (GMT)
commitdf7437d9e97c12cf5e88c37cfed7748c3ff6f12e (patch)
tree33f6387947655900b1349de9b4b24cf233a58415
parent3088878d985f0c4ef2091a9e5bf79dde38cd42db (diff)
downloadmorph-df7437d9e97c12cf5e88c37cfed7748c3ff6f12e.tar.gz
Rename yarn file to a more appropriate name
Also, move the print-architecture contents to noncore-plugins.yarn. Change-Id: I6a78c8d49c7ad70144845f6ce313fa6d44fa8fd2
-rw-r--r--yarns/noncore-plugins.yarn (renamed from yarns/branches-workspaces.yarn)48
-rw-r--r--yarns/print-architecture.yarn43
2 files changed, 46 insertions, 45 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/noncore-plugins.yarn
index c15f414..1cf4fd9 100644
--- a/yarns/branches-workspaces.yarn
+++ b/yarns/noncore-plugins.yarn
@@ -1,5 +1,5 @@
-Morph black box tests for system branches and workspaces
-========================================================
+Non-Core Morph Plugins Tests
+============================
Anchoring commits for reproducibility
-------------------------------------
@@ -208,3 +208,47 @@ artifact in a system. This name includes the cache key of the artifact.
WHEN the user lists the artifacts which make up the system systems/test-system.morph at ref HEAD in repository test:definitions
THEN morph succeeded
+
+Printing the architecture
+-------------------------
+
+This is short and simple. Morph can print the name for the current
+architecture, and we verify not that it is correct, but that exactly
+one line is printed to the standard output. The reason we're not
+checking it's correct is because that would require the test code
+to duplicate the architecture name list that is in the code already,
+and that wouldn't help with tests. However, verifying there's exactly
+one line in stdout (and nothing in stderr) means the plugin does at
+least something sensible.
+
+Oh, and the one line should contain no spaces, either.
+
+ SCENARIO morph print-architecture prints out a single word
+ WHEN morph print-architecture is run
+ THEN stdout contains a single line
+ AND stdout contains no spaces
+ AND stderr is empty
+
+ IMPLEMENTS WHEN morph print-architecture is run
+ set +x
+ run_morph print-architecture > "$DATADIR/stdout" 2> "$DATADIR/stderr"
+
+ IMPLEMENTS THEN stdout contains a single line
+ n=$(wc -l < "$DATADIR/stdout")
+ if [ "$n" != 1 ]
+ then
+ die "stdout contains $n lines, not 1"
+ fi
+
+ IMPLEMENTS THEN stdout contains no spaces
+ n=$(tr < "$DATADIR/stdout" -cd ' ' | wc -c)
+ if [ "$n" != 0 ]
+ then
+ die "stdout contains spaces"
+ fi
+
+ IMPLEMENTS THEN stderr is empty
+ if [ -s "$DATADIR/stderr" ]
+ then
+ die "stderr is not empty"
+ fi
diff --git a/yarns/print-architecture.yarn b/yarns/print-architecture.yarn
deleted file mode 100644
index c249614..0000000
--- a/yarns/print-architecture.yarn
+++ /dev/null
@@ -1,43 +0,0 @@
-"morph print-architecture" tests
-================================
-
-This is short and simple. Morph can print the name for the current
-architecture, and we verify not that it is correct, but that exactly
-one line is printed to the standard output. The reason we're not
-checking it's correct is because that would require the test code
-to duplicate the architecture name list that is in the code already,
-and that wouldn't help with tests. However, verifying there's exactly
-one line in stdout (and nothing in stderr) means the plugin does at
-least something sensible.
-
-Oh, and the one line should contain no spaces, either.
-
- SCENARIO morph print-architecture prints out a single word
- WHEN morph print-architecture is run
- THEN stdout contains a single line
- AND stdout contains no spaces
- AND stderr is empty
-
- IMPLEMENTS WHEN morph print-architecture is run
- set +x
- run_morph print-architecture > "$DATADIR/stdout" 2> "$DATADIR/stderr"
-
- IMPLEMENTS THEN stdout contains a single line
- n=$(wc -l < "$DATADIR/stdout")
- if [ "$n" != 1 ]
- then
- die "stdout contains $n lines, not 1"
- fi
-
- IMPLEMENTS THEN stdout contains no spaces
- n=$(tr < "$DATADIR/stdout" -cd ' ' | wc -c)
- if [ "$n" != 0 ]
- then
- die "stdout contains spaces"
- fi
-
- IMPLEMENTS THEN stderr is empty
- if [ -s "$DATADIR/stderr" ]
- then
- die "stderr is not empty"
- fi