summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-12 17:38:36 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-12 17:38:36 +0000
commite694a557d72d993b04b6a5cb882cfa305c7838fa (patch)
tree0cb9cd7a4a6d46b2dc9c208a50707f3a906cac0b /README
parente83c27cd1fcc8c5e6c62fe82df6107b55a3f2af0 (diff)
downloadmorph-e694a557d72d993b04b6a5cb882cfa305c7838fa.tar.gz
document test stories in README
Diffstat (limited to 'README')
-rw-r--r--README24
1 files changed, 24 insertions, 0 deletions
diff --git a/README b/README
index 8842625d..d427ebb4 100644
--- a/README
+++ b/README
@@ -184,6 +184,30 @@ Example system:
Note that unknown keys in morphologies are silently ignored.
+Test stories for system images
+------------------------------
+
+The `morph test` subcommand will run a series of automated tests against
+an x86 system image under KVM using the serial console. Each test is
+stored in a separate file, and consist of a sequence of send/expect pairs.
+Example:
+
+ story = [
+ ('', 'login: '),
+ ('root\r', '^~ # '),
+ ]
+
+Each file is a Python module, with a variable called `story`,
+which is a list of tuples of two strings, or two strings and a
+number. The first string is sent to the serial console. The second
+string specifies a regular expression that is matched against the
+output from the serial console. The optional number is a timeout,
+in seconds, for how long to wait for a match. The default is ten
+seconds, and can be set with the `--test-timeout` option.
+
+The test succeeds if all tuples are sent/matched successfully.
+
+
Build environment
-----------------