summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-04-15 11:05:27 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-17 22:34:27 +0100
commita6d1a1740a3dedc535df6766b1ce9f943df3c0b4 (patch)
tree8f4d7e30573082bfdf11175e2c566d5cc98c6ea1 /documentation/dev-manual
parent7d13494e70e8e16f2315cbe0d733e69ca3adfbf6 (diff)
downloadpoky-a6d1a1740a3dedc535df6766b1ce9f943df3c0b4.tar.gz
dev-manual: Edits to the ptest section.
These are review comments from both Paul and Bjorn. (From yocto-docs rev: 773300f78b20bd601cbad750cfe32263fbe9d127) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml52
1 files changed, 28 insertions, 24 deletions
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 @@
2848 <listitem><para>Setting up Runtime Package Management 2848 <listitem><para>Setting up Runtime Package Management
2849 </para></listitem> 2849 </para></listitem>
2850 <listitem><para>Setting up and running package test 2850 <listitem><para>Setting up and running package test
2851 (Ptest) 2851 (ptest)
2852 </para></listitem> 2852 </para></listitem>
2853 </itemizedlist> 2853 </itemizedlist>
2854 </para> 2854 </para>
@@ -3477,17 +3477,17 @@
3477 </section> 3477 </section>
3478 3478
3479 <section id='testing-packages-with-ptest'> 3479 <section id='testing-packages-with-ptest'>
3480 <title>Testing Packages with Ptest</title> 3480 <title>Testing Packages with ptest</title>
3481 3481
3482 <para> 3482 <para>
3483 A Packate Test (Ptest) runs tests against packages built 3483 A Package Test (ptest) runs tests against packages built
3484 by the OpenEmbedded build system. 3484 by the OpenEmbedded build system on the target machine.
3485 Minimaly, a Ptest contains two things: a shell script that 3485 Minimally, a Ptest contains two things: a shell script that
3486 starts the test, and the actual test. 3486 starts the test, and the actual test.
3487 The shell that starts the test must not contain 3487 The shell script that starts the test must not contain
3488 the actual test, the script only starts it. 3488 the actual test, the script only starts it.
3489 On the other hand, the test can be anything from a simple 3489 On the other hand, the test can be anything from a simple
3490 schell script that runs a binary and checks the output to 3490 shell script that runs a binary and checks the output to
3491 an elaborate system of test binaries and data files. 3491 an elaborate system of test binaries and data files.
3492 </para> 3492 </para>
3493 3493
@@ -3513,8 +3513,8 @@
3513 you want to test. 3513 you want to test.
3514 Here is what you have to do for each recipe: 3514 Here is what you have to do for each recipe:
3515 <itemizedlist> 3515 <itemizedlist>
3516 <listitem><para><emphasis>Be sure the package recipe 3516 <listitem><para><emphasis>Be sure the recipe
3517 inherits Ptest:</emphasis> 3517 inherits ptest:</emphasis>
3518 Include the following line in your recipes: 3518 Include the following line in your recipes:
3519 <literallayout class='monospaced'> 3519 <literallayout class='monospaced'>
3520 inherit ptest 3520 inherit ptest
@@ -3552,14 +3552,15 @@
3552 The built version of Automake that ships with 3552 The built version of Automake that ships with
3553 the Yocto Project separates these actions 3553 the Yocto Project separates these actions
3554 automatically through a patch. 3554 automatically through a patch.
3555 Consequently, packages that use 3555 Consequently, packages that use the unaltered
3556 patched version of
3556 <filename>make check</filename> automatically 3557 <filename>make check</filename> automatically
3557 cross-compile.</para> 3558 cross-compile.</para>
3558 <para>However, you still must add a 3559 <para>However, you still must add a
3559 <filename>do_compile_ptest</filename> function to 3560 <filename>do_compile_ptest</filename> function to
3560 build the test suite. 3561 build the test suite.
3561 Add a function similar to the following to your 3562 Add a function similar to the following to your
3562 package recipe: 3563 recipe:
3563 <literallayout class='monospaced'> 3564 <literallayout class='monospaced'>
3564 do_compile_ptest() { 3565 do_compile_ptest() {
3565 oe_runmake buildtest-TESTS 3566 oe_runmake buildtest-TESTS
@@ -3576,10 +3577,10 @@
3576 <listitem><para><emphasis>Install the test 3577 <listitem><para><emphasis>Install the test
3577 suite:</emphasis> 3578 suite:</emphasis>
3578 The <filename>ptest.bbclass</filename> class 3579 The <filename>ptest.bbclass</filename> class
3579 automatically copies the required files that both 3580 automatically copies the file
3580 "make" (assuming there is a make target in the 3581 <filename>run-ptest</filename> to the target and
3581 top-level <filename>Makefile</filename>) and run 3582 then runs <filename>make install-ptest</filename>
3582 the tests. 3583 to run the tests.
3583 If this is not the case, you need to create a 3584 If this is not the case, you need to create a
3584 <filename>do_install_ptest</filename> that gets 3585 <filename>do_install_ptest</filename> that gets
3585 called after the "make install-ptest" completes. 3586 called after the "make install-ptest" completes.
@@ -3589,26 +3590,29 @@
3589 </section> 3590 </section>
3590 3591
3591 <section id='adding-ptest-to-your-build'> 3592 <section id='adding-ptest-to-your-build'>
3592 <title>Adding Ptest to Your Build</title> 3593 <title>Adding ptest to Your Build</title>
3593 3594
3594 <para> 3595 <para>
3595 To add package testing to your build, add the following 3596 To add package testing to your build, add the
3596 two statements to your <filename>local.conf</filename> file, 3597 <ulink url='&YOCTO_DOCS_REF_URL;#DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
3598 and <ulink url='&YOCTO_DOCS_REF_URL;#EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
3599 variables to your <filename>local.conf</filename> file,
3597 which is found in the 3600 which is found in the
3598 <link linkend='build-directory'>Build Directory</link>: 3601 <link linkend='build-directory'>Build Directory</link>:
3599 <literallayout class='monospaced'> 3602 <literallayout class='monospaced'>
3600 DISTRO_FEATURES += "ptest" 3603 DISTRO_FEATURES = "ptest-pkgs"
3601 IMAGE_FEATURES += "ptest" 3604 EXTRA_IMAGE_FEATURES = "ptest"
3602 </literallayout> 3605 </literallayout>
3603 Once your build is complete, the Ptest files are installed 3606 Once your build is complete, the ptest files are installed
3604 into the <filename>/usr/lib/&lt;package&gt;/ptest</filename> 3607 into the <filename>/usr/lib/&lt;package&gt;/ptest</filename>
3605 directory, where <filename>&lt;package&gt;</filename> 3608 directory within the image, where
3606 is the name of the package. 3609 <filename>&lt;package&gt;</filename> is the name of the
3610 package.
3607 </para> 3611 </para>
3608 </section> 3612 </section>
3609 3613
3610 <section id='running-ptest'> 3614 <section id='running-ptest'>
3611 <title>Running Ptest</title> 3615 <title>Running ptest</title>
3612 3616
3613 <para> 3617 <para>
3614 The <filename>ptest-runner</filename> package installs a 3618 The <filename>ptest-runner</filename> package installs a