Commit Graph

16 Commits

Author SHA1 Message Date
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Paul Eggleton 7d1e1018f4 scripts: use OE_TMPDIR instead of TMPDIR external variable
On OpenSUSE within an X session, TMPDIR is set to the system temporary
directory (/tmp) which is incorrect for these scripts. Thus, change
runqemu and oe-setup-rpmrepo to use OE_TMPDIR from the external
environment rather than TMPDIR.

Fixes [YOCTO #1530]

(From OE-Core rev: 4e24c10952c7a52af7f2447595fd484692d35534)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-28 21:41:43 +01:00
Richard Purdie 32bb9c3184 imagetest-qemu/runqueue: Since we no longer support BUILDDIR, use TMPDIR
Commit 993672fa2739794a6dd0dbd7bb232fa60522b897 removed the BUILDDIR
support from runqueue which broke the imagetest-qemu integration. We now
therefore need to set TMPDIR and pass this through the environment to
ensure the runqueue script finds the right locations without running
bitbake directly.

This patch also adds a sleep to the qemu command in the error case so that
this remains on the screen for a period of time so the user can see errors
more easily.

This change unbreaks automated testing failures on the autobuilder.

(From OE-Core rev: de470333dbdeea444199340e4cd458c13fed6a5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-09 18:39:26 +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 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 65f4b65410 Further cleanup of various poky references
(From OE-Core rev: fe73ea8c510877fe4e3c117985e8f3d0b79ddf1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 12:56:16 +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
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
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
Richard Purdie 55859b9c3d imagetest-qemu: Allow the task to run after any rootfs is created and also standalone
One bitbake invocation can cause multiple images to be generated. We should test
each one and we cna do this by running after the rootfs task. Running the tests
standlone is also still possible with a new separate standlone task.

Acked-by: Scott Garman <scott.a.garman@intel.com>
Acked-by: Jiajun Xu <jiajun.xu@intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-07 12:31:09 +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 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