summaryrefslogtreecommitdiffstats
path: root/documentation/contributor-guide
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2023-10-17 09:38:25 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-20 14:40:29 +0100
commit544da7651db1f6a019f9c660f99eb012994b2a5a (patch)
tree1389f4e0d65e8e58479f252ce10fd8f89b026249 /documentation/contributor-guide
parent104899f3907fbcaf4011522513badab7d09d84dd (diff)
downloadpoky-544da7651db1f6a019f9c660f99eb012994b2a5a.tar.gz
contributor-guide: add patchtest section
(From yocto-docs rev: 236cd04d62bdf653aae9b41d32d9f87848a34339) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/contributor-guide')
-rw-r--r--documentation/contributor-guide/submit-changes.rst34
1 files changed, 34 insertions, 0 deletions
diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
index cda2d12d25..8a300c3664 100644
--- a/documentation/contributor-guide/submit-changes.rst
+++ b/documentation/contributor-guide/submit-changes.rst
@@ -279,6 +279,40 @@ Here is the general procedure on how to create patches to be sent through email:
279 If necessary, rework your commits as described in 279 If necessary, rework your commits as described in
280 ":ref:`contributor-guide/submit-changes:taking patch review into account`". 280 ":ref:`contributor-guide/submit-changes:taking patch review into account`".
281 281
282Validating Patches with Patchtest
283=================================
284
285``patchtest`` is available in ``openembedded-core`` as a tool for making sure
286that your patches are well-formatted and contain important info for
287maintenance purposes, such as ``Signed-off-by`` and ``Upstream-Status``
288tags. Once you have generated the patch files and run ``source
289oe-init-build-env`` to initialize your workspace, you can run ``patchtest``
290like so::
291
292 patchtest --patch <patch_name>
293
294Alternatively, if you want ``patchtest`` to iterate over and test
295multiple patches stored in a directory, you can use::
296
297 patchtest --directory <directory_name>
298
299By default, ``patchtest`` uses its own modules' file paths to determine what
300repository and test suite to check patches against. If you wish to test
301patches against a repository other than ``openembedded-core`` and/or use
302a different set of tests, you can use the ``--repodir`` and ``--testdir``
303flags::
304
305 patchtest --patch <patch_name> --repodir <path/to/repo> --testdir <path/to/testdir>
306
307Finally, note that ``patchtest`` is designed to test patches in a standalone
308way, so if your patches are meant to apply on top of changes made by
309previous patches in a series, it is possible that ``patchtest`` will report
310false failures regarding the "merge on head" test.
311
312Using ``patchtest`` in this manner provides a final check for the overall
313quality of your changes before they are submitted for review by the
314maintainers.
315
282Sending the Patches via Email 316Sending the Patches via Email
283============================= 317=============================
284 318