Enabling Automation Test in Poky: Difference between revisions

From Yocto Project
Jump to navigationJump to search
(Created page with '=== Enable Automation Test in Poky === Currently we have implemented two automated sanity test cases in Poky. User can follow below steps to enable the automation test: * Make s…')
 
(Replace old content with link to appropriate manual section)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Enable Automation Test in Poky ===
Please see the [http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#performing-automated-runtime-testing Performing Automated Runtime Testing] section of the Yocto Project Development Manual.
Currently we have implemented two automated sanity test cases in Poky. User can follow below steps to enable the automation test:
 
* Make sure your working tree has latest test code. The first sanity test implementation is checked in poky master tree as commit, '''fd1d661b391dfad1edaac937a17c1165f635031a.
* Make sure your machine has package "expect" installed. The package is necessary for testing. We will add a recipe for it later. Currently, you need install it by yourself. On Ubuntu host, you can use apt-get to install expect:
<pre>
$ apt-get install expect
</pre>
* Edit /etc/sudoers to allow the user run sudo without prompted for a password. For example, you can do like following for user "tester":
<pre>
$ cat /etc/sudoers
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
....
....
....
 
%tester ALL=(ALL) NOPASSWD: NOPASSWD: ALL
</pre>
* Typically, you need a X environment to start QEMU. You can use your desktop's DISPLAY. Or, alternatively, you can install vncserver, and startup a X environment in localhost:x.0. (x can be 1, 2, 3.....n)
* You need set "IMAGETEST" to "qemu" in build/conf/local.conf
<pre>
$ cat local.conf
.....
# Set IMAGETEST to qemu if you want to build testcases and start
# testing in qemu after do_rootfs.
IMAGETEST = "qemu"
.....
</pre>
* Then you can run "bitbake poky-image-xxx" (xxx can be minimal, sato, sdk). After the kernel/image are generated, you need run "bitbake poky-image-xxx -c qemuimagetest". It will trigger automation test and you will get the result after a while. :)

Latest revision as of 12:03, 16 June 2014

Please see the Performing Automated Runtime Testing section of the Yocto Project Development Manual.