From b1ee347c26441ffae0a119901e6876920e17e07d Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 15 Apr 2013 13:21:59 -0700 Subject: [PATCH] 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 Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 74f61c8e7e..7e8369c977 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -3483,7 +3483,8 @@ 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. + starts the test (run-ptest), + and the actual test. 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 @@ -3520,6 +3521,20 @@ inherit ptest + Create run-ptest: + The run-ptest script needs to + start your tests. + Locate this script where you would point to it + using + SRC_URI. + Here is an example that starts a test for + dbus: + + #!/bin/sh + cd test + make -k runtest-TESTS + + Ensure dependencies are met: If the test adds build or runtime dependencies @@ -3600,8 +3615,8 @@ which is found in the Build Directory: - DISTRO_FEATURES = "ptest-pkgs" - EXTRA_IMAGE_FEATURES = "ptest" + EXTRA_IMAGE_FEATURES += "ptest" + DISTRO_FEATURES_append = " ptest-pkgs" Once your build is complete, the ptest files are installed into the /usr/lib/<package>/ptest @@ -3724,7 +3739,7 @@ Set the following variables in your local.conf file as follows: - DISTRO_FEATURES = "systemd" + DISTRO_FEATURES_append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd" You can save some disk space by adding @@ -3745,7 +3760,7 @@ Set the following variables in your local.conf file as follows: - DISTRO_FEATURES = "systemd" + DISTRO_FEATURES_append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd" Doing so causes your main image to use the