diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 3e48cd32f2..74f61c8e7e 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -2848,7 +2848,7 @@ Setting up Runtime Package Management Setting up and running package test - (Ptest) + (ptest) @@ -3477,17 +3477,17 @@
- Testing Packages with Ptest + Testing Packages with ptest - A Packate Test (Ptest) runs tests against packages built - by the OpenEmbedded build system. - Minimaly, a Ptest contains two things: a shell script that + A Package Test (ptest) runs tests against packages built + by the OpenEmbedded build system on the target machine. + Minimally, a Ptest contains two things: a shell script that starts the test, and the actual test. - The shell 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. On the other hand, the test can be anything from a simple - schell script that runs a binary and checks the output to + shell script that runs a binary and checks the output to an elaborate system of test binaries and data files. @@ -3513,8 +3513,8 @@ you want to test. Here is what you have to do for each recipe: - Be sure the package recipe - inherits Ptest: + Be sure the recipe + inherits ptest: Include the following line in your recipes: inherit ptest @@ -3552,14 +3552,15 @@ The built version of Automake that ships with the Yocto Project separates these actions automatically through a patch. - Consequently, packages that use + Consequently, packages that use the unaltered + patched version of make check automatically cross-compile. However, you still must add a do_compile_ptest function to build the test suite. Add a function similar to the following to your - package recipe: + recipe: do_compile_ptest() { oe_runmake buildtest-TESTS @@ -3576,10 +3577,10 @@ Install the test suite: The ptest.bbclass class - automatically copies the required files that both - "make" (assuming there is a make target in the - top-level Makefile) and run - the tests. + automatically copies the file + run-ptest to the target and + then runs make install-ptest + to run the tests. If this is not the case, you need to create a do_install_ptest that gets called after the "make install-ptest" completes. @@ -3589,26 +3590,29 @@
- Adding Ptest to Your Build + Adding ptest to Your Build - To add package testing to your build, add the following - two statements to your local.conf file, + To add package testing to your build, add the + DISTRO_FEATURES + and EXTRA_IMAGE_FEATURES + variables to your local.conf file, which is found in the Build Directory: - DISTRO_FEATURES += "ptest" - IMAGE_FEATURES += "ptest" + DISTRO_FEATURES = "ptest-pkgs" + EXTRA_IMAGE_FEATURES = "ptest" - Once your build is complete, the Ptest files are installed + Once your build is complete, the ptest files are installed into the /usr/lib/<package>/ptest - directory, where <package> - is the name of the package. + directory within the image, where + <package> is the name of the + package.
- Running Ptest + Running ptest The ptest-runner package installs a