Files
poky/meta/lib/patchtest
Katariina Lounento f023756ef8 patchtest: add "Inactive-Upstream"
The list of valid statuses (`upstream_status_literal_valid_status`) was
missing "Inactive-Upstream", which caused patchtest to fail the test
test_patch.TestPatch.test_upstream_status_presence_format for patches
containing lines like:

    +Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013]

with the error:

    FAIL: test Upstream-Status presence: Upstream-Status is in incorrect format (test_patch.TestPatch.test_upstream_status_presence_format)

"Inactive-Upstream" is documented in the Yocto Project and OpenEmbedded
Contributor Guide [1]:

    Inactive-Upstream [lastcommit: when (and/or) lastrelease: when]

        The upstream is no longer available. This typically means a
        defunct project where no activity has happened for a long time —
        measured in years. To make that judgement, it is recommended to
        look at not only when the last release happened, but also when
        the last commit happened, and whether newly made bug reports and
        merge requests since that time receive no reaction. It is also
        recommended to add to the patch description any relevant links
        where the inactivity can be clearly seen.

`upstream_status_nonliteral_valid_status` only seems to be used in
logging and the value was copied verbatim from the aforementioned
documentation.

After this change all upstream status options documented in [1] are
covered.

[1] https://docs.yoctoproject.org/5.0.3/contributor-guide/recipe-style-guide.html#patch-upstream-status

(From OE-Core rev: a39e6e6854b60fd10f21c6c3f1e7d676e12ba9ee)

Signed-off-by: Katariina Lounento <katariina.lounento@vaisala.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-01 12:58:19 +00:00
..

patchtest selftests for openembedded-core

This directory provides a test suite and selftest script for use with the patchtest repository: https://git.yoctoproject.org/patchtest/

To setup for use:

  1. Clone https://git.openembedded.org/openembedded-core (this repo) and https://git.openembedded.org/bitbake/
  2. Clone https://git.yoctoproject.org/patchtest
  3. Install the necessary Python modules: in meta/lib/patchtest or the patchtest repo, do pip install -r requirements.txt
  4. Add patchtest to PATH: export PATH=/path/to/patchtest/repo:$PATH
  5. Initialize the environment: source oe-init-build-env
  6. Add meta-selftest to bblayers.conf: bitbake-layers add-layer /path/to/meta-selftest/ (the selftests use this layer's recipes as test targets)
  7. Finally, run the selftest script: ./meta/lib/patchtest/selftest/selftest

For more information on using patchtest, see the patchtest repo at https://git.yoctoproject.org/patchtest/.