aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/recipetool.py
AgeCommit message (Collapse)Author
2016-03-13oeqa/selftest/recipetool: Fix test_recipetool_create_simpleRichard Purdie
Correctly handle the any other files/directories that may exist during the test. ====================================================================== FAIL: test_recipetool_create_simple (oeqa.selftest.recipetool.RecipetoolTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 106, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/recipetool.py", line 414, in test_recipetool_create_simple self.fail('recipetool did not create recipe file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist))) AssertionError: recipetool did not create recipe file; output: NOTE: Fetching http://www.dest-unreach.org/socat/download/socat-1.7.3.0.tar.bz2... NOTE: Unpacking /srv/www/vhosts/autobuilder.yoctoproject.org/current_sources/socat-1.7.3.0.tar.bz2 to /tmp/recipetool-Uj7MIh/ NOTE: Recipe /tmp/recipetoolqaebTo9s/recipe/socat_1.7.3.0.bb has been created; further editing may be required to make it fully functional dirlist: ['socat', 'socat_1.7.3.0.bb'] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-13oeqa/recipetool: Fix syntax errorRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12oeqa/recipetool: Improve debugging output by adding dirlistRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: add basic support for extracting dependencies from cmakePaul Eggleton
Add support for extracting dependencies from CMakeLists.txt. There's still a bunch of things missing that are outside the scope of OE-Core and we still lack a proper extension mechanism, but this is a good start. This also adds an oe-selftest test to exercise the new code a bit. Implements [YOCTO #7635]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: improve extraction of pkg-config / lib depsPaul Eggleton
* The regexes for PKG_CHECK_MODULES / AC_CHECK_LIB were a bit too strict and thus we were skipping some macros. * Add support for PKG_CHECK_EXISTS * Avoid duplicates in warning on missing pkg-config dependencies * Ignore dependency on musl (since this may come up if it's the selected C library) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07oeqa/selftest/recipetool: update for libjpeg-turbo migrationRoss Burton
The recipe creation test of libmatchbox now depends on libjpeg-turbo, not jpeg. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-07selftest: Added testcase decorators for 2 testsDaniel Istrate
1391 for test_devtool_add_fetch_simple from devtool 1392 for test_recipetool_create_simple from recipetool Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-28oeqa/selftest: support sets in devtool comparisonsRoss Burton
The devtool and recipetool tests do literal string comparisons, but for some fields the ordering could be irrelevant and potentially non-deterministic. For example, the recipetool_create_simple test started failing with: AssertionError: 'GPLv2 Unknown' != 'Unknown GPLv2' : values for LICENSE do not match The ordering of the LICENSE field isn't relevant. So, if the expected value is a set(), split the string into a set too and compare those. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-22oe-selftest: add tests for simple devtool add / recipetool create URL casePaul Eggleton
Add an oe-selftest test case for the newly supported syntax with only the remote URL specified (auto-detecting name and version). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-22recipetool: create: support extracting name and version from build scriptsPaul Eggleton
Some build systems (notably autotools) support declaring the name and version of the program being built; since we need those for the recipe we can attempt to extract them. It's a little fuzzy as they are often omitted or may not be appropriately formatted for our purposes, but it does work on a reasonable number of software packages to be useful. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-24oeqa/selftest: Added testcase decorators.Daniel Istrate
Added testcase decorators for testopia integration. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24oe-selftest: replace assertTrue(False, ...) with fail(...)Paul Eggleton
I'd somehow missed the existence of fail() when I wrote these. It's preferable here so you don't get the somewhat useless "false is not true" message in the case of failure. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27oeqa/recipetool: allow templayerdir overrideChristopher Larson
This is provided for use by subclasses. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27oeqa/recipetool: add tests for appendsrcfile(s)Christopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27oeqa/recipetool: refactor / split out RecipetoolBaseChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-22oeqa/recipetool: add useful failure messages to test casesCostin Constantin
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07oeqa/selftest: Added @testcase decorators to oeselftest testcases.Daniel Istrate
Added decorator to some testcases missing this feature. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-27oeqa/recipetool: Fix symlink resolutionRichard Purdie
Instead of readlink we need to use realpath to resolve any possible symlink in the file name. I'd got the two confused in the previous patch. This should really fix selftest failures on the autobuilder. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26oeqa/selftest/recipetool: Fix appendfile_binary test on opensuse131Richard Purdie
On OpenSUSE 13.1, /bin/ls is a symlink to /usr/bin/ls. This means the test doesn't use a binary file an fails on that system. Ensure we resolve any symlink using readlink to avoid this failure. ====================================================================== FAIL: test_recipetool_appendfile_binary (oeqa.selftest.recipetool.RecipetoolTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/recipetool.py", line 115, in test_recipetool_appendfile_binary self.assertIn('WARNING: ', result.output) AssertionError: 'WARNING: ' not found in 'Parsing recipes..done.\nNOTE: Writing append file /tmp/recipetoolqai0NY8l/recipes-core/coreutils/coreutils_8.23.bbappend\nNOTE: Copying /bin/ls to /tmp/recipetoolqai0NY8l/recipes-core/coreutils/coreutils/ls' [YOCTO #7920] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-19oe-selftest: move recipetool tests to their own modulePaul Eggleton
These tests really belong in their own module; if we refactor out a base class from DevtoolTests with shared functions then we can move them out easily. Also create temp directory in setupLocal() so we don't have to do that in individual tests anymore. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>