aboutsummaryrefslogtreecommitdiff
path: root/docs/devel/testing.rst
diff options
context:
space:
mode:
authorWillian Rampazzo <willianr@redhat.com>2021-09-23 13:11:41 -0300
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2021-09-27 19:06:47 +0200
commit94c714620bede2e03b5a03421c8e8f654817d65d (patch)
tree8088f2dc5260eca5bd9f52646a8c2811aebfa8eb /docs/devel/testing.rst
parent6676f18fa5e09c437e8aa160befa096415e09aae (diff)
downloadqemu-94c714620bede2e03b5a03421c8e8f654817d65d.zip
qemu-94c714620bede2e03b5a03421c8e8f654817d65d.tar.gz
qemu-94c714620bede2e03b5a03421c8e8f654817d65d.tar.bz2
tests/Makefile: add AVOCADO_TESTS option to make check-acceptance
Add the possibility of running all the tests from a single file, or multiple files, running a single test within a file or multiple tests within multiple files using `make check-acceptance` and the AVOCADO_TESTS environment variable. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210923161141.232208-4-willianr@redhat.com>
Diffstat (limited to 'docs/devel/testing.rst')
-rw-r--r--docs/devel/testing.rst27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index c9f6b97..64c9744 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -746,6 +746,33 @@ tags, see:
https://avocado-framework.readthedocs.io/en/latest/guides/user/chapters/tags.html
+To run a single test file, a couple of them, or a test within a file
+using the ``make check-acceptance`` command, set the ``AVOCADO_TESTS``
+environment variable with the test files or test names. To run all
+tests from a single file, use:
+
+ .. code::
+
+ make check-acceptance AVOCADO_TESTS=$FILEPATH
+
+The same is valid to run tests from multiple test files:
+
+ .. code::
+
+ make check-acceptance AVOCADO_TESTS='$FILEPATH1 $FILEPATH2'
+
+To run a single test within a file, use:
+
+ .. code::
+
+ make check-acceptance AVOCADO_TESTS=$FILEPATH:$TESTCLASS.$TESTNAME
+
+The same is valid to run single tests from multiple test files:
+
+ .. code::
+
+ make check-acceptance AVOCADO_TESTS='$FILEPATH1:$TESTCLASS1.$TESTNAME1 $FILEPATH2:$TESTCLASS2.$TESTNAME2'
+
The scripts installed inside the virtual environment may be used
without an "activation". For instance, the Avocado test runner
may be invoked by running: