mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 12:58:44 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
71615e330c
commit
41ab4d1168
@@ -84,6 +84,25 @@ test. Here is what you have to do for each recipe:
|
||||
cd test
|
||||
make -k runtest-TESTS
|
||||
|
||||
- *Return an appropriate exit code*: The ``run-ptest`` script must return 0 on
|
||||
success, 1 on failure. This is needed by ``ptest-runner`` to keep track of
|
||||
the successful and failed tests.
|
||||
|
||||
- *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::
|
||||
|
||||
result: testname
|
||||
|
||||
Where ``result`` can be one of ``PASS``, ``SKIP``, or ``FAIL``. ``testname``
|
||||
can be any name.
|
||||
|
||||
There can be as many test results as desired.
|
||||
|
||||
This information is read by the :ref:`ref-classes-testimage` class and
|
||||
:oe_git:`logparser </openembedded-core/tree/meta/lib/oeqa/utils/logparser.py>`
|
||||
module.
|
||||
|
||||
- *Ensure dependencies are met:* If the test adds build or runtime
|
||||
dependencies that normally do not exist for the package (such as
|
||||
requiring "make" to run the test suite), use the
|
||||
|
||||
Reference in New Issue
Block a user