summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2013-11-05 14:36:21 (GMT)
committerNeil Williams <codehelp@debian.org>2013-11-05 14:36:21 (GMT)
commitd9404b5f1415c03070d96d765980c9b0ea97a534 (patch)
tree50435f51bfe12d068f2d1539d59ea0fb63b85f80
parent5afb2d4ab29b541ce7d8ecf75119a03e9bbc82cb (diff)
downloadlava-dispatcher-doc.tar.gz
lava-dispatcher-doc.tar.xz
Expand the parameters example.doc
(Request from LNG) Change-Id: Ifeb71d5bcaa45ca1ec9aed51b9eea69eea57236d
-rw-r--r--doc/lava_test_shell.rst40
1 files changed, 34 insertions, 6 deletions
diff --git a/doc/lava_test_shell.rst b/doc/lava_test_shell.rst
index 1b010a2..3c97a5b 100644
--- a/doc/lava_test_shell.rst
+++ b/doc/lava_test_shell.rst
@@ -206,18 +206,46 @@ context when the results are submitted to the LAVA dashboard.
default parameters
==================
-The "params" section is optional. If your test definition file include
-Shell variables in "install" and "run" sections like above, you can
-use "params" section to set the default parameters for those variables.
+The "params" section is optional. If your test definition file includes
+shell variables in "install" and "run" sections, you can use a ``params``
+section to set the default parameters for those variables.
+
The format should be like this::
params:
- "VARIABLE_NAME_1=value_1"
- "VARIABLE_NAME_2=value_2"
-You had better set default values for all variables in the test
-definition file. Because if lava-dispatcher didn't get the parameters
-from json file, it will use these those default parameters in the test.
+ run:
+ steps:
+ - echo $VARIABLE_NAME_1
+
+
+The JSON would override these defaults using the syntax::
+
+ {
+ "command": "lava_test_shell",
+ "parameters": {
+ "testdef_repos": [
+ {
+ "git-repo": "http://staging.git.linaro.org/git-ro/people/neil.williams/temp-functional-tests.git",
+ "testdef": "params.yaml",
+ "parameters": {"VARIABLE_NAME_1": "eth2"}
+ }
+ ],
+ "timeout": 900
+ }
+ }
+
+Always set default values for all variables in the test definition file to
+allow for missing values in the JSON file. In the example above, ``$VARIABLE_NAME_2``
+is not defined in the JSON snippet, so the default would be used.
+
+Examples:
+
+http://staging.git.linaro.org/people/neil.williams/temp-functional-tests.git/blob/HEAD:/kvm-parameters.json
+
+http://staging.git.linaro.org/people/neil.williams/temp-functional-tests.git/blob/HEAD:/params.yaml
Install Steps
=============