summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-11-01 13:24:51 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-11-01 13:24:51 +0000
commit8ebf8ea90ecbbb2ef743dccfbfb73e2904cad1f5 (patch)
tree56a5de883941fd7bacf6c485225bedcbad5450f9 /docs
parent8002fa2bf6d3eddc0b73f8a0b64ac6b3ad1defab (diff)
parente301e65c97142c4d2a2adf35f5a4fa73d65d8a4f (diff)
Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging
Python queue, 2018-10-30 * Makefile rule for running acceptance tests (make check-acceptance) (Cleber Rosa) * Make iotests compatible with Python 3 (Max Reitz) * device-crash-test whitelist update (Thomas Huth) * Misc cleanups (Cleber Rosa) # gpg: Signature made Wed 31 Oct 2018 00:28:39 GMT # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/python-next-pull-request: scripts/qemu.py: use a more consistent docstring style scripts/decodetree.py: fix reference to attributes Travis support for the acceptance tests Acceptance tests: add make rule for running them Bootstrap Python venv for tests iotests: Unify log outputs between Python 2 and 3 iotests: Modify imports for Python 3 iotests: 'new' module replacement in 169 iotests: Explicitly bequeath FDs in Python iotests: Different iterator behavior in Python 3 iotests: Use // for Python integer division iotests: Use Python byte strings where appropriate iotests: Flush in iotests.py's QemuIoInteractive iotests: Make nbd-fault-injector flush scripts/device-crash-test: Remove devices that are not user_creatable anymore Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/testing.rst43
1 files changed, 38 insertions, 5 deletions
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index a227754f86..18e2c0868a 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -545,10 +545,39 @@ Tests based on ``avocado_qemu.Test`` can easily:
- http://avocado-framework.readthedocs.io/en/latest/api/test/avocado.html#avocado.Test
- http://avocado-framework.readthedocs.io/en/latest/api/utils/avocado.utils.html
-Installation
-------------
+Running tests
+-------------
+
+You can run the acceptance tests simply by executing:
+
+.. code::
+
+ make check-acceptance
+
+This involves the automatic creation of Python virtual environment
+within the build tree (at ``tests/venv``) which will have all the
+right dependencies, and will save tests results also within the
+build tree (at ``tests/results``).
-To install Avocado and its dependencies, run:
+Note: the build environment must be using a Python 3 stack, and have
+the ``venv`` and ``pip`` packages installed. If necessary, make sure
+``configure`` is called with ``--python=`` and that those modules are
+available. On Debian and Ubuntu based systems, depending on the
+specific version, they may be on packages named ``python3-venv`` and
+``python3-pip``.
+
+The scripts installed inside the virtual environment may be used
+without an "activation". For instance, the Avocado test runner
+may be invoked by running:
+
+ .. code::
+
+ tests/venv/bin/avocado run $OPTION1 $OPTION2 tests/acceptance/
+
+Manual Installation
+-------------------
+
+To manually install Avocado and its dependencies, run:
.. code::
@@ -689,11 +718,15 @@ The exact QEMU binary to be used on QEMUMachine.
Uninstalling Avocado
--------------------
-If you've followed the installation instructions above, you can easily
-uninstall Avocado. Start by listing the packages you have installed::
+If you've followed the manual installation instructions above, you can
+easily uninstall Avocado. Start by listing the packages you have
+installed::
pip list --user
And remove any package you want with::
pip uninstall <package_name>
+
+If you've used ``make check-acceptance``, the Python virtual environment where
+Avocado is installed will be cleaned up as part of ``make check-clean``.