Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Howto use match (infra) #1532

Merged
merged 5 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.*