docs: Couple of typo/style fixes and minor improvements

Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 31a30380
......@@ -300,7 +300,8 @@ file. This is done by the `!include : $path` directive::
gentoo:
!include : gentoo.yaml
Due to YAML nature, it's __mandatory__ to put space between `!include` and `:`!
.. warning:: Due to YAML nature, it's __mandatory__ to put space between
`!include` and `:`!
The file location can be either absolute path or relative path to the YAML
file where the `!include` is called (even when it's nested).
......
......@@ -88,7 +88,7 @@ We have briefly discussed the making of Avocado plugins. We recommend
the `Stevedore documentation`_ and also a look at the
:mod:`avocado.plugins.base` module for the various plugin interface definitions.
Some plugins examples are available in the `Avocado source tree_`, under ``examples/plugins``.
Some plugins examples are available in the `Avocado source tree`_, under ``examples/plugins``.
Finally, exploring the real plugins shipped with Avocado in :mod:`avocado.plugins`
is the final "documentation" source.
......
......@@ -12,28 +12,28 @@ job id and it is also unique enough.
Let's see an example. First, running a simple job with two urls::
$ avocado run /bin/true /bin/false
JOB ID : 825b860b0c2f6ec48953c638432e3e323f8d7cad
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T16.14-825b860/job.log
TESTS : 2
(1/2) /bin/true: PASS (0.01 s)
(2/2) /bin/false: FAIL (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T16.14-825b860/html/results.html
TIME : 0.02 s
$ avocado run /bin/true /bin/false
JOB ID : 825b860b0c2f6ec48953c638432e3e323f8d7cad
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T16.14-825b860/job.log
TESTS : 2
(1/2) /bin/true: PASS (0.01 s)
(2/2) /bin/false: FAIL (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T16.14-825b860/html/results.html
TIME : 0.02 s
Now we can replay the job by running::
$ avocado run --replay 825b86
JOB ID : 55a0d10132c02b8cc87deb2b480bfd8abbd956c3
SRC JOB ID : 825b860b0c2f6ec48953c638432e3e323f8d7cad
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T16.18-55a0d10/job.log
TESTS : 2
(1/2) /bin/true: PASS (0.01 s)
(2/2) /bin/false: FAIL (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T16.18-55a0d10/html/results.html
TIME : 0.01 s
$ avocado run --replay 825b86
JOB ID : 55a0d10132c02b8cc87deb2b480bfd8abbd956c3
SRC JOB ID : 825b860b0c2f6ec48953c638432e3e323f8d7cad
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T16.18-55a0d10/job.log
TESTS : 2
(1/2) /bin/true: PASS (0.01 s)
(2/2) /bin/false: FAIL (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T16.18-55a0d10/html/results.html
TIME : 0.01 s
The replay feature will retrieve the original job urls, the multiplex
tree and the configuration. Let's see another example, now using
......@@ -98,17 +98,17 @@ multiplex file::
We can replay the job as is, using ``$ avocado run --replay bd6aa3b``,
or replay the job ignoring the multiplex file, as below::
$ avocado run --replay bd6aa3b --replay-ignore mux
Ignoring multiplex from source job with --replay-ignore.
JOB ID : d5a46186ee0fb4645e3f7758814003d76c980bf9
SRC JOB ID : bd6aa3b852d4290637b5e771b371537541043d1d
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T22.01-d5a4618/job.log
TESTS : 2
(1/2) /bin/true: PASS (0.01 s)
(2/2) /bin/false: FAIL (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T22.01-d5a4618/html/results.html
TIME : 0.02 s
$ avocado run --replay bd6aa3b --replay-ignore mux
Ignoring multiplex from source job with --replay-ignore.
JOB ID : d5a46186ee0fb4645e3f7758814003d76c980bf9
SRC JOB ID : bd6aa3b852d4290637b5e771b371537541043d1d
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T22.01-d5a4618/job.log
TESTS : 2
(1/2) /bin/true: PASS (0.01 s)
(2/2) /bin/false: FAIL (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T22.01-d5a4618/html/results.html
TIME : 0.02 s
Also, it is possible to replay only the variants that faced a given
result, using the option ``--replay-test-status``. Using the same job
......@@ -177,28 +177,28 @@ given job has a non-default path to record the logs, when the replay
time comes, we need to inform where the logs are. See the example
below::
$ avocado run /bin/true --job-results-dir /tmp/avocado_results/
JOB ID : f1b1c870ad892eac6064a5332f1bbe38cda0aaf3
JOB LOG : /tmp/avocado_results/job-2016-01-11T22.10-f1b1c87/job.log
TESTS : 1
(1/1) /bin/true: PASS (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : /tmp/avocado_results/job-2016-01-11T22.10-f1b1c87/html/results.html
TIME : 0.01 s
$ avocado run /bin/true --job-results-dir /tmp/avocado_results/
JOB ID : f1b1c870ad892eac6064a5332f1bbe38cda0aaf3
JOB LOG : /tmp/avocado_results/job-2016-01-11T22.10-f1b1c87/job.log
TESTS : 1
(1/1) /bin/true: PASS (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : /tmp/avocado_results/job-2016-01-11T22.10-f1b1c87/html/results.html
TIME : 0.01 s
Trying to replay the job, it fails::
$ avocado run --replay f1b1
can't find job results directory in '$HOME/avocado/job-results'
$ avocado run --replay f1b1
can't find job results directory in '$HOME/avocado/job-results'
In this case, we have to inform where the job results dir is located::
$ avocado run --replay f1b1 --replay-data-dir /tmp/avocado_results
JOB ID : 19c76abb29f29fe410a9a3f4f4b66387570edffa
SRC JOB ID : f1b1c870ad892eac6064a5332f1bbe38cda0aaf3
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T22.15-19c76ab/job.log
TESTS : 1
(1/1) /bin/true: PASS (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T22.15-19c76ab/html/results.html
TIME : 0.01 s
$ avocado run --replay f1b1 --replay-data-dir /tmp/avocado_results
JOB ID : 19c76abb29f29fe410a9a3f4f4b66387570edffa
SRC JOB ID : f1b1c870ad892eac6064a5332f1bbe38cda0aaf3
JOB LOG : $HOME/avocado/job-results/job-2016-01-11T22.15-19c76ab/job.log
TESTS : 1
(1/1) /bin/true: PASS (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
JOB HTML : $HOME/avocado/job-results/job-2016-01-11T22.15-19c76ab/html/results.html
TIME : 0.01 s
......@@ -61,7 +61,9 @@ Another type of results are those intended to be parsed by other
applications. Several standards exist in the test community, and Avocado can
in theory support pretty much every result standard out there.
Out of the box, Avocado supports a couple of machine readable results.
Out of the box, Avocado supports a couple of machine readable results. They
are always generated and stored in the results directory in `results.$type`
files, but you can ask for a different location too.
xunit
~~~~~
......@@ -83,8 +85,9 @@ output in the standard output of the runner, simply use::
</testcase>
<testcase classname="synctest" name="synctest.1" time="1.69329714775"/>
Note the dash `-` in the option `--xunit`, it means that the xunit result
should go to the standard output.
.. note:: The dash `-` in the option `--xunit`, it means that the xunit result
should go to the standard output.
json
~~~~
......@@ -96,11 +99,11 @@ plugin::
$ scripts/avocado --json - run "sleeptest failtest synctest"
{"tests": [{"test": "sleeptest.1", "url": "sleeptest", "status": "PASS", "time": 1.4282619953155518}, {"test": "failtest.1", "url": "failtest", "status": "FAIL", "time": 0.34017300605773926}, {"test": "synctest.1", "url": "synctest", "status": "PASS", "time": 2.109131097793579}], "errors": 0, "skip": 0, "time": 3.87756609916687, "debuglog": "$HOME/avocado/logs/run-2014-06-11-01.35.15/debug.log", "pass": 2, "failures": 1, "total": 3}
Note the dash `-` in the option `--json`, it means that the xunit result
should go to the standard output.
.. note:: The dash `-` in the option `--json`, it means that the xunit result
should go to the standard output.
Bear in mind that there's no documented standard for the Avocado JSON result
format. This means that it will probably grow organically to acommodate
format. This means that it will probably grow organically to accommodate
newer Avocado features. A reasonable effort will be made to not break
backwards compatibility with applications that parse the current form of its
JSON result.
......@@ -126,6 +129,8 @@ Avocado and check its results::
elif
...
more details regarding exit codes in `Exit Codes`_ section.
Multiple results at once
------------------------
......
......@@ -41,7 +41,7 @@ Make sure you have:
1) Avocado packages installed. You can see more info on how to do that in
the :ref:`get-started` section.
2) The remote machine IP address or fully qualified hostname and the SSH port number.
3) All pre-requesites for your test to run installed inside the remote machine
3) All pre-requisites for your test to run installed inside the remote machine
(gcc, make and others if you want to compile a 3rd party test suite written
in C, for example).
......
......@@ -60,7 +60,7 @@ Note that the test class provides you with a number of convenience attributes:
Saving test generated (custom) data
===================================
Each test instance provides a so called ``whiteboard``. It that can be accessed
Each test instance provides a so called ``whiteboard``. It can be accessed
through ``self.whiteboard``. This whiteboard is simply a string that will be
automatically saved to test results (as long as the output format supports it).
If you choose to save binary data to the whiteboard, it's your responsibility to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册