summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-09-23 16:35:26 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-01 22:52:53 +0100
commiteb36aaa07f07ecdcd9a6fd6a60b37b352a7cf5d6 (patch)
tree92a2a01176f549f9e891385fb7cabb3d97a9069d /documentation
parentb8bdd92ae648f4c94c4dfcd2f62aeffa1c2d0486 (diff)
downloadpoky-eb36aaa07f07ecdcd9a6fd6a60b37b352a7cf5d6.tar.gz
ref-manual, dev-manual: Edits to running automated tests section.
Applied a second round of review edits from Paul Eggleton for the new "Performing Automated Runtime Testing" section. I did some reorganization and some minor wording changes. (From yocto-docs rev: fa8f8e5f0f6c1377a4fcafcd3d933af15ac01ff3) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml103
-rw-r--r--documentation/ref-manual/ref-classes.xml4
-rw-r--r--documentation/ref-manual/ref-variables.xml8
3 files changed, 52 insertions, 63 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 4d1b731fa3..6eadcef022 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -4257,10 +4257,10 @@
4257 4257
4258 <para> 4258 <para>
4259 The OpenEmbedded build system makes available a series of automated 4259 The OpenEmbedded build system makes available a series of automated
4260 tests for images. 4260 tests for images to verify runtime functionality.
4261 <note> 4261 <note>
4262 The current release of Yocto Project supports these tests 4262 Currently, there is only support for running these tests
4263 for QEMU images only. 4263 under QEMU.
4264 </note> 4264 </note>
4265 These tests are written in Python making use of the 4265 These tests are written in Python making use of the
4266 <filename>unittest</filename> module, and the majority of them 4266 <filename>unittest</filename> module, and the majority of them
@@ -4321,37 +4321,6 @@
4321 must accept incoming connections from 192.168.7.0/24, 4321 must accept incoming connections from 192.168.7.0/24,
4322 which is the default IP range used for tap devices 4322 which is the default IP range used for tap devices
4323 by <filename>runqemu</filename>.</para></listitem> 4323 by <filename>runqemu</filename>.</para></listitem>
4324 <listitem><para><emphasis>Have your image built:</emphasis>
4325 The image on which you want to run tests needs to
4326 be built.
4327 For example, the following command would build the
4328 <filename>core-image-sato</filename> image when
4329 <filename>MACHINE</filename> is set to "qemu".
4330 <literallayout class='monospaced'>
4331 bitbake core-image-sato
4332 </literallayout></para></listitem>
4333 <listitem><para><emphasis>Run the tests:</emphasis>
4334 You can start the tests automatically or manually.
4335 To have the tests start automatically after the
4336 OpenEmbedded build system successfully creates a QEMU
4337 image, set the
4338 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_IMAGE'><filename>TEST_IMAGE</filename></ulink>
4339 variable to "1" in your
4340 <filename>local.conf</filename> file in the
4341 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
4342 To manually run the tests, globally inherit
4343 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage'><filename>testimage.class</filename>:</ulink>
4344 by editing your <filename>local.conf</filename> file as
4345 follows:
4346 <literallayout class='monospaced'>
4347 INHERIT += "testimage"
4348 </literallayout>
4349 After editing your
4350 <filename>local.conf</filename> file, use BitBake to
4351 run the tests:
4352 <literallayout class='monospaced'>
4353 bitbake -c testimage &lt;qemu-image&gt;
4354 </literallayout></para></listitem>
4355 </itemizedlist> 4324 </itemizedlist>
4356 </para> 4325 </para>
4357 4326
@@ -4367,17 +4336,42 @@
4367 <title>Running Tests</title> 4336 <title>Running Tests</title>
4368 4337
4369 <para> 4338 <para>
4370 After setting up to run the tests, use BitBake to start 4339 You can start the tests automatically or manually:
4371 the standard suite of tests manually or, if you are running 4340 <itemizedlist>
4372 them automatically, build your image: 4341 <listitem><para><emphasis>Automatically Running Tests:</emphasis>
4373 <literallayout class='monospaced'> 4342 To run the tests automatically after the
4374 bitbake core-image-sato -c testimage 4343 OpenEmbedded build system successfully creates an image,
4344 first set the
4345 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_IMAGE'><filename>TEST_IMAGE</filename></ulink>
4346 variable to "1" in your <filename>local.conf</filename>
4347 file in the
4348 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
4349 <literallayout class='monospaced'>
4350 TEST_IMAGE = "1"
4351 </literallayout>
4352 Next, simply build your image.
4353 If the image successfully builds, the tests will be
4354 run:
4355 <literallayout class='monospaced'>
4375 bitbake core-image-sato 4356 bitbake core-image-sato
4376 </literallayout> 4357 </literallayout></para></listitem>
4358 <listitem><para><emphasis>Manually Running Tests:</emphasis>
4359 To manually run the tests, first globally inherit
4360 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage'><filename>testimage.class</filename></ulink>
4361 by editing your <filename>local.conf</filename> file:
4362 <literallayout class='monospaced'>
4363 INHERIT += "testimage"
4364 </literallayout>
4365 Next, use BitBake to run the tests:
4366 <literallayout class='monospaced'>
4367 bitbake -c testimage &lt;image&gt;
4368 </literallayout></para></listitem>
4369 </itemizedlist>
4377 </para> 4370 </para>
4378 4371
4379 <para> 4372 <para>
4380 Once the tests start, the following happens: 4373 Regardless of how you run the tests, once they start, the
4374 following happens:
4381 <itemizedlist> 4375 <itemizedlist>
4382 <listitem><para>A copy of the root filesystem is written 4376 <listitem><para>A copy of the root filesystem is written
4383 to <filename>${WORKDIR}/testimage</filename>. 4377 to <filename>${WORKDIR}/testimage</filename>.
@@ -4415,11 +4409,10 @@
4415 All test files reside in 4409 All test files reside in
4416 <filename>meta/lib/oeqa/runtime</filename> in the 4410 <filename>meta/lib/oeqa/runtime</filename> in the
4417 <link linkend='source-directory'>Source Directory</link>. 4411 <link linkend='source-directory'>Source Directory</link>.
4418 A test name (sometimes referred to as a module) maps to a 4412 A test name maps directly to a Python module.
4419 method name within a class within a module. 4413 Each test module may contain a number of individual tests.
4420 Tests can be used within multiple classes and the tests 4414 Tests are usually grouped together by the area
4421 are usually grouped together by the area tested (e.g tests for 4415 tested (e.g tests for <filename>systemd</filename> reside in
4422 <filename>systemd</filename> reside in
4423 <filename>meta/lib/oeqa/runtime/systemd.py</filename>). 4416 <filename>meta/lib/oeqa/runtime/systemd.py</filename>).
4424 </para> 4417 </para>
4425 4418
@@ -4443,12 +4436,13 @@
4443 variable in <filename>local.conf</filename>. 4436 variable in <filename>local.conf</filename>.
4444 Each name in <filename>TEST_SUITES</filename> represents a 4437 Each name in <filename>TEST_SUITES</filename> represents a
4445 required test for the image. 4438 required test for the image.
4446 Module skipping is not allowed even if a test is not suitable 4439 Test modules named within <filename>TEST_SUITES</filename>
4447 for an image (e.g. running the <filename>rpm</filename> tests on 4440 cannot be skipped even if a test is not suitable for an image
4448 an image without <filename>rpm</filename>). 4441 (e.g. running the rpm tests on an image without
4442 <filename>rpm</filename>).
4449 Appending "auto" to <filename>TEST_SUITES</filename> causes the 4443 Appending "auto" to <filename>TEST_SUITES</filename> causes the
4450 build system to try to run all tests that are suitable for the 4444 build system to try to run all tests that are suitable for the
4451 image (i.e. the build system decides whether to run each test). 4445 image (i.e. each test module may elect to skip itself).
4452 </para> 4446 </para>
4453 4447
4454 <para> 4448 <para>
@@ -4469,13 +4463,8 @@
4469 </para> 4463 </para>
4470 4464
4471 <para> 4465 <para>
4472 The following list summarizes how to run the tests: 4466 Here are some things to keep in mind when running tests:
4473 <itemizedlist> 4467 <itemizedlist>
4474 <listitem><para>Run the default set of tests simply by
4475 running the following:
4476 <literallayout class='monospaced'>
4477 bitbake &lt;image&gt; -c testimage
4478 </literallayout></para></listitem>
4479 <listitem><para>The default tests for the image are defined 4468 <listitem><para>The default tests for the image are defined
4480 as: 4469 as:
4481 <literallayout class='monospaced'> 4470 <literallayout class='monospaced'>
@@ -4509,7 +4498,7 @@
4509 long as 4498 long as
4510 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink> 4499 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
4511 is extended in the layer's 4500 is extended in the layer's
4512 <filename>layer.conf</filename> file as normal. 4501 <filename>layer.conf</filename> file as normal).
4513 Just remember that filenames need to map directly to test 4502 Just remember that filenames need to map directly to test
4514 (module) names and that you do not use module names that 4503 (module) names and that you do not use module names that
4515 collide with existing core tests. 4504 collide with existing core tests.
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
index f08b7fefc8..6ed8fe5013 100644
--- a/documentation/ref-manual/ref-classes.xml
+++ b/documentation/ref-manual/ref-classes.xml
@@ -943,8 +943,8 @@
943 for images. 943 for images.
944 The class handles loading the tests and starting the image. 944 The class handles loading the tests and starting the image.
945 <note> 945 <note>
946 The current release of Yocto Project supports these tests 946 Currently, there is only support for running these tests
947 for QEMU images only. 947 under QEMU.
948 </note> 948 </note>
949 </para> 949 </para>
950 950
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index 6689ef085f..c7fb036c3f 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -5266,8 +5266,8 @@ PARALLEL_MAKEINST with the description ".
5266 Automatically runs the series of automated tests for 5266 Automatically runs the series of automated tests for
5267 images when an image is successfully built. 5267 images when an image is successfully built.
5268 <note> 5268 <note>
5269 The current release of Yocto Project supports these tests 5269 Currently, there is only support for running these tests
5270 for QEMU images only. 5270 under QEMU.
5271 </note> 5271 </note>
5272 These tests are written in Python making use of the 5272 These tests are written in Python making use of the
5273 <filename>unittest</filename> module, and the majority of 5273 <filename>unittest</filename> module, and the majority of
@@ -5322,8 +5322,8 @@ PARALLEL_MAKEINST with the description ".
5322 The OpenEmbedded build system provides a core set of tests 5322 The OpenEmbedded build system provides a core set of tests
5323 that can be used against images. 5323 that can be used against images.
5324 <note> 5324 <note>
5325 The current release of Yocto Project supports these 5325 Currently, there is only support for running these tests
5326 tests for QEMU images only. 5326 under QEMU.
5327 </note> 5327 </note>
5328 Tests include <filename>ping</filename>, 5328 Tests include <filename>ping</filename>,
5329 <filename>ssh</filename>, <filename>df</filename> among 5329 <filename>ssh</filename>, <filename>df</filename> among