diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-10-17 09:38:25 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-20 14:40:29 +0100 |
commit | 544da7651db1f6a019f9c660f99eb012994b2a5a (patch) | |
tree | 1389f4e0d65e8e58479f252ce10fd8f89b026249 /documentation/contributor-guide | |
parent | 104899f3907fbcaf4011522513badab7d09d84dd (diff) | |
download | poky-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.rst | 34 |
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 | ||
282 | Validating Patches with Patchtest | ||
283 | ================================= | ||
284 | |||
285 | ``patchtest`` is available in ``openembedded-core`` as a tool for making sure | ||
286 | that your patches are well-formatted and contain important info for | ||
287 | maintenance purposes, such as ``Signed-off-by`` and ``Upstream-Status`` | ||
288 | tags. Once you have generated the patch files and run ``source | ||
289 | oe-init-build-env`` to initialize your workspace, you can run ``patchtest`` | ||
290 | like so:: | ||
291 | |||
292 | patchtest --patch <patch_name> | ||
293 | |||
294 | Alternatively, if you want ``patchtest`` to iterate over and test | ||
295 | multiple patches stored in a directory, you can use:: | ||
296 | |||
297 | patchtest --directory <directory_name> | ||
298 | |||
299 | By default, ``patchtest`` uses its own modules' file paths to determine what | ||
300 | repository and test suite to check patches against. If you wish to test | ||
301 | patches against a repository other than ``openembedded-core`` and/or use | ||
302 | a different set of tests, you can use the ``--repodir`` and ``--testdir`` | ||
303 | flags:: | ||
304 | |||
305 | patchtest --patch <patch_name> --repodir <path/to/repo> --testdir <path/to/testdir> | ||
306 | |||
307 | Finally, note that ``patchtest`` is designed to test patches in a standalone | ||
308 | way, so if your patches are meant to apply on top of changes made by | ||
309 | previous patches in a series, it is possible that ``patchtest`` will report | ||
310 | false failures regarding the "merge on head" test. | ||
311 | |||
312 | Using ``patchtest`` in this manner provides a final check for the overall | ||
313 | quality of your changes before they are submitted for review by the | ||
314 | maintainers. | ||
315 | |||
282 | Sending the Patches via Email | 316 | Sending the Patches via Email |
283 | ============================= | 317 | ============================= |
284 | 318 | ||