Skip to content

Commit

Permalink
Howto use match (infra) (#1532)
Browse files Browse the repository at this point in the history
* Howto use match

* Include it in the howto in the index

Minor: emph lines with changes

* Misspelled word

* Typos and suggestions

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>

* Re-ordered sections

---------

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
  • Loading branch information
Hook25 and pieqq authored Oct 7, 2024
1 parent cd772da commit 017d7ff
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ These how-to guides cover key operations and processes in Checkbox.
side-loading
agent-service
freeze-checkbox-version
launcher/*
launcher/*
using-match
52 changes: 52 additions & 0 deletions docs/how-to/using-match.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Using ``match``
^^^^^^^^^^^^^^^

When a subset of a test plan run fails, it can be expensive to re-run it all.
To help with this, the ``match`` keyword was introduced. It allows you to
re-run only a subset of a test plan.

Key features of ``match``:

* All tests in the bootstrap section will always be included
* Test Selection screen is still shown and functional, but only matching tests are shown
* Matched tests pull their dependencies automatically
* ``exclude`` has the priority over ``match``

To only re-run the ``wireless`` portion of the ``sru`` test plan, use the
following launcher:

.. code-block:: ini
[test plan]
unit = com.canonical.certification::sru
forced = yes
[test selection]
match = .*wireless.*
To only re-run the WiFi ``bg_np`` and ``ac_np`` tests for ``wlan0``:

.. code-block:: ini
:emphasize-lines: 7-8
[test plan]
unit = com.canonical.certification::sru
forced = yes
[test selection]
match =
com.canonical.certification::wireless/wireless_connection_open_ac_np_wlan0
com.canonical.certification::wireless/wireless_connection_open_bg_np_wlan0
To re-run all wireless tests but ``bg_np``:

.. code-block:: ini
:emphasize-lines: 6-7
[test plan]
unit = com.canonical.certification::sru
forced = yes
[test selection]
exclude = .*wireless.*bg_np.*
match = .*wireless.*

0 comments on commit 017d7ff

Please sign in to comment.