summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-04-08 12:21:30 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-11 18:15:30 +0100
commit9a178b60167663d63775aa14fc522c2c9078f2cd (patch)
tree61455d190e86b423c66cb36c482f7df1fe257396 /documentation/dev-manual
parentd8ee1658de04cb26d401038c6b001def5991de8c (diff)
downloadpoky-9a178b60167663d63775aa14fc522c2c9078f2cd.tar.gz
dev-manual: Added new "Exporting Tests" section.
Fixes [YOCTO #5554] New section added on exporting tests. (From yocto-docs rev: b4a818e769acca5559a8e174414c4e214379e292) 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.xml66
1 files changed, 66 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index b2657cb6ff..ffed3e2728 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -6004,6 +6004,72 @@
6004 </para> 6004 </para>
6005 </section> 6005 </section>
6006 6006
6007 <section id="exporting-tests">
6008 <title>Exporting Tests</title>
6009
6010 <para>
6011 You can export tests so that they can run independently of
6012 the build system.
6013 Exporting tests is required if you want to be able to hand
6014 the test execution off to a scheduler.
6015 You can only export tests that are defined in
6016 Tests exported are the ones defined in
6017 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SUITES'><filename>TEST_SUITES</filename></ulink>.
6018 </para>
6019
6020 <para>
6021 If you image is already built, make sure the following are set
6022 in your <filename>local.conf</filename> file.
6023 Be sure to provide the IP address you need:
6024 <literallayout class='monospaced'>
6025 TEST_EXPORT_ONLY = "1"
6026 TEST_TARGET = "simpleremote"
6027 TEST_TARGET_IP = "192.168.7.2"
6028 TEST_SERVER_IP = "192.168.7.1"
6029 </literallayout>
6030 You can then export the tests with the following:
6031 <literallayout class='monospaced'>
6032 $ bitbake core-image-sato -c testimage
6033 </literallayout>
6034 Exporting the tests places them in the
6035 <link linkend='build-directory'>Build Directory</link> in
6036 <filename>tmp/testimage/core-image-sato</filename>, which
6037 is controlled by the
6038 <filename>TEST_EXPORT_DIR</filename> variable.
6039 </para>
6040
6041 <para>
6042 The exported data (i.e. <filename>testdata.json</filename>)
6043 contains paths to the Build Directory.
6044 Thus, the contents of the directory can be moved
6045 to another machine as long as you update some paths in the
6046 JSON.
6047 Usually you only care about the
6048 ${DEPLOY_DIR}/rpm directory (assuming the RPM and Smart tests
6049 are enabled).
6050 Consequently, running the tests on other machine
6051 means that you have to move the contents and call
6052 <filename>runexported</filename> with "--deploy-dir PATH:
6053 ./runexported.py --deploy-dir /new/path/on/this/machine testdata.json
6054 runexported.py accepts other arguments as well, see --help.
6055 </para>
6056
6057 <para>
6058 You can now run the tests outside of the build environment:
6059 <literallayout class='monospaced'>
6060 $ cd tmp/testimage/core-image-sato
6061 $ ./runexported.py testdata.json
6062 </literallayout>
6063 <note>
6064 This "export" feature does not deploy or boot the target
6065 image.
6066 Your target (be it a Qemu or hardware one)
6067 has to already be up and running when you call
6068 <filename>runexported.py</filename>
6069 </note>
6070 </para>
6071 </section>
6072
6007 <section id="qemu-image-writing-new-tests"> 6073 <section id="qemu-image-writing-new-tests">
6008 <title>Writing New Tests</title> 6074 <title>Writing New Tests</title>
6009 6075