diff options
| author | Antonin Godard <antonin.godard@bootlin.com> | 2026-01-09 11:45:22 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2026-01-26 09:41:31 +0000 |
| commit | 41ab4d1168dc55225ac941cc6fb5a319ef92f7b6 (patch) | |
| tree | eddad3a90ec9797dc0d2fe4aa00dcfe9271a82f0 /documentation | |
| parent | 71615e330caa7d60920874eaf6bde4ffe37dd6a9 (diff) | |
| download | poky-41ab4d1168dc55225ac941cc6fb5a319ef92f7b6.tar.gz | |
test-manual/ptest.rst: detail the exit code and output requirements
A ptest must emit at least one test result on the console, as this is
required by the testimage class (which ignores the exit code).
ptest-runner on the other hand, ignore the output and only cares about
the exit code.
Add these two items as requirements for a ptest to be valid.
Fixes [YOCTO #15832]
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
(From yocto-docs rev: 35ee82bca41b83b39131cfa88ddbb2d472418d00)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 9292f61d7ba89598c89033ea7ee3b11a20d873f3)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/test-manual/ptest.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/documentation/test-manual/ptest.rst b/documentation/test-manual/ptest.rst index 2c021af515..d61cd10310 100644 --- a/documentation/test-manual/ptest.rst +++ b/documentation/test-manual/ptest.rst | |||
| @@ -84,6 +84,25 @@ test. Here is what you have to do for each recipe: | |||
| 84 | cd test | 84 | cd test |
| 85 | make -k runtest-TESTS | 85 | make -k runtest-TESTS |
| 86 | 86 | ||
| 87 | - *Return an appropriate exit code*: The ``run-ptest`` script must return 0 on | ||
| 88 | success, 1 on failure. This is needed by ``ptest-runner`` to keep track of | ||
| 89 | the successful and failed tests. | ||
| 90 | |||
| 91 | - *Make sure the test prints at least one test result*: The execution of the | ||
| 92 | ``run-ptest`` script must result in at least one test result output on the | ||
| 93 | console, with the following format:: | ||
| 94 | |||
| 95 | result: testname | ||
| 96 | |||
| 97 | Where ``result`` can be one of ``PASS``, ``SKIP``, or ``FAIL``. ``testname`` | ||
| 98 | can be any name. | ||
| 99 | |||
| 100 | There can be as many test results as desired. | ||
| 101 | |||
| 102 | This information is read by the :ref:`ref-classes-testimage` class and | ||
| 103 | :oe_git:`logparser </openembedded-core/tree/meta/lib/oeqa/utils/logparser.py>` | ||
| 104 | module. | ||
| 105 | |||
| 87 | - *Ensure dependencies are met:* If the test adds build or runtime | 106 | - *Ensure dependencies are met:* If the test adds build or runtime |
| 88 | dependencies that normally do not exist for the package (such as | 107 | dependencies that normally do not exist for the package (such as |
| 89 | requiring "make" to run the test suite), use the | 108 | requiring "make" to run the test suite), use the |
