diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2014-04-08 11:46:42 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-11 18:22:48 +0100 |
commit | ea11a0c77086bc2ba46dffb0d5cccd72c0b7e8e7 (patch) | |
tree | cd49408a2e90edce203eeedb378ad9cb6fa61ab2 /documentation | |
parent | cc80d0514198a118fe066672e68382138b067e76 (diff) | |
download | poky-ea11a0c77086bc2ba46dffb0d5cccd72c0b7e8e7.tar.gz |
dev-manual: Added new "Hardware" section for running tests.
Fixes [YOCTO #5554]
This is the section that describes how to enable tests for
actual hardware.
(From yocto-docs rev: fd33b19e7fa32797ab2abd2b506b0d63209fbfc6)
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.xml | 125 |
1 files changed, 109 insertions, 16 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index b0cdc8342e..b2657cb6ff 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml | |||
@@ -5753,27 +5753,120 @@ | |||
5753 | <title>Hardware</title> | 5753 | <title>Hardware</title> |
5754 | 5754 | ||
5755 | <para> | 5755 | <para> |
5756 | This section needs the information specific to enabling | 5756 | In order to run tests on hardware, you need to set |
5757 | tests to run on actual hardware. | 5757 | <filename>TEST_TARGET</filename> to an appropriate value. |
5758 | Here are some developer notes: | 5758 | For QEMU, you do not have to change anything, the default |
5759 | value is "QemuTarget". | ||
5760 | For running tests on hardware, two options exits: | ||
5761 | "SimpleRemoteTarget" and "GummiBootTarget". | ||
5759 | <itemizedlist> | 5762 | <itemizedlist> |
5760 | <listitem><para> | 5763 | <listitem><para><emphasis>"SimpleRemoteTarget":</emphasis> |
5761 | Paul says this "If you have deployed the image yourself, | 5764 | Choose "SimpleRemoteTarget" if you are going to |
5762 | you can manually boot it, you know the IP address | 5765 | run tests on a target system that is already up and |
5763 | it will show up under, and SSH is installed with no | 5766 | running either on the network or as an image in |
5764 | password, then you can now run tests on any real | 5767 | QEMU. |
5765 | machine." | 5768 | </para></listitem> |
5769 | <listitem><para><emphasis>"GummiBootTarget":</emphasis> | ||
5770 | Choose "GummiBootTarget" if your hardware is | ||
5771 | a running EFI machine with | ||
5772 | <filename>gummiboot</filename> as bootloader and | ||
5773 | <filename>core-image-testmaster</filename> | ||
5774 | (or something similar) is installed. | ||
5775 | Also, your hardware under test must be in a | ||
5776 | DHCP-enabled network that gives it the same IP | ||
5777 | address for each reboot. | ||
5778 | </para></listitem> | ||
5779 | </itemizedlist> | ||
5780 | </para> | ||
5781 | |||
5782 | <para> | ||
5783 | If you set <filename>TEST_TARGET</filename> to | ||
5784 | "GummiBootTarget", you also need to | ||
5785 | setup your master image by doing the following: | ||
5786 | <orderedlist> | ||
5787 | <listitem><para><emphasis>Set <filename>EFI_PROVIDER</filename>:</emphasis> | ||
5788 | Be sure that <filename>EFI_PROVIDER</filename> | ||
5789 | is as follows: | ||
5790 | <literallayout class='monospaced'> | ||
5791 | EFI_PROVIDER = "gummiboot" | ||
5792 | </literallayout> | ||
5793 | </para></listitem> | ||
5794 | <listitem><para><emphasis>Build the master image:</emphasis> | ||
5795 | Build the <filename>core-image-testmaster</filename> | ||
5796 | image. | ||
5766 | </para></listitem> | 5797 | </para></listitem> |
5798 | <listitem><para><emphasis>Install image:</emphasis> | ||
5799 | Install the image on the target system. | ||
5800 | </para></listitem> | ||
5801 | </orderedlist> | ||
5802 | </para> | ||
5803 | |||
5804 | <para> | ||
5805 | The final thing you need to do when setting | ||
5806 | <filename>TEST_TARGET</filename> to "GummiBootTarget" is | ||
5807 | to set up the test image: | ||
5808 | <orderedlist> | ||
5809 | <listitem><para><emphasis>Set up your <filename>local.conf</filename> file:</emphasis> | ||
5810 | Make sure you have the following statements in | ||
5811 | your <filename>local.conf</filename> file: | ||
5812 | <literallayout class='monospaced'> | ||
5813 | IMAGE_FSTYPES += "tar.gz" | ||
5814 | INHERIT += "testimage" | ||
5815 | TEST_TARGET = "GummibootTarget" | ||
5816 | TEST_TARGET_IP = "192.168.2.3" | ||
5817 | </literallayout> | ||
5818 | </para></listitem> | ||
5819 | <listitem><para><emphasis>Build your test image:</emphasis> | ||
5820 | Use BitBake to build the image: | ||
5821 | <literallayout class='monospaced'> | ||
5822 | $ bitbake core-image-sato | ||
5823 | </literallayout> | ||
5824 | </para></listitem> | ||
5825 | </orderedlist> | ||
5826 | </para> | ||
5827 | |||
5828 | <para> | ||
5829 | Here is some additional information regarding running | ||
5830 | "GummibootTarget" as your test target: | ||
5831 | <itemizedlist> | ||
5767 | <listitem><para> | 5832 | <listitem><para> |
5768 | <filename>TEST_TARGET</filename> variable needs to equal | 5833 | You can use |
5769 | "simpleremote" | 5834 | <filename>TEST_POWERCONTROL_CMD</filename> |
5835 | together with | ||
5836 | <filename>TEST_POWERCONTROL_EXTRA_ARGS</filename> | ||
5837 | as a command that runs on the host and does power | ||
5838 | cycling. | ||
5839 | The test code passes one argument to that command: | ||
5840 | off, on or cycle (off then on). | ||
5841 | Here is an example that could appear in your | ||
5842 | <filename>local.conf</filename> file: | ||
5843 | <literallayout class='monospaced'> | ||
5844 | TEST_POWERCONTROL_CMD = "powercontrol.exp test 10.11.12.1 nuc1" | ||
5845 | </literallayout> | ||
5846 | In this example, the expect script does the | ||
5847 | following: | ||
5848 | <literallayout class='monospaced'> | ||
5849 | ssh test@10.11.12.1 "pyctl nuc1 <arg>" | ||
5850 | </literallayout> | ||
5851 | It then runs a Python script that controls power | ||
5852 | for a label called <filename>nuc1</filename>. | ||
5853 | <note> | ||
5854 | You need to customize | ||
5855 | <filename>TEST_POWERCONTROL_CMD</filename> | ||
5856 | and <filename>_ARGS</filename> for your own | ||
5857 | setup. | ||
5858 | The one requirement is that it accepts | ||
5859 | "on", "off", and "cycle" as the last argument. | ||
5860 | </note> | ||
5770 | </para></listitem> | 5861 | </para></listitem> |
5771 | <listitem><para> | 5862 | <listitem><para> |
5772 | Here are some notes from the patch - "The remote machine | 5863 | When no command is defined, it uses classic reboot. |
5773 | must be up with network and ssh and you need to set | 5864 | Classic reboot is fine as long as the machine |
5774 | <filename>TEST_TARGET_IP</filename> with the IP address | 5865 | actually reboots (i.e. the SSH test has not |
5775 | of the remote machine (it can still be a qemu instance that | 5866 | failed). |
5776 | was manually started) | 5867 | It is useful for scenarios where you have a simple |
5868 | setup, typically with a single board, and where | ||
5869 | some manual interaction is okay from time to time. | ||
5777 | </para></listitem> | 5870 | </para></listitem> |
5778 | </itemizedlist> | 5871 | </itemizedlist> |
5779 | </para> | 5872 | </para> |