contributor-guide: add patchtest section
PATCH v2 1/1 contributor-guide: add patchtest section
---
v2 moves the patchtest section to before "Sending Patches via Email", cleans up some confusing instructions, and improves highlighting to be more consistent with the rest of the guide.
.../contributor-guide/submit-changes.rst | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)
documentation/contributor-guide/submit-changes.rst +34 -0
@@ -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 <patch_name> + +Alternatively, if you want ``patchtest`` to iterate over and test +multiple patches stored in a directory, you can use:: + + patchtest --directory <directory_name> + +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 <patch_name> --repodir <path/to/repo> --testdir <path/to/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 =============================
Signature · 1 line
2.41.0
PATCH 1/1 contributor-guide: add patchtest section
--- .../contributor-guide/submit-changes.rst | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)
documentation/contributor-guide/submit-changes.rst +34 -0
@@ -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 <patch_name> + +Alternatively, if you want ``patchtest`` to iterate over and test +multiple patches stored in a directory, you can use:: + + patchtest --directory <directory_name> + +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 <patch_name> --repodir <path/to/repo> --testdir <path/to/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 =============================
Signature · 1 line
2.41.0
Hi Trevor,
Thanks for the update!
Quoted 43 lines · Trevor Gamblin
Signed-off-by Trevor Gamblin <[email protected]>---
v2 moves the patchtest section to before "Sending Patches via Email", cleans up some confusing instructions, and improves highlighting to be more consistent with the rest of the guide..../contributor-guide/submit-changes.rst | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)documentation/contributor-guide/submit-changes.rst +26
-0@@ -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 <patch_name> + +Alternatively, if you want ``patchtest`` to iterate over and test +multiple patches stored in a directory, you can use:: + + patchtest --directory <directory_name> + +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 <patch_name> --repodir <path/to/repo> --testdir <path/to/testdir> + +Finally, note that ``patchtest`` is designed to test patches in a standalone
documentation/contributor-guide/submit-changes.rst Here is the general procedure on how to create patches to be sent through email: · line 317
Quoted 10 lines
documentation/contributor-guide/submit-changes.rst +8
-0+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 =============================
Happy to merge it in "master-next", and to have it merged in "master" soon :)
Any plans to backport "patchtest" to Kirkstone at some point, so that we can have it in the Kirkstone docs too? Otherwise, I can still mention the tool in the latest release anyway ;-)
Cheers
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 3 lines · Michael Opdenacker
Hi Trevor,
Thanks for the update!
Second patch sent.
Quoted 66 lines · Trevor Gamblin
Quoted 60 lines
Signed-off-by Trevor Gamblin <[email protected]>---
v2 moves the patchtest section to before "Sending Patches via Email", cleans up some confusing instructions, and improves highlighting to be more consistent with the rest of the guide..../contributor-guide/submit-changes.rst | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0@@ -279,6 +279,40 @@ Here is the general procedure on how to createpatches 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 suredocumentation/contributor-guide/submit-changes.rst +4
-0+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``
documentation/contributor-guide/submit-changes.rst +10
-0+like so:: + + patchtest --patch <patch_name> + +Alternatively, if you want ``patchtest`` to iterate over and test +multiple patches stored in a directory, you can use:: + + patchtest --directory <directory_name> + +By default, ``patchtest`` uses its own modules' file paths todetermine what
documentation/contributor-guide/submit-changes.rst +2
-0+repository and test suite to check patches against. If you wish to test +patches against a repository other than ``openembedded-core`` and/oruse
+a different set of tests, you can use the ``--repodir`` and ``--testdir``documentation/contributor-guide/submit-changes.rst +5
-1+flags:: + + patchtest --patch <patch_name> --repodir <path/to/repo> --testdir <path/to/testdir> + +Finally, note that ``patchtest`` is designed to test patches in astandalone
documentation/contributor-guide/submit-changes.rst +2
-0+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`` willreport
documentation/contributor-guide/submit-changes.rst +3
-0+false failures regarding the "merge on head" test. + +Using ``patchtest`` in this manner provides a final check for theoverall
documentation/contributor-guide/submit-changes.rst +3
-0+quality of your changes before they are submitted for review by the +maintainers. +Quoted 2 lines
Sending the Patches via Email
=============================Reviewed-by Michael Opdenacker <[email protected]>
Quoted 3 lines
Happy to merge it in "master-next", and to have it merged in "master" soon :)
Any plans to backport "patchtest" to Kirkstone at some point, so that we can have it in the Kirkstone docs too? Otherwise, I can still mention the tool in the latest release anyway ;-)
I think it will only apply to the latest and future releases, because it relies on some new recipes added in meta-python that would not be easily added to old releases (unfortunately).
Quoted 4 lines
Cheers
Michael.