aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/commands.py
AgeCommit message (Collapse)Author
2016-04-12oeqa/runexported.py: Fix exported testMariano Lopez
With the changes introduced to test the eSDK the runexported test failed during the execution. This change fix runexported test in the least invasive way, because of the release cycle. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15oeqa/targetcontrol: make ssh control optionalEd Bartosh
Added new parameter 'ssh' to targetcontrol 'start' method to be able to test images without running ssh server. [YOCTO #8498] (From OE-Core rev: 1c3c66aadd43092bc19242b0651ee810cc31fe7c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15oe-selftest: remove unused parameterEd Bartosh
Removed unused parameter 'test' from runqemu function. (From OE-Core rev: c688b3bcbb57099fa72a9728bc708b109802f7fc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10oeqa: setup bitbake logger after tinfoil.shutdownEd Bartosh
Bitbake logger stops working after tinfoil.shutdown removes console handler from it. This makes bb.{error,warn,note,critical} messages disappear from the console. Adding console handler to bitbake logger again should fix this issue. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31oeqa/commands: Increase qemu boot timeout to match testimage.bbclassRichard Purdie
This matches the value in testimage.bbclass, which makes sense since the autobuilders are usually contended. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27oeqa/selftest/imagefeatures: Use QemuTarget codeRichard Purdie
Create a runqemu function which uses the QemuTarget() code from oeqa.targetcontrol to setup the QEMU instance, with all of the added robustness that that gives us. To do this, a datastore is needed for the recipe in question (core-image-minimal) so we do the work needed to set this up. We then use this runqemu function within the imagefeatures tests instead of a hand-rolled implementation. We can then use SSHControl to run the SSH tests rather than rolling our own code to do that as an added bonus. Fixed and extended by Paul Eggleton <paul.eggleton@linux.intel.com>. Part of the fix for [YOCTO #7994]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-18lib/oeqa/utils/commands: ensure get_bb_var() works when value contains =Paul Eggleton
Only split on the first equals character so that values that contain equals characters (such as FAKEROOTENV) can be retrieved. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-19recipetool: add appendfile subcommandPaul Eggleton
Locating which recipe provides a file in an image that you want to modify and then figuring out how to bbappend the recipe in order to replace it can be a tedious process. Thus, add a new appendfile subcommand to recipetool, providing the ability to create a bbappend file to add/replace any file in the target system. Without the -r option, it will search for the recipe packaging the specified file (using pkgdata from previously built recipes). The bbappend will be created at the appropriate path within the specified layer directory (which may or may not be in your bblayers.conf) or if one already exists it will be updated appropriately. Fairly extensive oe-selftest tests are also provided. Implements [YOCTO #6447]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14oeqa/utils: Fixed a problem with get_bb_var not returning right variable.Lucian Musat
It searches using regex now and should be more accurate. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-03oeqa/utils: Allow ~ in bblayersEd Bartosh
Bitbake can parse ~ in bblayer's paths. Added this functionality to oeqa code. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20oe-selftest: support getting unexported variable valuesPaul Eggleton
Allow get_bb_var() to work with unexported variable values such as MACHINE - the workaround is a little crude but should suffice for now. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-25oeqa/utils: replace some tabs with spacesPaul Eggleton
Python code should use spaces only for indentation. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-21oeqa/utils: make get_bb_var() more reliablePaul Eggleton
* Enable querying exported variables * Use strip() to remove quotes so any internal quotes are not disturbed Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10oeqa/utils/commands.py: add support for postconfig optionCorneliu Stoicescu
Adding support for postconfig option to the bitbake() and related methods. This enables us to use 'bitbake -R postconfig_file <command>'. Usage: bitbake(cmd, postconfig="some confguration") 'postconfig_file' would contain what we add in 'postconfig' Other methods affected: get_bb_env(), get_bb_var() Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-04-30oeqa: add proper handling for command errors where neededPaul Eggleton
For use outside of tests themselves, we want a better error than AssertionError, so create one and allow us to request it when calling runCmd(). This enables us to avoid tracebacks during master image operations if the power control command fails. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03scripts/oe-selftest: script to run builds as unittest against bitbake or ↵Stefan Stanacar
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@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>