diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2015-08-18 14:52:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-30 12:34:27 +0100 |
commit | 7b4fbbf979ed22434b8e3f83ae145139bb0d9fc7 (patch) | |
tree | 41058650cc0320c516c41a32609814452d26c35b /meta/classes/testimage.bbclass | |
parent | f906c5eb722de07eb09858fd058eb7e20103df71 (diff) | |
download | openembedded-core-7b4fbbf979ed22434b8e3f83ae145139bb0d9fc7.tar.gz openembedded-core-7b4fbbf979ed22434b8e3f83ae145139bb0d9fc7.tar.bz2 openembedded-core-7b4fbbf979ed22434b8e3f83ae145139bb0d9fc7.zip |
testimage: Run commands in target and host when test fails
This patch modify three files altought two of them
are minimal modifications. This version includes
the changes proposed by Paul.
testimage.bbclass:
Create new vars for easy modification of the dump
directory and commands to be run on host and target
when a test fails
TESTIMAGE_DUMP_DIR: Directory to save the dumps
testimage_dump_target: Commands to run on target
testimage_dump_host: Commands to run on host
oetest.py:
- Allow to use the vars defined in testimage class
- Now able to run commands in the host and dump the
results
- Fix an issue with the condition where to run the
dump commands (Before it run the commands every
test after a failure, now it runs the commands only
in tests that failed)
- Fix the output to stdout
[YOCTO #8118]
(From OE-Core rev: 26fe645457633f90bb5ddbb12f5f7b9ca4a06cc5)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r-- | meta/classes/testimage.bbclass | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 140babed74..1d9464f5e9 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -56,6 +56,30 @@ TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:d TESTIMAGELOCK = "${TMPDIR}/testimage.lock" TESTIMAGELOCK_qemuall = "" +TESTIMAGE_DUMP_DIR ?= "/tmp/oe-saved-tests/" + +testimage_dump_target () { + top -bn1 + ps + free + df + _ping + dmesg + netstat -an + ip address + _logs +} + +testimage_dump_host () { + top -bn1 + ps -ef + free + df + memstat + dmesg + netstat -an +} + python do_testimage() { testimage_main(d) } |