diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 443: update lava_test_shell docs for new YAML format

Message ID 20121112034410.8116.89107.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Andy Doan Nov. 12, 2012, 3:44 a.m. UTC
------------------------------------------------------------
revno: 443
committer: Andy Doan <andy.doan@linaro.org>
branch nick: lava-dispatcher
timestamp: Fri 2012-11-09 10:36:56 -0600
message:
  update lava_test_shell docs for new YAML format
modified:
  doc/lava_test_shell.rst


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'doc/lava_test_shell.rst'
--- doc/lava_test_shell.rst	2012-10-10 19:29:04 +0000
+++ doc/lava_test_shell.rst	2012-11-09 16:36:56 +0000
@@ -10,15 +10,16 @@ 
 
 ::
 
-  {
-      "format": "Lava-Test Test Definition 1.0",
-      "test_id": "pass_fail"
-      "run": {
-          "steps": ["echo test-1: pass", "echo test-2: fail"]
-      "parse": {
-          "pattern": "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))"
-      }
-  }
+  metadata:
+      format: Lava-Test Test Definition 1.0
+      name: passfail
+
+  run:
+      steps:
+          - echo "test-1: pass"
+          - echo "test-2: fail"
+
+      pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))"
 
 The main thing to note is that the parse pattern requires regex expressions
 like \\s to be escaped, so it must be \\\\s
@@ -29,9 +30,10 @@ 
 If your test requires some packages to be installed before its run it can
 express that in the ``install`` section with::
 
-  "install": {
-    "deps": ["linux-libc-dev", "build-essential"]
-  },
+  install:
+      deps:
+          - linux-libc-dev
+          - build-essential
 
 Adding Git/BZR Repositories
 ===========================
@@ -39,13 +41,16 @@ 
 If your test needs code from a shared repository, the action can clone this
 data on your behalf with::
 
-  "install": {
-      "bzr-repos": ["lp:lava-test"],
-      "git-repos": ["git://git.linaro.org/people/davelong/lt_ti_lava.git"]
-  },
-  "run": {
-      "steps": ["cd lt_ti_lava", "echo now in the git cloned directory"]
-  }
+  install:
+      bzr-repos:
+          - lp:lava-test
+      git-repos:
+          - git://git.linaro.org/people/davelong/lt_ti_lava.git
+
+  run:
+      steps:
+          - cd lt_ti_lava
+          - echo "now in the git cloned directory"
 
 This repository information will also be added to resulting bundle's software
 context when the results are submitted to the LAVA dashboard.
@@ -57,10 +62,13 @@ 
 work if needed. For example if you needed to build some code from a git repo
 you could do::
 
-  "install": {
-      "git-repos": ["git://git.linaro.org/people/davelong/lt_ti_lava.git"],
-      "steps": ["cd lt_ti_lava", "make"]
-  },
+  install:
+      git-repos:
+          - git://git.linaro.org/people/davelong/lt_ti_lava.git
+
+      steps:
+          - cd lt_ti_lava
+          - make
 
 **NOTE:** The repo steps are done in the dispatcher itself. The install steps
 are run directly on the target.
@@ -72,10 +80,8 @@ 
 in the required pass/fail/skip/unknown format required by LAVA. The parse
 section has a fixup mechanism that can help::
 
-  "parse": {
-    "pattern": "(?P<test_case_id>.*-*)\\s+:\\s+(?P<result>(PASS|FAIL))",
-    "fixupdict": {
-        "PASS": "pass",
-        "FAIL": "fail"
-    }
-  }
+  parse:
+      pattern: "(?P<test_case_id>.*-*)\\s+:\\s+(?P<result>(PASS|FAIL))"
+      fixupdict:
+          PASS: pass
+          FAIL: fail