Skip to contentSkip to conversation

contributor-guide: Add notes for tests

PATCH Superseded [email protected] 3 participants 3 messages Mar 4, 2024 – Mar 5, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 contributor-guide: Add notes for tests

From: Simone Weiß <[email protected]>

This adds some hints that and how chnages should be tested when contributing.

Fixes [YOCTO #15412]

---
 .../contributor-guide/submit-changes.rst      | 37 ++++++++++++++++++-
 1 file changed, 35 insertions(+), 2 deletions(-)
documentation/contributor-guide/submit-changes.rst +35 -2
index 61f3157d6..d2167a2f3 100644
@@ -221,6 +221,38 @@ to add the upgraded version.
    <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`__
    in the Linux kernel documentation.
 
+Test your changes
+-----------------
+
+For each contributions you make, you should test your changes as well.
+For this the Yocto Project offers several types of tests. Those tests cover
+different areas and it depends on your changes which are feasible. For example run:
+
+   -  For changes that affect the build environment:
+
+      -  ``bitbake-selftest``: for changes within BitBake
+
+      -  ``oe-selftest``: to test combinations of BitBake runs
+
+      -  ``oe-build-perf-test``: to test the performance of common build scenarios
+
+   -  For changes in a recipe:
+
+      - ``ptest``: of the package, if it exists
+
+      - ``testimage``: build an image, boot it and run testcases on it
+
+      - If applicable, ensure also the ``native`` and ``nativesdk`` variants builds
+
+   -  For changes relating to the SDK:
+
+      - ``testsdk``: to build, install and run tests against a SDK
+
+      - ``testsdk_ext``: to build, install and run tests against an extended SDK
+
+Note that this list just gives suggestions and is not exhaustive. More details can
+be found here: :ref:`test-manual/intro:Yocto Project Tests --- Types of Testing Overview`.
+
 Creating Patches
 ================
 
@@ -285,8 +317,9 @@ 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. Currently, it only supports testing patches for
-``openembedded-core`` branches. To setup, perform the following::
+tags. Note that no functional testing of the changes will be performed by ``patchtesti``.
+Currently, it only supports testing patches for ``openembedded-core`` branches.
+To setup, perform the following::
 
     pip install -r meta/lib/patchtest/requirements.txt
     source oe-init-build-env
Signature · 1 line
2.39.2
#1 lore raw

Hi!

Le 04/03/2024 à 21:50, Simone Weiß a écrit :

Quoted 55 lines

From: Simone Weiß <[email protected]>

This adds some hints that and how chnages should be tested when contributing.

Fixes [YOCTO #15412]

---
 .../contributor-guide/submit-changes.rst      | 37 ++++++++++++++++++-
 1 file changed, 35 insertions(+), 2 deletions(-)
documentation/contributor-guide/submit-changes.rst +32 -0
index 61f3157d6..d2167a2f3 100644
@@ -221,6 +221,38 @@ to add the upgraded version.
    <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`__
    in the Linux kernel documentation.
 
+Test your changes
+-----------------
+
+For each contributions you make, you should test your changes as well.
+For this the Yocto Project offers several types of tests. Those tests cover
+different areas and it depends on your changes which are feasible. For example run:
+
+   -  For changes that affect the build environment:
+
+      -  ``bitbake-selftest``: for changes within BitBake
+
+      -  ``oe-selftest``: to test combinations of BitBake runs
+
+      -  ``oe-build-perf-test``: to test the performance of common build scenarios
+
+   -  For changes in a recipe:
+
+      - ``ptest``: of the package, if it exists
+
+      - ``testimage``: build an image, boot it and run testcases on it
+
+      - If applicable, ensure also the ``native`` and ``nativesdk`` variants builds
+
+   -  For changes relating to the SDK:
+
+      - ``testsdk``: to build, install and run tests against a SDK
+
+      - ``testsdk_ext``: to build, install and run tests against an extended SDK
+
+Note that this list just gives suggestions and is not exhaustive. More details can
+be found here: :ref:`test-manual/intro:Yocto Project Tests --- Types of Testing Overview`.
+
 Creating Patches
 ================
 

documentation/contributor-guide/submit-changes.rst Validating Patches with Patchtest · line 320

Quoted 6 lines
documentation/contributor-guide/submit-changes.rst +1 -2
@@ -285,8 +317,9 @@ 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. Currently, it only supports testing patches for
-``openembedded-core`` branches. To setup, perform the following::
+tags. Note that no functional testing of the changes will be performed by ``patchtesti``.

There is an extra 'i' : patchtesti -> patchtest

Quoted 16 lines
documentation/contributor-guide/submit-changes.rst +2 -1
+Currently, it only supports testing patches for ``openembedded-core`` branches.
+To setup, perform the following::
 
     pip install -r meta/lib/patchtest/requirements.txt
     source oe-init-build-env
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#4928): https://lists.yoctoproject.org/g/docs/message/4928
Mute This Topic: https://lists.yoctoproject.org/mt/104731180/4316185
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
Yoann Congal
Smile ECS - Tech Expert
#2 lore raw
In reply to [email protected]

Hi  Simone,

Many thanks for the new patch!
I have my own suggestions...

Quoted 3 lines · Simone Weiß

From: Simone Weiß <[email protected]>

This adds some hints that and how chnages should be tested when contributing.

s/chnages/changes/

Quoted 24 lines

Fixes [YOCTO #15412]

---
  .../contributor-guide/submit-changes.rst      | 37 ++++++++++++++++++-
  1 file changed, 35 insertions(+), 2 deletions(-)
documentation/contributor-guide/submit-changes.rst +8 -0
index 61f3157d6..d2167a2f3 100644
@@ -221,6 +221,38 @@ to add the upgraded version.
     <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`__
     in the Linux kernel documentation.
 
+Test your changes
+-----------------
+
+For each contributions you make, you should test your changes as well.
+For this the Yocto Project offers several types of tests. Those tests cover
+different areas and it depends on your changes which are feasible. For example run:
+
+   -  For changes that affect the build environment:

documentation/contributor-guide/submit-changes.rst to add the upgraded version. · line 241

Quoted 10 lines
documentation/contributor-guide/submit-changes.rst +10 -0
+
+      -  ``bitbake-selftest``: for changes within BitBake
+
+      -  ``oe-selftest``: to test combinations of BitBake runs
+
+      -  ``oe-build-perf-test``: to test the performance of common build scenarios
+
+   -  For changes in a recipe:
+
+      - ``ptest``: of the package, if it exists

"Run package specific tests, if they exist"?

Thanks again
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com