diff options
| -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 | ||
