From fcd52877d122c31a3f3f2e3803c803e955e49b9a Mon Sep 17 00:00:00 2001 From: Hook25 Date: Fri, 4 Oct 2024 15:01:02 +0200 Subject: [PATCH 1/5] Howto use match --- docs/how-to/using-match.rst | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/how-to/using-match.rst diff --git a/docs/how-to/using-match.rst b/docs/how-to/using-match.rst new file mode 100644 index 0000000000..53a65f411d --- /dev/null +++ b/docs/how-to/using-match.rst @@ -0,0 +1,50 @@ +Using ``match`` +^^^^^^^^^^^^^^^ + +When a subset of test plan run fails, it can be expensive to re-run it all. +To aid with this ``match`` was introduced. It allows you to re-run only a +subset of a testplan. + +To only re-run the ``wireless`` portion of the ``sru`` testplan, use the +following launcher: + +.. code-block:: none + + [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:: none + + [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:: none + + [test plan] + unit = com.canonical.certification::sru + forced = yes + + [test selection] + exclude=.*wireless.*bg_np.* + match=.*wireless.* + +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`` From 2d317a30a1d52fb17e193d9f2b9e61b29789cb85 Mon Sep 17 00:00:00 2001 From: Hook25 Date: Fri, 4 Oct 2024 15:29:39 +0200 Subject: [PATCH 2/5] Include it in the howto in the index Minor: emph lines with changes --- docs/how-to/index.rst | 3 ++- docs/how-to/using-match.rst | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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 index 53a65f411d..ce4330d36d 100644 --- a/docs/how-to/using-match.rst +++ b/docs/how-to/using-match.rst @@ -8,7 +8,7 @@ subset of a testplan. To only re-run the ``wireless`` portion of the ``sru`` testplan, use the following launcher: -.. code-block:: none +.. code-block:: ini [test plan] unit = com.canonical.certification::sru @@ -19,7 +19,8 @@ following launcher: To only re-run the wifi ``bg_np`` and ``ac_np`` tests for ``wlan0``: -.. code-block:: none +.. code-block:: ini + :emphasize-lines: 7-8 [test plan] unit = com.canonical.certification::sru @@ -32,7 +33,8 @@ To only re-run the wifi ``bg_np`` and ``ac_np`` tests for ``wlan0``: To re-run all wireless tests but ``bg_np``: -.. code-block:: none +.. code-block:: ini + :emphasize-lines: 6-7 [test plan] unit = com.canonical.certification::sru From d27636ae3becd472ca08dfdd4a92dd8c2d738b1a Mon Sep 17 00:00:00 2001 From: Hook25 Date: Fri, 4 Oct 2024 15:50:08 +0200 Subject: [PATCH 3/5] Misspelled word --- docs/how-to/using-match.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how-to/using-match.rst b/docs/how-to/using-match.rst index ce4330d36d..00ae60c222 100644 --- a/docs/how-to/using-match.rst +++ b/docs/how-to/using-match.rst @@ -17,7 +17,7 @@ following launcher: [test selection] match=.*wireless.* -To only re-run the wifi ``bg_np`` and ``ac_np`` tests for ``wlan0``: +To only re-run the WiFi ``bg_np`` and ``ac_np`` tests for ``wlan0``: .. code-block:: ini :emphasize-lines: 7-8 From 9db5c9a85ed82261f7ccaf71db344b4e3612d02a Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Fri, 4 Oct 2024 17:31:52 +0200 Subject: [PATCH 4/5] Typos and suggestions Co-authored-by: Pierre Equoy --- docs/how-to/using-match.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/how-to/using-match.rst b/docs/how-to/using-match.rst index 00ae60c222..df101e7044 100644 --- a/docs/how-to/using-match.rst +++ b/docs/how-to/using-match.rst @@ -1,11 +1,11 @@ Using ``match`` ^^^^^^^^^^^^^^^ -When a subset of test plan run fails, it can be expensive to re-run it all. -To aid with this ``match`` was introduced. It allows you to re-run only a -subset of a testplan. +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. -To only re-run the ``wireless`` portion of the ``sru`` testplan, use the +To only re-run the ``wireless`` portion of the ``sru`` test plan, use the following launcher: .. code-block:: ini @@ -15,7 +15,7 @@ following launcher: forced = yes [test selection] - match=.*wireless.* + match = .*wireless.* To only re-run the WiFi ``bg_np`` and ``ac_np`` tests for ``wlan0``: @@ -27,7 +27,7 @@ To only re-run the WiFi ``bg_np`` and ``ac_np`` tests for ``wlan0``: forced = yes [test selection] - match= + match = com.canonical.certification::wireless/wireless_connection_open_ac_np_wlan0 com.canonical.certification::wireless/wireless_connection_open_bg_np_wlan0 @@ -41,8 +41,8 @@ To re-run all wireless tests but ``bg_np``: forced = yes [test selection] - exclude=.*wireless.*bg_np.* - match=.*wireless.* + exclude = .*wireless.*bg_np.* + match = .*wireless.* Key features of ``match``: From f5ea9e5ca2c643f933f50c6bb96e922c8d2873d5 Mon Sep 17 00:00:00 2001 From: Hook25 Date: Fri, 4 Oct 2024 17:33:04 +0200 Subject: [PATCH 5/5] Re-ordered sections --- docs/how-to/using-match.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/how-to/using-match.rst b/docs/how-to/using-match.rst index df101e7044..aee053cc60 100644 --- a/docs/how-to/using-match.rst +++ b/docs/how-to/using-match.rst @@ -2,8 +2,15 @@ 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. +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: @@ -43,10 +50,3 @@ To re-run all wireless tests but ``bg_np``: [test selection] exclude = .*wireless.*bg_np.* match = .*wireless.* - -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``