aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/devtool.py
AgeCommit message (Collapse)Author
2015-05-07oe-selftest: devtool: add a proper test to see if tap devices existPaul Eggleton
Check up front in test_devtool_deploy_target whether the tap devices exist and skip if not. If we don't do this we get a significantly less comprehensible error via pexpect. (From OE-Core rev: 2258345e19efff7717fe19a5026ec55f1b6f90b6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-07devtool: fix for rename of gcc-sourcePaul Eggleton
After OE-Core commit 67db7182faf6742b0d971d61d8c5ba34f69d2e12, PV is appended to the end of the gcc-source PN, thus we need to handle that in devtool and the corresponding test. Part of the fix for [YOCTO #7729]. (From OE-Core rev: 440029dc229a566b9bead1481215d5e5760c5fe6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-07oe-selftest: devtool: fix broken URL in test_devtool_add_fetchPaul Eggleton
I already had the file fetched from some previous work and thus it didn't attempt to download the invalid URL when I tested it earlier. Part of the fix for [YOCTO #7729]. (From OE-Core rev: f9bad5aeb507f5b3c1346118011c7766c44d9ba4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-01oe-selftest: devtool: add some tests for devtool add -fPaul Eggleton
Tests the following aspects of "devtool add" with the -f option: * Works for a git and https URI * Extracts to the appropriate directory * Uses the correct recipe file name with and without -V * Sets SRC_URI and S appropriately with and without -V * Sets SRCREV if rev= is specified in the URI A lot of this functionality relies on "recipetool create" which "devtool add" wraps around, so the associated behaviour of that is also being tested here. Refactor out the code to check a recipe for variable values / inherits at the same time so we can use it to check the generated recipe. (From OE-Core rev: 0e626639ee75d42cb44d357efe2d9c4d2ff65294) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: add: use correct bbappend file name with -V optionPaul Eggleton
We weren't adding the version into the bbappend file name when -V was specified which meant that building or resetting failed. Also adjust one of the tests so that we're testing devtool add both with and without this option. Fixes [YOCTO #7647]. (From OE-Core rev: bdbeff0cd342e31053d7203d78fc5dda611052b1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27oe-selftest: devtool: fix test_devtool_update_recipe_gitPaul Eggleton
Make this test work after recent changes to the mtd-utils recipe, and hopefully make it robust against any future changes. (From OE-Core rev: 5be62624a6537659f9f6229c82762da45909f902) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20oe-selftest: add missing dependency to test_recipetool_create_gitPaul Eggleton
libmatchbox links to libjpeg if it is present so just explicitly build it and then check it appears in DEPENDS. (From OE-Core rev: 00ca890d8a56c4c05ce5bda87b3d9d1452ddfa36) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20oe-selftest: add a test for devtool modify on recipes fetching local filesPaul Eggleton
With the change to externalsrc we can now handle these, so add a test to ensure they can be built. (From OE-Core rev: efd46543524db98e4369c1d85a1e1c0e76f12899) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20oe-selftest: add a test for devtool deploy-targetPaul Eggleton
Whilst this test would seemingly be better placed as a runtime test, unfortunately the runtime tests run under bitbake and you can't run devtool within bitbake (since devtool needs to run bitbake itself). Additionally we are testing build-time functionality as well, so really this has to be done as an oe-selftest test. This test does have a few perhaps unusual requirements in order to run: * pexpect is installed * MACHINE is set to one of the qemu machines * runqemu tap devices have been set up (From OE-Core rev: 9dc16a8a87bef5dc408aefb256c01e2a4fe3563c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20devtool: modify/extract: prevent usage with incompatible recipesPaul Eggleton
Consolidate code for checking compatible recipes and consider meta and packagegroup recipes as well as package-index and gcc-source to be incompatible. (From OE-Core rev: 4be9bf637583b341a89af1b9924752abc7d49c94) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20devtool: reset: add ability to reset entire workspacePaul Eggleton
Add a -a/--all option to allow you to quickly reset all recipes in your workspace. (From OE-Core rev: 0c83788b111a761f6f500b86780cc51aed255402) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: fix broken clones of git recipesPaul Eggleton
Because we move the workdir when extracting source, then move the source and delete the temporary workdir, you lose the indirection symlink pointed to by the alternates file (which is created when the fetcher clones it from DL_DIR with -s) and the resulting repository is broken. In any case, for a source repo that the user may put their own changes into, we can't really rely on a clone made with -s in case the original goes away - because of cleanall, DL_DIR disappearing, etc. So repack the repository so that it is a complete, non-shared clone after unpacking. (While I'm at it, add a test for devtool modify with a git recipe which verifies that this works.) (From OE-Core rev: dccdde4321c48a571677995a4e1dfc583e899cbe) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: update-recipe: add handling for git recipesPaul Eggleton
When updating git-based recipes, in a lot of cases what you want is to push the changes to the repository and update SRCREV rather than to apply patches within the recipe. Updating SRCREV is now the default behaviour for recipes that fetch from git, but this can be overridden in both directions using a new -m/--mode option. (From OE-Core rev: 654792bb87610ee3569d02a85fa9ec071bf8ab6d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: build: run do_populate_sysroot instead of do_installPaul Eggleton
If you want to be able to make use of libraries in conjunction with devtool then we need to install them into the sysroot for other recipes to use. Make it a configuration option in case it needs to be changed at runtime. (From OE-Core rev: 94f517ad8e55edfbe6f06afd963bcfeb849626ff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: reset: run bitbake -c clean on recipePaul Eggleton
If you've added a new recipe, you want the output cleaned when you do devtool reset, otherwise cruft from building the recipe may remain which could interfere with future builds. (From OE-Core rev: 664d1a7fe8f8288fabc582d00f6e36ab29496ec5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25oeqa/selftest: populate pkgdata/shlibs in test_recipetool_create_gitPaul Eggleton
Build some recipes so that we have the needed data in the sysroot for recipetool to refer to when scanning for dependencies. (From OE-Core rev: 67bf1dac68d76c7e6a4d95e5bdd1eba468331f01) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25oeqa/selftest: improve failure messages for devtool testsPaul Eggleton
assertTrue prints "False is not True" if it fails, which is pretty much useless. Use a more appropriate assertion test where practical and add a message where it isn't. (From OE-Core rev: 0e0dd2575bb2a1b6f6c5eba1f8cfb0d81cc1b091) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23devtool: add QA testsPaul Eggleton
Add some QA tests for devtool (and recipetool). These aren't comprehensive but at least they are a start, and have already helped me catch and fix a number of regressions. (From OE-Core rev: 79486a8aea7af138535e139e696fbdbd5d57581b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>