Sie sind auf Seite 1von 3

Yocto tutorial:

- Razvan's experience
--------------The process flow for testing a Yocto Image
Usually on WED an email is received by the QA Team containing the latest MD5 che
cksums for different project branches such as: poky, meta-intel and so on.
E.g.:
The Autobuilder link: http://autobuilder.yoctoproject.org/pub/nightly/20130710-1
/
meta-fsl-arm
meta-fsl-ppc
meta-intel
meta-minnow
meta-qt3
eclipse-poky
poky

4a91984318cbc8c8b56f319a6eb7856e81fa9cac
851c7ff26de131b871bd5a64274c1a2b13d60fc3
e7f77e4dc4490a10a597d3da7e85d6650ccb6fc3
286a72ba3f5e29432be1dd77127de5bdc2d988c3
b73552fb998fd30a01dbee5a172e432a16078222
76df60597ae7cce069a5f1fd45089ea04c7394cd
a63229917a5708de2d161aba0d67168ce0da6365

The autobuilder link is usefull when we create the TestRuns in Testopia (https:/
/bugzilla.yoctoproject.org/tr_show_product.cgi).
The MD5 checksums are used after git cloning the poky and the meta-intel project
s in order to checkout the proper branches.
There are two main perspectives for testing an image: BUILD Time and RUN Time.
BUILD Time (e.g. Machine Sugarbay)
---------------------------------In order to test a release from build time perspective you have to:
a) clone the poky image: git clone git://git.yoctoproject.org/poky [optional po
ky_folder]
b) checkout inside the poky_folder: git checkout a63229917a5708de2d161aba0d67168
ce0da6365
c) if needed, under poky, git clone the meta-intel folder: git clone git://git.y
octoproject.org/meta-intel
d) checkout inside the meta-intel folder: git checkout e7f77e4dc4490a10a597d3da7
e85d6650ccb6fc3
e) go back to the poky folder and enter the following command: source oe-init-bu
ild-env
f) in the poky folder there is the following folder structure: /build/conf and i
nside conf there are 2 config files: bblayers.conf and local.conf
If needed, in bblayers.conf we have to add the meta-intel paths as described bel
ow:
e.g. add the following line inside the BBLAYERS section:
/home/razvan/yocto_work/poky/meta-intel \
/home/razvan/yocto_work/poky/meta-intel/meta-sugarbay \
In the local.conf file it is recommended to set the following parameters as foll
ows:
BB_NUMBER_THREADS = 8 and PARALLEL_MAKE = 8
also the MACHINE should be set to sugarbay
If no MACHINE will be set, then a default image for emulator (qemux86) will be b
uilt.

g) the building command should be run from the /poky_folder/build (after source
oe-init-build-env was issued): bitbake core-image-sato (or bitbake core-image-sa
to-sdk)
Observation:
In case of a sanity.conf error, there is a workaround:
Issue the following commands from /build folder:
mv ../meta/conf/sanity.conf ../meta/conf/sanity_obsolete && touch ../meta/conf/
sanity.conf
After bitbake core-image-sato-sdk command succeeded, the output will be located
under tmp/deploy/images/sugarbay*.hddimg
This image should be written on a USB drive using the dd tool: (e.g.: dd if=suga
rbay.hddimg of=/dev/sdc bs=1M; sync)
Creating the test run in testopia:
a) Go to Testopia -> Yocto Project Components -> BSPs
b) Locate test plan 18 - BSP/QEMU: master branch - click on 18 -> the associated
test runs list will be opened
c) Locate Test Run 77 - TEMPLATE - Full Pass - core-image-sato-sdk-Sugarbay -> R
ight Click and clone it:
When cloning a test run you need to select the test plan (in our case click
on BSP/QEMU: master branch), write the test run name which should have the follo
wing format:
2013-07-10-1 - Full Pass - core-image-sato-sdk-Sugarbay
Then set accordingly the product version, build and environment.
Check the Copy Test Cases checkbox and click Submit (only once).
Remark: 2013-07-10-1 is coming from http://autobuilder.yoctoproject.org/
pub/nightly/20130710-1/
RUN Time
-------The Runtime Testplans are located under:
Runtime -> Runtime -> testplan 34 - Runtime: master branch
Locate there TEMPLATE - Weekly and/or TEMPLATE - Full Pass Rele
ase and clone the testruns in order to create the 2013-07-10-1 - Weekly and 2013
-07-10-1 - Full Pass test runs.
Under Runtime - Master Branch should be found also the Performance Testcases suc
h as LTP and POSIX.
Remark: LTP should be run as follows: ./runltp -p -l result-M2-20130710
1.log -C result-M2-201307101.fail -d /opt/ltp/tmp &> result-M2-201307101.fulllog
- where M2 is the Milestone and
201307101 comes from: 20130710-1/.
./runltp -p -l result-M3_rc1-201307311.log -C result-M3_rc1-201307311.fa
il -d /opt/ltp/tmp &> result-M3_rc1-201307311.fulllog
201307311
20130818
./runltp -p -l result-14_rc1-20130818.log -C result-14_rc1-20130818.fail
-d /opt/ltp/tmp &> result-14_rc1-20130818.fulllog
Testing Security Assessment Tools:
---------------------------------links:
Fedora's security assessment tool is:
http://people.redhat.com/sgrubb/security/index.html
Gentoo's security assessment tool is:
http://www.gentoo.org/proj/en/hardened/pax-utils.xml

Prerequisite:
1) clone poky-contrib (git clone git://git.yoctoproject.org/poky-contrib) and en
ter the poky-contrib folder
2) checkout to the meta-security branch (git checkout adinux/meta-security; foll
owed by 'cd ..') [or: git clone git://git.yoctoproject.org/meta-security]
3) clone poky (git clone git://git.yoctoproject.org/poky)
4) move meta-security into poky folder (mv poky-contrib poky/meta-security)
5) add redhat-security and/or pax-utils in local.conf using: IMAGE_INSTALL_appen
d (IMAGE_INSTALL_append = " pax-tools, redhat-security" ); also check the BB_NUM
BER_THREADS = 8 and PARALLEL_MAKE = 8; machine should be set to default.
6) add the meta-security layer in bblayers.conf (e.g. under BBLAYERS, add the fo
llowing line /home/razvan/yocto_work/poky/meta-security \)
7) build the image: bitbake core-image-sato
8) run the image using the following command:
runqemu qemux86 core-image-sato
-sdk
After the emulator is running with the core-image-sato image, you should be able
to locate the proper security scripts under /usr/bin/.
Testing an image using the "test framework"
-------------------------------------Steps:
a) git clone poky: git clone git://git.yoctoproject.org/poky
b) have a look upon the following files: meta/classes/testimage.bbclass and in m
eta/lib/oeqa. In meta/lib/oeqa/runtime are the tests.
c) build a core-image-sato image
d) edit the local.conf by adding: INHERIT += "testimage"
e) run the following command: bitbake core-image-sato -c testimage -> as a res
ult: the qemu should start the testcases will be run.
Very usefull link (with resources, such as smart test suite and media folders):
http://10.237.112.202/rpmrepo/
==================================

Das könnte Ihnen auch gefallen