[oe-commits] Stefan Stanacar : scripts/oe-selftest: script to run builds as unittest against bitbake or various scripts

git at git.openembedded.org git at git.openembedded.org
Tue Dec 3 17:44:34 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: 41a4f8fb005328d3a631a9036ceb6dcf75754410
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=41a4f8fb005328d3a631a9036ceb6dcf75754410

Author: Stefan Stanacar <stefanx.stanacar at intel.com>
Date:   Wed Nov 27 19:08:50 2013 +0200

scripts/oe-selftest: script to run builds as unittest against bitbake or various scripts

The purpose of oe-selftest is to run unittest modules added from meta/lib/oeqa/selftest,
which are tests against bitbake tools.

Right now the script it's useful for simple tests like:
  - "bitbake --someoption, change some metadata, bitbake X, check something" type scenarios (PR service, error output, etc)
  - or "bitbake-layers <...>" type scripts and yocto-bsp tools.

This commit also adds some helper modules that the tests will use and a base class.
Also, most of the tests will have a dependency on a meta-selftest layer
which contains specially modified recipes/bbappends/include files for the purpose of the tests.
The tests themselves will usually write to ".inc" files from the layer or in conf/selftest.inc
(which is added as an include in local.conf at the start and removed at the end)

It's a simple matter or sourcing the enviroment, adding the meta-selftest layer to bblayers.conf
and running: oe-selftest to get some results. It would finish faster if at least a core-image-minimal
was built before.

[ YOCTO #4740 ]

Signed-off-by: Stefan Stanacar <stefanx.stanacar at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/selftest/__init__.py |   2 +
 meta/lib/oeqa/selftest/base.py     |  98 ++++++++++++++++++++++++
 meta/lib/oeqa/utils/commands.py    | 137 ++++++++++++++++++++++++++++++++++
 meta/lib/oeqa/utils/ftools.py      |  27 +++++++
 scripts/oe-selftest                | 148 +++++++++++++++++++++++++++++++++++++
 5 files changed, 412 insertions(+)

Diff:   http://git.openembedded.org/?p=openembedded-core.git/?a=commitdiff;h=41a4f8fb005328d3a631a9036ceb6dcf75754410


More information about the Openembedded-commits mailing list