diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2014-03-30 17:47:35 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-31 17:54:35 +0100 |
commit | e00f888a88d0851b088c232dec66418e575a2e90 (patch) | |
tree | f9956ca1dde6429d3f5c0bc3b0e7ade67d10c5f3 /meta-selftest/recipes-test/m4 | |
parent | dea237ccd9407288cd3a73e1deca270619dd6d4a (diff) | |
download | openembedded-core-e00f888a88d0851b088c232dec66418e575a2e90.tar.gz openembedded-core-e00f888a88d0851b088c232dec66418e575a2e90.tar.bz2 openembedded-core-e00f888a88d0851b088c232dec66418e575a2e90.zip |
lib/oeqa: add a test target controller for EFI targets
The purpose of this module is to deploy a test image on a EFI-enabled hardware
and run our runtime tests. A bit of background:
- testimage.bbclass uses the concept of TEST_TARGET which is a class name
that is responsible for target deploying. A layer can provide
it's own TEST_TARGET. Right now has OE-core has a QemuTarget and a SimpleRemoteTarget
(ssh into an already up and running machine and run tests), the default one being qemu.
- basically testimage does something like:
target.deploy()
try:
target.start()
runTests()
finally:
target.stop()
This module assumes a running EFI machine with gummiboot as bootloader and
core-image-testmaster installed (or similar). Also your hardware under test has
to be in a DHCP-enabled network that gives it the same IP for each reboot.
One time setup (master image):
- build core-image-testmaster with EFI_PROVIDER = "gummiboot"
- install the image on the target
Test image setup:
- build your test image, e.g core-image-sato as you usually do, but with these in local.conf:
IMAGE_FSTYPES += "tar.gz"
- Now run the tests:
INHERIT += "testimage"
TEST_TARGET = "GummibootTarget"
TEST_TARGET_IP = "192.168.2.3"
bitbake core-image-sato -c testimage
Other notes:
- TEST_POWERCONTROL_CMD (togheter with TEST_POWERCONTROL_EXTRA_ARGS) can be a command that runs on the host and does power cycling.
The test code passes one argument to that command: off, on or cycle (off then on). In my case I use something like
TEST_POWERCONTROL_CMD="powercontrol.exp test 10.11.12.1 nuc1" in local.conf.
Basically my expect script does: 'ssh test@10.11.12.1 "pyctl nuc1 <arg>" and runs a python script there that controls power for a label called nuc1'.
The reason why my expect script has to ssh into another machine is because of network topology, and that machine is the one actually connected
to the test rack and the power strip. That's why TEST_POWERCONTROL_CMD and _ARGS need to be customized for one's setup, the only requirement being
that it accepts: on/off/cycle as the last argument.
- if no command is defined it would use classic reboot. This is fine as long as the machine
actually reboots (as in the ssh test hasn't failed), but it's useful for "simple-setup-with-one-board-on-the-desk" scenario, where
some manual interaction is okay from time to time.
[YOCTO #5614]
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/recipes-test/m4')
0 files changed, 0 insertions, 0 deletions