Commit Graph

33 Commits

Author SHA1 Message Date
Richard Purdie 9776a7ee7c qemuimagetest/scenario: Move dmesg to end of test run
The dmesg test detects segfaults. This is useful information to have and if one
occurs in one of the earlier tests, this can aid debugging. Move the dmesg test to
the end of the list of tests so we gain the extra debug info in those cases.

(From OE-Core rev: 472dc52974f12c255d9e98e63e82736c7ca2c223)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 13:25:17 +01:00
Richard Purdie 6d4d42d63d qemuimage-tests/sanity/boot: Increase timeout
As we've increased the parallelisation on the build servers, we've started to see
core-image-minimal sanity test boot failures where the network never comes up. We
don't see those failures for core-image-sato, its always minimal.

Looking at the results, it can take ~100 seconds for the network to come up,
even on the sato images if the machine has a high load. The timeout for the boot
test is only 120 seconds compared to 400 on every other test.

This change makes the timeout equal for all the tests at 400 seconds in the hope
that the load on the autobuilder is causing the sanity tests to run slowly and
hence triggering the false negatives.

(From OE-Core rev: 331118a253e26821011a31ca9087611ea58a18b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-06 17:22:21 +01:00
Ross Burton 04b799b3c8 sanity/connman: when connman test fails, dump syslog
(From OE-Core rev: a51041db57666c60f39c4effa4aceb53cae815dc)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 17:36:35 +01:00
Ross Burton 3328d7c3f7 connman_test.sh: show all processes when dumping ps
We know the grep failed because the error case is being executed, so don't do
the grep again when attempting to help diagnose the problem, as seeing the full
process list might be useful.

(From OE-Core rev: 6ee4a2ba6ee9633c1fa08d3b162d6d00da307798)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 17:36:34 +01:00
Richard Purdie 6c9743d9b9 qemu-testlib: Add python helper and simplify shell
The current code has a race since it greps for *any* qemu process
running, even if it isn't the one we started. This leads to some sanity
tests potentially failing on machines where multiple sets of sanity tests
are running.

To resovle this and some other ugly code issues, add a python script
to accurately walk the process tree and find the qemu process. We can
then replace all the shell functions attempting this which happen to
work in many cases but not all.

Also clean up some of the error handling so its more legible.

(From OE-Core rev: b9e052ed6b604f0049bcfa968a57f15d6e3d6395)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 11:48:30 +00:00
Richard Purdie d5267afa63 qemuimage-tests/dmesg: Add exception for error message on qemuarm with 3.8 kernel
With 3.8 kernels we get a harmless error message during kernel boot.
For now we can ignore. This allows the tests to pass and ensures we
can merge the 3.8 kernel.

(From OE-Core rev: da1e094c407353af2ab230c4867c9d8fd68e3161)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02 22:45:27 +00:00
Paul Eggleton ba08a8ccbf Update sanity tests to use smart instead of zypper
(From OE-Core rev: c56d24b35d94fe2934ac7e1dc67422e6abc7539d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:51 +00:00
Veerabrahmam vr 3526308ddd qemuimagetest: modifying the scenario file as per new test cases
modified scenario files.

(From OE-Core rev: dfd2ead41846c568d251a47c4baa2d9666e0c98f)

Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:01:47 +01:00
Veerabrahmam vr 913e2e2ef9 qemuimagetest: add basic function to check syslogd
one test case to check syslogd is executing on target.

(From OE-Core rev: 9286ea7a4eb85ba559d48135458f3b94da7a3866)

Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:01:47 +01:00
Veerabrahmam vr fe4dcbb252 qemuimagetest: add basic function to check enough disk space
one test case to check disk space availability.

(From OE-Core rev: d7b549a72a91db41d8b7084b4b3efa162a62a880)

Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:01:46 +01:00
Veerabrahmam vr ea55ec97c0 qemuimagetest: basic function to check bash exists
one test case to check  bash command availability on qemu target.

 Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com>

(From OE-Core rev: 357478b624b27fdfce25b6064b0f64717db75fa6)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:01:46 +01:00
Jiajun Xu c87a539aec sanitytest: use different option for command ps from busybox and procps
Current sanitytest use option -e for ps command, which only works for ps
from procps. It fails if ps is provided by busybox. Add check to use different
option for command from busybox and procps.

[YOCTO #1756]

(From OE-Core rev: dd856f5609c13fc740b53016de033a8a9cbe6b51)

Signed-off-by: Jiajun Xu <jiajun.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-18 10:47:15 +00:00
Tom Rini 10304e08ad connman_test.sh: Rework for busybox 'ps'
This script has two problems today.  First, it does 'ps -ef cmd'
in failure which real ps doesn't grok and busybox ps just ignores
the argument on.  Switch that to 'ps -ef'.  Second, busybox ps -o
doesn't understand cmd but does understand comm.  Using comm lets
us simplify the test logic as well, so switch to that.

(From OE-Core rev: cb34ce6833f298d487eeb35cf8297f286ef624d4)

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-04 15:04:34 +01:00
Jiajun Xu d08a341af7 qemuimagetest: update cvs and iptables to newer version for toolchain test
The old versions of cvs and iptables may meet compile error under some architecture
- cvs 1.11.23 fails on x86-64 host and iptables 1.4.9 fails on arm host. Update them
to latest version could solve these build error.
Meanwhile, 240s timeout is set for sudoku becasue 120s is not enough to finish
compile.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-24 11:28:32 +01:00
Jiajun Xu d2e078aa04 qemuimagetest: Add executable permission to test scripts for toolchain
The file mode bits of toolchain test scripts is 644, which could not be
executed by user. Fix the issue by adding executable permission(755) to
all test scripts for toolchain test.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>

(From OE-Core rev: 106517c40e929009bf63d806747dc613333c66e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-04 08:57:28 +01:00
Jiajun Xu ea4857a98b qemuimagetest: Enable toolchain automation tests in qemuimagetest
Enable toolchain automation tests in qemuimagetest framework. 3 C/C++ test
projects are added to test toolchain - cvs, iptables and sudoku-savant. User
needs to set TEST_SCEN to "toolchain" in local.conf to enable tests. Test case
will check if toolchain tarball exists under "${DEPLOY_DIR}/sdk". And it will
extract toolchain tarball into /opt. It requires user to chown /opt to non-root
user, who will run qemuimagetest.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-04 00:56:33 +01:00
Richard Purdie 6e95cb246f Rename poky-image-* -> core-image-* and task-poky-* -> task-core-*
(From OE-Core rev: 560b04181d8f51d189b99f01a72f17210dadf7a3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 00:29:30 +01:00
Richard Purdie 4d609d5021 Replace POKYBASE with COREBASE
(From OE-Core rev: 607a7657715f6fcba467a4e55ba64f41f4e13a15)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 00:29:29 +01:00
Richard Purdie 08127d444e Rename poky-qemu to runqemu
(From OE-Core rev: 7687d91f73f4a116593315b3b1488ac3f0904905)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 00:29:29 +01:00
Jiajun Xu d2cfd3c54f qemuimagetest: Rename test scenario file from poky-image-sdk to poky-image-sato-sdk
Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-02-10 15:27:50 +00:00
Jiajun Xu 3e052919c9 qemuimagetest: Use same image during sanity testing instead of copying a new image for each case
To reduce the time on sanity testing, we remove variable SHARE_IMAGE and use
a new variable TEST_SERIALIZE in local.conf. It is by default set to 1. Poky
will copy and boot the to-be tested image for only once. It will not remove
or kill the image and test cases will be serialized executed against the same
image. If it is set to 0, image is always be copied for each cases, which takes
much time. I had a experiment that latest qemuppc sato only takes 7 minutes to
finish 9 sanity test cases, which takes more than 20 minutes before.

I also removed sanity case "boot" from sato/sdk/lsb because the other cases for
these targets already cover the check point of "boot".

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-20 21:36:57 +00:00
Jiajun Xu 2119274314 qemuimagetest: Use the same image in sanity testing to fix the timeout issue on autobuilder
Fixes [BUGID #595]

Because of the QEMU booting slowness issue(see bug #646 and #618), autobuilder
may suffer a timeout issue when running sanity test. We introduce variable
SHARE_IMAGE here to fix the issue. It is by default set to 1. Poky will copy
latest built-out image and keep using it in sanity testing. If it is set to 0,
latest built-out image will be copied and tested for each case, which will take
much time.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-14 08:09:26 -08:00
Jiajun Xu 601af9f8ea qemuimagetest: Remove connman test for lsb image and fix one warning in Test_Create_Qemu
There is no connman in LSB image. So we need to remove connman test from it.
And when we check if ip address fetched by Test_Fetch_Target_IP is valid,
we should use "==" operator for string comparison.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-06 10:06:32 +00:00
Jiajun Xu 2e3cdcb067 qemuimagetest: Add basic function check for connman
Add one case for connman sanity test. We check if connmand is running
in background after booting and if there is always one connmand process
running even connmand is executed by several times.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Jiajun Xu 62caed8237 qemuimagetest: Add basic function check for gcc/g++/make command in target
Add one case for compile tools sanity test in target, including gcc/g++/make.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Jiajun Xu bcf8853e45 qemuimagetest: Add basic function check for rpm command
Add one case for rpm query sanity test.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Jiajun Xu f6442e68cc qemuimagetest: Add basic function check for zypper command
Add two cases for zypper sanity test.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Scott Garman 01da08097a Add sanity test scenarios for -lsb images
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-12-07 00:48:03 -08:00
Jiajun Xu d64c7ae88c imagetest-qemu: Add sanity test cases for scp/shutdown in target
scp test is to check if file copying via network work or not in target.
shutdown test is to check if target can be poweroff with qemu process off.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-11-14 21:08:22 -08:00
Jiajun Xu 12a861359a imagetest-qemu: Add test case for dmesg check in target
Add a test case for error log check with command dmesg in target. The
case introduces a new folder in target, "/opt/test", which holds test
scripts running in target.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-11-10 21:09:22 +08:00
Jiajun Xu 7303807ef1 test: Add scenario file for each target and support single case running
Different test cases are needed for different targets. A folder "scenario"
is created under scripts/qemuimage-tests to hold scenario files for different
targets.

Single case running is supported now. User can run single case together with
a whole test suite by setting variable TEST_SCEN in local.conf.

By default test cases in sanity suite will be ran. If you want to run other
test suite or specific test case(e.g. bat or boot test case under sanity suite),
list them like following.
TEST_SCEN = "sanity bat sanity:boot"

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-08-27 13:04:37 +01:00
Joshua Lock 971907567c Enable build dir outside of the poky directory
You need to first set up the build directory by sourcing the poky build script,
after that builds can be run in that directory so long as bitbake is in $PATH
removing the need to source the init script for each build.

i.e:
$ . poky-init-build-env ~/my-build
$ bitbake some-image
<<later, in a different shell>>
$ cd ~/my-build
$ export PATH=/path/to/bitbake/bin:$PATH
$ bitbake an-image

This patch also removes use of OEROOT in recipes, etc.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-21 15:39:53 +01:00
Jiajun Xu fd1d661b39 test: add automation framework and sanitytest
Automation test is disabled by default. User need set TESTCLASS
to qemu in conf/local.conf and run bitbake command "bitbake
poky-image-xxx" or "bitbake poky-image-xxx -c qemuimagetest" to
trigger it. Currently only the sanity test with two testcases are
added.

To run the test, user need prepare a testing environment:
1) "expect" should be installed on system
2) NOPASSWD should be set for user to run bitbake

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-07-15 12:48:25 +01:00