generic-poky/meta/lib/oeqa/runtime
Stefan Stanacar 3972259964 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]

(From OE-Core rev: e00f888a88d0851b088c232dec66418e575a2e90)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-31 22:53:46 +01:00
..
files lib/oeqa/runtime: add test for python 2014-01-06 11:14:01 +00:00
__init__.py classes/testimage: add support for finding tests in other layers 2013-08-28 23:36:08 +01:00
buildcvs.py oeqa/utils: targetbuild: take proxy into account 2014-02-11 11:56:56 +00:00
buildiptables.py oeqa/utils: targetbuild: take proxy into account 2014-02-11 11:56:56 +00:00
buildsudoku.py oeqa/utils: targetbuild: take proxy into account 2014-02-11 11:56:56 +00:00
connman.py lib/oeqa/runtime: print connman status if connman failed to start 2013-12-05 14:25:30 +00:00
date.py lib/oeqa/runtime: cleanup and improve output readability for some tests 2013-09-22 12:19:33 +01:00
df.py lib/oeqa/runtime: remove some unnecessary checks from setUpModule 2013-08-28 23:36:08 +01:00
dmesg.py oeqa/runtime/dmesg: Ignore DMA timeout errors 2014-03-02 17:25:28 +00:00
gcc.py lib/oeqa/runtime: add gcc test 2013-07-09 10:53:45 +01:00
kernelmodule.py lib/oeqa/runtime: build kernel module on target test 2013-10-18 15:58:16 +01:00
ldd.py lib/oeqa/runtime: cleanup and improve output readability for some tests 2013-09-22 12:19:33 +01:00
logrotate.py lib/oeqa/runtime: add new logrotate test 2013-08-26 11:47:20 +01:00
multilib.py lib/oeqa/runtime: multilib: fix typo 2013-08-26 16:29:18 +01:00
pam.py lib/oeqa/runtime: add new PAM support test 2013-08-26 11:47:20 +01:00
perl.py lib/oeqa/runtime: add test for perl 2013-08-26 11:47:20 +01:00
ping.py testimage: use the new targetcontrol.py module for running tests 2013-12-03 17:45:51 +00:00
python.py lib/oeqa/runtime: add test for python 2014-01-06 11:14:01 +00:00
rpm.py oeqa/runtime: rpm: fix finding the test rpm file 2014-01-28 18:01:47 +00:00
scanelf.py lib/oeqa/runtime: add basic scanelf test 2013-09-06 23:04:50 +01:00
scp.py oeqa/runtime/scp: replace dd call 2013-09-06 23:03:23 +01:00
skeletoninit.py lib/oeqa: move skeletoninit.py where it belongs 2013-08-30 16:23:44 +01:00
smart.py oeqa/runtime: smart: don't run in auto mode when rpm is not the pm 2014-02-13 11:41:21 +00:00
ssh.py lib/oeqa: add a test target controller for EFI targets 2014-03-31 22:53:46 +01:00
syslog.py oeqa/runtime: syslog: update --help test 2014-02-02 11:22:12 +00:00
systemd.py oeqa/runtime/systemd: remove race in settle() 2014-02-04 12:43:07 +00:00
vnc.py lib/oeqa/runtime: cleanup and improve output readability for some tests 2013-09-22 12:19:33 +01:00
x32lib.py lib/oeqa/runtime: add basic test for x32 images 2013-08-26 11:47:19 +01:00
xorg.py oeqa/runtime/xorg: use the right ps command for xorg test 2013-08-03 10:33:03 +01:00