dev-manual: Edits to the ptest section.
Applied some minor fixes to this area as directed by Paul Eggleton. This represents a clean second draft that can be reviewed. ] (From yocto-docs rev: d3380d698d36e83aab16ac74e713ab03baef60b0) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
598089fab8
commit
b1ee347c26
|
@ -3483,7 +3483,8 @@
|
||||||
A Package Test (ptest) runs tests against packages built
|
A Package Test (ptest) runs tests against packages built
|
||||||
by the OpenEmbedded build system on the target machine.
|
by the OpenEmbedded build system on the target machine.
|
||||||
Minimally, a Ptest contains two things: a shell script that
|
Minimally, a Ptest contains two things: a shell script that
|
||||||
starts the test, and the actual test.
|
starts the test (<filename>run-ptest</filename>),
|
||||||
|
and the actual test.
|
||||||
The shell script that starts the test must not contain
|
The shell script that starts the test must not contain
|
||||||
the actual test, the script only starts it.
|
the actual test, the script only starts it.
|
||||||
On the other hand, the test can be anything from a simple
|
On the other hand, the test can be anything from a simple
|
||||||
|
@ -3520,6 +3521,20 @@
|
||||||
inherit ptest
|
inherit ptest
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Create <filename>run-ptest</filename>:</emphasis>
|
||||||
|
The <filename>run-ptest</filename> script needs to
|
||||||
|
start your tests.
|
||||||
|
Locate this script where you would point to it
|
||||||
|
using
|
||||||
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
|
||||||
|
Here is an example that starts a test for
|
||||||
|
<filename>dbus</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
#!/bin/sh
|
||||||
|
cd test
|
||||||
|
make -k runtest-TESTS
|
||||||
|
</literallayout>
|
||||||
|
</para></listitem>
|
||||||
<listitem><para><emphasis>Ensure dependencies are
|
<listitem><para><emphasis>Ensure dependencies are
|
||||||
met:</emphasis>
|
met:</emphasis>
|
||||||
If the test adds build or runtime dependencies
|
If the test adds build or runtime dependencies
|
||||||
|
@ -3600,8 +3615,8 @@
|
||||||
which is found in the
|
which is found in the
|
||||||
<link linkend='build-directory'>Build Directory</link>:
|
<link linkend='build-directory'>Build Directory</link>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
DISTRO_FEATURES = "ptest-pkgs"
|
EXTRA_IMAGE_FEATURES += "ptest"
|
||||||
EXTRA_IMAGE_FEATURES = "ptest"
|
DISTRO_FEATURES_append = " ptest-pkgs"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Once your build is complete, the ptest files are installed
|
Once your build is complete, the ptest files are installed
|
||||||
into the <filename>/usr/lib/<package>/ptest</filename>
|
into the <filename>/usr/lib/<package>/ptest</filename>
|
||||||
|
@ -3724,7 +3739,7 @@
|
||||||
Set the following variables in your
|
Set the following variables in your
|
||||||
<filename>local.conf</filename> file as follows:
|
<filename>local.conf</filename> file as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
DISTRO_FEATURES = "systemd"
|
DISTRO_FEATURES_append = " systemd"
|
||||||
VIRTUAL-RUNTIME_init_manager = "systemd"
|
VIRTUAL-RUNTIME_init_manager = "systemd"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
You can save some disk space by adding
|
You can save some disk space by adding
|
||||||
|
@ -3745,7 +3760,7 @@
|
||||||
Set the following variables in your
|
Set the following variables in your
|
||||||
<filename>local.conf</filename> file as follows:
|
<filename>local.conf</filename> file as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
DISTRO_FEATURES = "systemd"
|
DISTRO_FEATURES_append = " systemd"
|
||||||
VIRTUAL-RUNTIME_init_manager = "systemd"
|
VIRTUAL-RUNTIME_init_manager = "systemd"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Doing so causes your main image to use the
|
Doing so causes your main image to use the
|
||||||
|
|
Loading…
Reference in New Issue