diff --git a/docs/how-to/index.rst b/docs/how-to/index.rst index d8a8c49fdf..f1175fca8d 100644 --- a/docs/how-to/index.rst +++ b/docs/how-to/index.rst @@ -13,4 +13,5 @@ These how-to guides cover key operations and processes in Checkbox. side-loading agent-service freeze-checkbox-version - launcher/* \ No newline at end of file + launcher/* + using-match diff --git a/docs/how-to/using-match.rst b/docs/how-to/using-match.rst new file mode 100644 index 0000000000..aee053cc60 --- /dev/null +++ b/docs/how-to/using-match.rst @@ -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.*