Commit Graph

17 Commits

Author SHA1 Message Date
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 37ac9a0823 scripts/oe-setup-builddir: Fix up OE-Core/Poky mismatch for now (and fix permissions)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 19:19:33 +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
Richard Purdie cab983b0d0 qemuimage-testlib: Improve quoting causing problems under certain circumstances
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-24 01:03:47 +00:00
Richard Purdie 11833f7002 qemuimage-testlib: Fix the check for running qemu processes
Previously, any active command containing the word "qemu" including
in the command path would trigger a "success" result for detecting
the qemu process. This change fixes the check to search for commands
starting with "qemu" and ignores pathnames.

It also shortens the timeout for the qemu process to appear to 10
seconds. If it doesn't appear in that time there is always a problem.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-23 17:28:47 +00:00
Richard Purdie df74cf25f0 qemuimage-testlib: Ensure TOPDIR/BUILDDIR are set
The recent environment changes mean TOPDIR/BUILDDIR need to be exported
specifcially to the enviromnent so the qemu scripts can find the correct
build directory.

Without this, qemu can fail to run.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-23 17:27:14 +00:00
Jiajun Xu 236faced1d qemuimage-testlib: Add check for existence of image and correctness of ip address
Fixes [BUGID #612, #611]

Add check for existence of image to be tested in qemuimage-testlib.
This ensures that sanity test returns failure immediatly when there is
no image found. And also add check for the correctness of ip address.
If the ip address returned by function Test_Fetch_Target_IP is 0, it
means qemu starts up failed and no valid ip address found.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-12-23 15:52:37 +00: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 80993c4e1b qemuimage-testlib: kill qemu process according to its pid, instead of process name
poky-qemu-internal will set up a tap lockfile when creating tap device. The lockfile
will be released when a TERM signal is received. In previous code, function
Test_Kill_Qemu uses pkill to kill all process named "qemu". This may cause lockfile
release function not work in poky-qemu-internal. Then poky-qemu-internal will be
hang when user start QEMU the second time. To prevent the issue, the new function
Test_Kill_Qemu kills all child pid with a given parent process ID.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-09-02 11:00:08 +01:00
Jiajun Xu 8c498e5338 testlib: Add support for qemumips/qemuppc/qemux86-64, and add support for testing with images from autobuilder
Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-08-13 23:42:03 +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