diff mbox series

[7/9] Avocado tests: improve documentation on tag filtering

Message ID 20220225210156.2032055-8-crosa@redhat.com
State New
Headers show
Series Avocado tests: filter out tests using TCG booting full blown distros | expand

Commit Message

Cleber Rosa Feb. 25, 2022, 9:01 p.m. UTC
It's possible to filter based on a combination of criteria.  This adds
examples to the documentation.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 docs/devel/testing.rst | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Thomas Huth Feb. 28, 2022, 12:14 p.m. UTC | #1
On 25/02/2022 22.01, Cleber Rosa wrote:
> It's possible to filter based on a combination of criteria.  This adds
> examples to the documentation.
> 
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>   docs/devel/testing.rst | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index 92d40cdd19..f5b6e07b5c 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
> @@ -936,6 +936,28 @@ in the current directory, tagged as "quick", run:
>   
>     avocado run -t quick .
>   
> +To run tests with a given value for a given tag, such as having the
> +``accel`` tag set to ``kvm``, run:
> +
> +.. code::
> +
> +  avocado run -t accel:kvm .
> +
> +Multiple mandatory conditions can also be given.  To run only tests
> +with ``arch`` set to ``x86_64`` and ``accell`` set to ``kvm``, run:

s/accell/accel/

> +
> +.. code::
> +
> +  avocado run -t arch:x86_64,accel:kvm .
> +
> +It's also possible to exclude tests that contain a given value for a

Just a matter of taste, I guess, but I'd prefer "It is" instead of "It's" in 
the documentation.

> +tag.  To list all tests that do *not* have ``arch`` set to ``x86_64``,
> +run:
> +
> +.. code::
> +
> +  avocado run -t arch:-x86_64 .
> +
>   The ``avocado_qemu.Test`` base test class
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

With at least "accell" fixed:
Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 92d40cdd19..f5b6e07b5c 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -936,6 +936,28 @@  in the current directory, tagged as "quick", run:
 
   avocado run -t quick .
 
+To run tests with a given value for a given tag, such as having the
+``accel`` tag set to ``kvm``, run:
+
+.. code::
+
+  avocado run -t accel:kvm .
+
+Multiple mandatory conditions can also be given.  To run only tests
+with ``arch`` set to ``x86_64`` and ``accell`` set to ``kvm``, run:
+
+.. code::
+
+  avocado run -t arch:x86_64,accel:kvm .
+
+It's also possible to exclude tests that contain a given value for a
+tag.  To list all tests that do *not* have ``arch`` set to ``x86_64``,
+run:
+
+.. code::
+
+  avocado run -t arch:-x86_64 .
+
 The ``avocado_qemu.Test`` base test class
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^