From 544da7651db1f6a019f9c660f99eb012994b2a5a Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Tue, 17 Oct 2023 09:38:25 -0400 Subject: contributor-guide: add patchtest section (From yocto-docs rev: 236cd04d62bdf653aae9b41d32d9f87848a34339) Signed-off-by: Trevor Gamblin Reviewed-by: Michael Opdenacker Signed-off-by: Richard Purdie --- documentation/contributor-guide/submit-changes.rst | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'documentation/contributor-guide') 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: If necessary, rework your commits as described in ":ref:`contributor-guide/submit-changes:taking patch review into account`". +Validating Patches with Patchtest +================================= + +``patchtest`` is available in ``openembedded-core`` as a tool for making sure +that your patches are well-formatted and contain important info for +maintenance purposes, such as ``Signed-off-by`` and ``Upstream-Status`` +tags. Once you have generated the patch files and run ``source +oe-init-build-env`` to initialize your workspace, you can run ``patchtest`` +like so:: + + patchtest --patch + +Alternatively, if you want ``patchtest`` to iterate over and test +multiple patches stored in a directory, you can use:: + + patchtest --directory + +By default, ``patchtest`` uses its own modules' file paths to determine what +repository and test suite to check patches against. If you wish to test +patches against a repository other than ``openembedded-core`` and/or use +a different set of tests, you can use the ``--repodir`` and ``--testdir`` +flags:: + + patchtest --patch --repodir --testdir + +Finally, note that ``patchtest`` is designed to test patches in a standalone +way, so if your patches are meant to apply on top of changes made by +previous patches in a series, it is possible that ``patchtest`` will report +false failures regarding the "merge on head" test. + +Using ``patchtest`` in this manner provides a final check for the overall +quality of your changes before they are submitted for review by the +maintainers. + Sending the Patches via Email ============================= -- cgit v1.2.3-54-g00ecf