summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml109
1 files changed, 76 insertions, 33 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index c67468f143..0c1306d145 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -9161,18 +9161,17 @@
9161 in your <filename>local.conf</filename> file. 9161 in your <filename>local.conf</filename> file.
9162 Be sure to provide the IP address you need: 9162 Be sure to provide the IP address you need:
9163 <literallayout class='monospaced'> 9163 <literallayout class='monospaced'>
9164 TEST_EXPORT_ONLY = "1" 9164 INHERIT +="testexport"
9165 TEST_TARGET = "simpleremote"
9166 TEST_TARGET_IP = "192.168.7.2" 9165 TEST_TARGET_IP = "192.168.7.2"
9167 TEST_SERVER_IP = "192.168.7.1" 9166 TEST_SERVER_IP = "192.168.7.1"
9168 </literallayout> 9167 </literallayout>
9169 You can then export the tests with the following: 9168 You can then export the tests with the following:
9170 <literallayout class='monospaced'> 9169 <literallayout class='monospaced'>
9171 $ bitbake core-image-sato -c testimage 9170 $ bitbake core-image-sato -c testexport
9172 </literallayout> 9171 </literallayout>
9173 Exporting the tests places them in the 9172 Exporting the tests places them in the
9174 <link linkend='build-directory'>Build Directory</link> in 9173 <link linkend='build-directory'>Build Directory</link> in
9175 <filename>tmp/testimage/core-image-sato</filename>, which 9174 <filename>tmp/testexport/core-image-sato</filename>, which
9176 is controlled by the 9175 is controlled by the
9177 <filename>TEST_EXPORT_DIR</filename> variable. 9176 <filename>TEST_EXPORT_DIR</filename> variable.
9178 </para> 9177 </para>
@@ -9180,37 +9179,9 @@
9180 <para> 9179 <para>
9181 You can now run the tests outside of the build environment: 9180 You can now run the tests outside of the build environment:
9182 <literallayout class='monospaced'> 9181 <literallayout class='monospaced'>
9183 $ cd tmp/testimage/core-image-sato 9182 $ cd tmp/testexport/core-image-sato
9184 $ ./runexported.py testdata.json 9183 $ ./runexported.py testdata.json
9185 </literallayout> 9184 </literallayout>
9186 <note>
9187 This "export" feature does not deploy or boot the target
9188 image.
9189 Your target (be it a Qemu or hardware one)
9190 has to already be up and running when you call
9191 <filename>runexported.py</filename>
9192 </note>
9193 </para>
9194
9195 <para>
9196 The exported data (i.e. <filename>testdata.json</filename>)
9197 contains paths to the Build Directory.
9198 Thus, the contents of the directory can be moved
9199 to another machine as long as you update some paths in the
9200 JSON.
9201 Usually, you only care about the
9202 <filename>${DEPLOY_DIR}/rpm</filename> directory
9203 (assuming the RPM and Smart tests are enabled).
9204 Consequently, running the tests on other machine
9205 means that you have to move the contents and call
9206 <filename>runexported.py</filename> with
9207 "--deploy-dir <replaceable>path</replaceable>" as
9208 follows:
9209 <literallayout class='monospaced'>
9210 ./runexported.py --deploy-dir /new/path/on/this/machine testdata.json
9211 </literallayout>
9212 <filename>runexported.py</filename> accepts other arguments
9213 as well as described using <filename>--help</filename>.
9214 </para> 9185 </para>
9215 </section> 9186 </section>
9216 9187
@@ -9385,6 +9356,78 @@
9385 </para> 9356 </para>
9386 </section> 9357 </section>
9387 </section> 9358 </section>
9359
9360 <section id='installing-packages-in-the-dut-without-the-package-manager'>
9361 <title>Installing Packages in the DUT Without the Package Manager</title>
9362
9363 <para>
9364 When a test requires a package built by BitBake, it is possible
9365 to install that package.
9366 Installing the package does not require a package manager be
9367 installed in the device under test (DUT).
9368 It does, however, require an SSH connection and the target must
9369 be using the <filename>sshcontrol</filename> class.
9370 <note>
9371 This method uses <filename>scp</filename> to copy files
9372 from the host to the target, which causes permissions and
9373 special attributes to be lost.
9374 </note>
9375 </para>
9376
9377 <para>
9378 A JSON file is used to define the packages needed by a test.
9379 This file must be in the same path as the file used to define
9380 the tests.
9381 Furthermore, the filename must map directory to the test
9382 module name with a <filename>.json</filename> extension.
9383 </para>
9384
9385 <para>
9386 The JSON file must include an object with the test name as
9387 keys of an object or an array.
9388 This object (or array of objects) uses the following data:
9389 <itemizedlist>
9390 <listitem><para>"pkg" - A mandatory string that is the
9391 name of the package to be installed.
9392 </para></listitem>
9393 <listitem><para>"rm" - An optional boolean, which defaults
9394 to "false", that specifies to remove the package after
9395 the test.
9396 </para></listitem>
9397 <listitem><para>"extract" - An optional boolean, which
9398 defaults to "false", that specifies if the package must
9399 be extracted from the package format.
9400 When set to "true", the package is not automatically
9401 installed into the DUT.
9402 </para></listitem>
9403 </itemizedlist>
9404 </para>
9405
9406 <para>
9407 Following is an example JSON file that handles test "foo"
9408 installing package "bar" and test "foobar" installing
9409 packages "foo" and "bar".
9410 Once the test is complete, the packages are removed from the
9411 DUT.
9412 <literallayout class='monospaced'>
9413 {
9414 "": {
9415 "pkg": "bar"
9416 },
9417 "foobar": [
9418 {
9419 "pkg": "foo",
9420 "rm": true
9421 },
9422 {
9423 "pkg": "bar",
9424 "rm": true
9425 }
9426 ]
9427 }
9428 </literallayout>
9429 </para>
9430 </section>
9388 </section> 9431 </section>
9389 9432
9390 <section id="platdev-gdb-remotedebug"> 9433 <section id="platdev-gdb-remotedebug">