lib/oeqa: add module for running tests outside of the build system
authorStefan Stanacar <stefanx.stanacar@intel.com>
Mon, 3 Feb 2014 19:22:30 +0000 (21:22 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 9 Feb 2014 09:40:01 +0000 (09:40 +0000)
commitd8d8900faf7efd3f0691eaeb276b5c5aafea9a96
tree4bdae2f38b32897b41d238cbeb14434e972a4189
parent30d8a2290743ef221c79225867ece2f396fe8d8d
lib/oeqa: add module for running tests outside of the build system

This script will run the exported tests outside of the build system.

Simplest way to test this is with a qemu image that you manually start.
For an already build image use this in local.conf:
TEST_EXPORT_ONLY = "1"
TEST_TARGET = "simpleremote"
TEST_TARGET_IP = "192.168.7.2"
TEST_SERVER_IP = "192.168.7.1"
Export the tests: bitbake core-image-sato -c testimage
Then: runqemu core-image-sato
And: cd build/tmp/testimage/core-image-sato
     ./runexported.py testdata.json

The contents of build/tmp/testimage/core-image-sato can be moved on another machine
as long as some paths are updated in the json.
The exported data contains paths to the build dir. We only care about DEPLOY_DIR/rpm (
if the rpm and smart tests are enabled), so running the tests on other machine
means that the user has to move the contents and call runexported with --deploy-dir PATH:
 ./runexported.py --deploy-dir /path/on/another/machine testdata.json
runexported.py accepts other arguments as well, see --help.

[YOCTO #5613]

(From OE-Core rev: 087ee840ad642bada6fe0b02311f05a595ea2e65)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runexported.py [new file with mode: 0755]