From patchwork Tue Dec 1 15:22:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 106823 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.13178.1796138602058596443 for ; Tue, 01 Dec 2026 07:23:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=QGTQWSit; spf=pass (domain: gmail.com, ip: 209.85.167.170, mailfrom: twoerner@gmail.com) Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-572a102ae27so3185227b6e.3 for ; Tue, 01 Dec 2026 07:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796138601; x=1796743401; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=KVt/NzBuiBl5UX5FkEAW6sWQyCMoVBDLA0B6FFqHmA0=; b=QGTQWSityIdJ7Wh/Frt0RFlyig4vOHGU2TUgsBgG1H5vr/gyQuX1Z3JU7/QBdw9kFB 35mMaV8sWLR2fg+IQzQRpkuDG4AIeMsOcW9eFdIP4cXj4R9PrHqoVH+Ldcj6pwJOFBwZ VHpr1ZJrN4abKx2bdkWJZsG74sqBM+LsvFX16TAZima1c0OEG/4fh/O4OtSMzUsAdvRR iMzLKYV+XPz2KDyrvPDd/iO0NygTCoAIw/a46dX8tD1+zOVdW2ch8JkcwGLqnZzrX9Dp zyKutrUIbfwQ1Sd0kr99iAwRC1hlwrtVEvBSVoGlmdiq3JQWmrTvnGlSKln2fVyyK6fo Ukgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796138601; x=1796743401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=KVt/NzBuiBl5UX5FkEAW6sWQyCMoVBDLA0B6FFqHmA0=; b=ArpQjKmQIS1e/AzXMAw9RXSZOOSO4TzXxkqIeeQSE6F+JPu82TsQoIDG0zwZENdzsa 14vWu53w0mnvvqciS0TdPj/IfT7bSTT9D/nFHc5xwyPGPVfzzC79d0o/rrpRFm/lWRBo f+9HXhXjQU+B1rIlPqZdlXtTuiB7z3slaurKuyGCH6mRtRzX+OIs4bSLtYRjirqQQwBQ rIfeCj2lPlUpZs/C+YjYLd33mKx8lpGsp5fiTg/nsXrSp6CRUQCP32UN0whyZNKnLBN/ spD/WXFw0V1bdZhMgL4WCZmFOndelHpPpixE+whA+iCMklEtTs0WinHLFH68LVqnaV19 MUjQ== X-Gm-Message-State: APuU4Z9lvxyYB3yA1Xi333+S51V80HJ+9VeDzH4QmELzMnwWhBSEw5kf W7MROqqyZ+Cj5jqAoCIIciYsNA2uTy4J8Nn8gU/Nq0jasj8HxPVPs3So4gDLuA== X-Gm-Gg: AZFdTZf6LyrZaN2HskzgyI5xbHvNJsdNOJ12W/SeNooHhPiZFLF4GtZ80iqE8Gtz1yt 96au+mMeJcazrCKLoSV6PnOVLR/kZ0j+iyamv0RqISv+ZD7tPoY1DH1zb0ocfo9C67Q08+OehUw 2MhWy+x4lIrt189/Rfm00yqQk2zZufJbMuNm8O2tGOF0U8Pnok03I1K3nQxrXnkDsZ82fojDQAL AiEZ82PZLEfO9JXHVVc6hnM45yYP4JmiJsTgdCawPZYcJQlhOGbpQxdKuooWRt8WDYu4jBc2O9E 27/KfQwJSkD1GNj3vxtm4oHHc3B6XVQu2gojfSEarB7Q4Sww0zGcduISz5zuryzd3NKFJkevu/d +ZGMk0J3wQuypGtc1RiQRbT2YLBbuvrmYzmaD/bTmVbn5gLl1Dt0CBuii9/PmU5P9a5s62s1hvQ mryLnvVuq++ckKd8pe9hbKqTE++5ELYZmGlIrNASTgOZYVG8x7v511AuDd+ol+jc1skqYayBeQs 4g06q7FfaLs34rnjxVzFRi663Tl2bQ4RUwOeZYScigE7hN6CU+5bhjSIToUUlMZIgAE1sQZwYBI ezJB7uxqYndSpg/kABvM8uvmiZZERNGVxnTVBBZqErT+ss/gmq1Jvh2B6PXjsgigLTPmSYIPV1R /N1QHZTvgW0j/1RJAzfXp8DNBRNRfJnA= X-Received: by 2002:a05:6808:4fc9:b0:573:4ad5:7e4d with SMTP id 5614622812f47-57a0ac2fa3bmr42556042b6e.35.1796138600869; Tue, 01 Dec 2026 07:23:20 -0800 (PST) Return-Path: Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 5614622812f47-57a31929223sm27818249b6e.1.2026.12.01.07.23.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 07:23:19 -0800 (PST) From: Trevor Woerner To: docs@lists.yoctoproject.org Subject: [PATCH 11/16] test-manual: state the language of the blocks that are not BitBake Date: Tue, 1 Dec 2026 10:22:44 -0500 Message-ID: <20261201152251.2742634-12-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20261201152251.2742634-1-twoerner@gmail.com> References: <20261201152251.2742634-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 15:23:31 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10870 The manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language. AI-Generated: codex/claude-opus 5.5 (xhigh) Signed-off-by: Trevor Woerner --- documentation/test-manual/intro.rst | 72 ++++++++++++++----- documentation/test-manual/ptest.rst | 12 +++- .../test-manual/reproducible-builds.rst | 4 +- documentation/test-manual/runtime-testing.rst | 36 +++++++--- .../test-manual/understand-autobuilder.rst | 20 ++++-- 5 files changed, 108 insertions(+), 36 deletions(-) diff --git a/documentation/test-manual/intro.rst b/documentation/test-manual/intro.rst index 2512db79e26e..14c007b6976e 100644 --- a/documentation/test-manual/intro.rst +++ b/documentation/test-manual/intro.rst @@ -113,7 +113,9 @@ the following types of tests: ensure we have no single point of failure and can ensure the different distros work effectively. -- *eSDK Testing:* Image tests initiated through the following command:: +- *eSDK Testing:* Image tests initiated through the following command: + + .. code-block:: console $ bitbake image -c testsdkext @@ -124,7 +126,9 @@ the following types of tests: :ref:`OpenEmbedded Self test (oe-selftest) `. We test oe-selftest on each of the main distributions we support. -- *Image Testing:* Image tests initiated through the following command:: +- *Image Testing:* Image tests initiated through the following command: + + .. code-block:: console $ bitbake image -c testimage @@ -146,7 +150,9 @@ the following types of tests: ":yocto_wiki:`Ptest `" Wiki page for more information on Ptest. -- *SDK Testing:* Image tests initiated through the following command:: +- *SDK Testing:* Image tests initiated through the following command: + + .. code-block:: console $ bitbake image -c testsdk @@ -175,21 +181,29 @@ Tests map into the codebase as follows: Some of these tests run the ``bitbake`` command, so ``bitbake/bin`` must be added to the ``PATH`` before running ``bitbake-selftest``. - From within the BitBake repository, run the following:: + From within the BitBake repository, run the following: + + .. code-block:: console $ export PATH=$PWD/bin:$PATH - After that, you can run the selftest script:: + After that, you can run the selftest script: + + .. code-block:: console $ bitbake-selftest The default output is quiet and just prints a summary of what was - run. To see more information, there is a verbose option:: + run. To see more information, there is a verbose option: + + .. code-block:: console $ bitbake-selftest -v To skip tests that access the Internet, use the ``BB_SKIP_NETTESTS`` - variable when running ``bitbake-selftest`` as follows:: + variable when running ``bitbake-selftest`` as follows: + + .. code-block:: console $ BB_SKIP_NETTESTS=yes bitbake-selftest @@ -197,12 +211,16 @@ Tests map into the codebase as follows: which are mostly necessary to test the fetcher modules. To specify individual test modules to run, append the test module name to the ``bitbake-selftest`` command. For example, to specify the tests for - ``bb.tests.data.DataExpansions``, run:: + ``bb.tests.data.DataExpansions``, run: + + .. code-block:: console $ bitbake-selftest bb.tests.data.DataExpansions You can also specify individual tests by defining the full name and module - plus the class path of the test, for example:: + plus the class path of the test, for example: + + .. code-block:: console $ bitbake-selftest bb.tests.data.DataExpansions.test_one_var @@ -226,23 +244,31 @@ Tests map into the codebase as follows: - The code for the tests resides in ``meta/lib/oeqa/selftest/cases/``. - - To run all the tests, enter the following command:: + - To run all the tests, enter the following command: + + .. code-block:: console $ oe-selftest -a - To run a specific test, use the following command form where - ``testname`` is the name of the specific test:: + ``testname`` is the name of the specific test: + + .. code-block:: console $ oe-selftest -r For example, the following command would run the ``tinfoil`` - ``getVar`` API test:: + ``getVar`` API test: + + .. code-block:: console $ oe-selftest -r tinfoil.TinfoilTests.test_getvar It is also possible to run a set of tests. For example the following command will run all of the - ``tinfoil`` tests:: + ``tinfoil`` tests: + + .. code-block:: console $ oe-selftest -r tinfoil @@ -257,7 +283,9 @@ Tests map into the codebase as follows: IMAGE_CLASSES += "testimage" - - Run the tests using the following command form:: + - Run the tests using the following command form: + + .. code-block:: console $ bitbake image -c testimage @@ -268,7 +296,9 @@ Tests map into the codebase as follows: - The code for these tests resides in ``meta/lib/oeqa/sdk/cases/``. - - Run the test using the following command form:: + - Run the test using the following command form: + + .. code-block:: console $ bitbake image -c testsdk @@ -279,7 +309,9 @@ Tests map into the codebase as follows: - The code for these tests resides in ``meta/lib/oeqa/sdkext/cases/``. - - To run the tests, use the following command form:: + - To run the tests, use the following command form: + + .. code-block:: console $ bitbake image -c testsdkext @@ -290,7 +322,9 @@ Tests map into the codebase as follows: - The code for these tests resides in ``meta/lib/oeqa/buildperf``. - - To run the tests, use the following command form:: + - To run the tests, use the following command form: + + .. code-block:: console $ oe-build-perf-test @@ -492,7 +526,9 @@ working correctly. The test would only run if Python3 is installed in the SDK. The performance tests usually measure how long operations take and the resource utilization as that happens. An example from -``meta/lib/oeqa/buildperf/test_basic.py`` contains the following:: +``meta/lib/oeqa/buildperf/test_basic.py`` contains the following: + +.. code-block:: python class Test3(BuildPerfTestCase): def test3(self): diff --git a/documentation/test-manual/ptest.rst b/documentation/test-manual/ptest.rst index 2b86722145da..7b097c606a8b 100644 --- a/documentation/test-manual/ptest.rst +++ b/documentation/test-manual/ptest.rst @@ -13,7 +13,9 @@ hand, the test can be anything from a simple shell script that runs a binary and checks the output to an elaborate system of test binaries and data files. -The test generates output in the format used by Automake:: +The test generates output in the format used by Automake: + +.. code-block:: text result: testname @@ -117,7 +119,9 @@ test. Here is what you have to do for each recipe: script where you will refer to it using :term:`SRC_URI`. Be sure ``run-ptest`` exits with 0 to mark it as successfully executed otherwise will be marked as fail. - Here is an example that starts a test for ``dbus``:: + Here is an example that starts a test for ``dbus``: + + .. code-block:: shell #!/bin/sh cd test @@ -129,7 +133,9 @@ test. Here is what you have to do for each recipe: - *Make sure the test prints at least one test result*: The execution of the ``run-ptest`` script must result in at least one test result output on the - console, with the following format:: + console, with the following format: + + .. code-block:: text result: testname diff --git a/documentation/test-manual/reproducible-builds.rst b/documentation/test-manual/reproducible-builds.rst index 4e39cf3f79d8..f3ea8c3a7666 100644 --- a/documentation/test-manual/reproducible-builds.rst +++ b/documentation/test-manual/reproducible-builds.rst @@ -87,7 +87,9 @@ it always depends upon the paths it is built in. classes, etc. To run our automated selftest, as we use in our CI on the Autobuilder, you can -run:: +run: + +.. code-block:: console $ oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds diff --git a/documentation/test-manual/runtime-testing.rst b/documentation/test-manual/runtime-testing.rst index 5a7193f015b4..1102a683e15e 100644 --- a/documentation/test-manual/runtime-testing.rst +++ b/documentation/test-manual/runtime-testing.rst @@ -56,7 +56,9 @@ In order to run tests, you need to do the following: - Ensure that your host has the package ``iptables`` installed. - The package recipe ``qemu-helper-native`` is required to run - this script. Build the package using the following command:: + this script. Build the package using the following command: + + .. code-block:: console $ bitbake qemu-helper-native @@ -230,7 +232,9 @@ The final thing you need to do when setting :term:`TEST_TARGET` to TEST_TARGET = "SystemdbootTarget" TEST_TARGET_IP = "192.168.2.3" -#. *Build your test image:* Use BitBake to build the image:: +#. *Build your test image:* Use BitBake to build the image: + + .. code-block:: console $ bitbake core-image-sato @@ -324,7 +328,9 @@ You can start the tests automatically or manually: TESTIMAGE_AUTO = "1" Next, build your image. If the image successfully builds, the - tests run:: + tests run: + + .. code-block:: console $ bitbake core-image-sato @@ -334,7 +340,9 @@ You can start the tests automatically or manually: IMAGE_CLASSES += "testimage" - Next, use BitBake to run the tests:: + Next, use BitBake to run the tests: + + .. code-block:: console $ bitbake -c testimage image @@ -408,7 +416,9 @@ If your image is already built, make sure the following are set in your TEST_SERVER_IP = "IP-address-for-the-test-server" You can then export the tests with the -following BitBake command form:: +following BitBake command form: + +.. code-block:: console $ bitbake image -c testexport @@ -416,7 +426,9 @@ Exporting the tests places them in the :term:`Build Directory` in ``tmp/testimage/``\ image, which is controlled by the :term:`TEST_EXPORT_DIR` variable. -You can now run the tests outside of the build environment:: +You can now run the tests outside of the build environment: + +.. code-block:: console $ cd tmp/testimage/image $ ./oe-test runtime @@ -433,12 +445,16 @@ Here is a complete example that shows IP addresses and uses the TEST_TARGET_IP = "192.168.7.2" TEST_SERVER_IP = "192.168.7.1" -Use BitBake to export the tests:: +Use BitBake to export the tests: + +.. code-block:: console $ bitbake core-image-sato -c testexport Run the tests outside of -the build environment using the following:: +the build environment using the following: + +.. code-block:: console $ cd tmp/testimage/core-image-sato $ ./oe-test runtime @@ -580,7 +596,9 @@ data: Here is an example JSON file that handles test "foo" installing package "bar" and test "foobar" installing packages "foo" and "bar". -Once the test is complete, the packages are removed from the DUT:: +Once the test is complete, the packages are removed from the DUT: + +.. code-block:: json { "foo": { diff --git a/documentation/test-manual/understand-autobuilder.rst b/documentation/test-manual/understand-autobuilder.rst index e6549060765b..c05198f43105 100644 --- a/documentation/test-manual/understand-autobuilder.rst +++ b/documentation/test-manual/understand-autobuilder.rst @@ -20,7 +20,9 @@ each of those targets on a separate buildbot worker. To understand the configuration, you need to look at the entry on ``config.json`` file within the :yocto_git:`yocto-autobuilder-helper ` repository. The targets are defined in the ``overrides`` section, a quick -example could be ``qemux86-64`` which looks like:: +example could be ``qemux86-64`` which looks like: + +.. code-block:: text "qemux86-64" : { "MACHINE" : "qemux86-64", @@ -33,7 +35,9 @@ example could be ``qemux86-64`` which looks like:: }, And to expand that, you need the ``arch-qemu`` entry from -the ``templates`` section, which looks like:: +the ``templates`` section, which looks like: + +.. code-block:: text "arch-qemu" : { "BUILDINFO" : true, @@ -276,18 +280,24 @@ The standard ``config.json`` minimally attempts to allow substitution of the paths. The Helper script repository includes a ``local-example.json`` file to show how you could override these from a separate configuration file. Pass the following into the environment of -the Autobuilder:: +the Autobuilder: + +.. code-block:: console $ ABHELPER_JSON="config.json local-example.json" As another example, you could also pass the following into the -environment:: +environment: + +.. code-block:: console $ ABHELPER_JSON="config.json /some/location/local.json" One issue users often run into is validation of the ``config.json`` files. A tip for minimizing issues from invalid JSON files is to use a Git ``pre-commit-hook.sh`` script to verify the JSON file before committing -it. Create a symbolic link as follows:: +it. Create a symbolic link as follows: + +.. code-block:: console $ ln -s ../../scripts/pre-commit-hook.sh .git/hooks/pre-commit