aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2015-04-13package_manager: RpmPM: Fix scriptlet for rpm 4Jean-Benoit MARTIN
Path of rpm post install script is different between rpm 4 and 5 Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/runtime: Boot test for poky-tiny.Lucian Musat
Bug 6705. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/utils: Add runner for poky-tiny qemu.Lucian Musat
The connection and commands are done via serial. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/targetcontrol: Add support for poky-tiny in QemuTarget.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/runtime/smart: Added new decorators for existing automated tests.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/runtime/rpm: Added new decorators for existing automated tests.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/runtime/ping: Added new decorators for existing automated tests.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/runtime/parselogs: Added new decorators for existing automated tests.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/runtime/ldd: Added new decorators for existing automated tests.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09testimage: sort modules based on dependenciesPatrick Ohly
TEST_SUITES="auto" is useful to run all suitable tests without having to hard-code the list. However, it did not take test dependencies into account, which can be an issue for tests which really depend on some other test to run first. To fix this, modules get loaded in the order determined by TESTS_SUITES, but then get re-ordered based on dependencies derived from @skipUnlessPassed before running them. The original order is used to break ties when there are no dependencies, so reordering only occurs when really necessary. @skipUnlessPassed gets extended such that it makes the test name a method depends on available for inspection by the test loader in oetest.py. Unfortunately Python's unittest offers no API to inspect tests in a TestSuite, so the code has to rely on implementation details to find all tests. The worst that can happen when the implementation changes is that tests are not found and reordering does not happen. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/runtime/systemd.py: skip instead of failing without avahiPatrick Ohly
The SystemdServiceTests assume that avahi-daemon is installed, which is not necessarily the case depending on the image being tested. Better check this dependency before starting the tests and skip them if the service is not installed. This has to be done for each test instead of for the entire module, because other tests in the module can run without avavi. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09oeqa/oetest.py: use bb loggingPatrick Ohly
Plain print has two drawbacks: - the output is handled by different processes, causing the message about found tests to appear randomly after the result of the initial tests - the output is not part of the bitbake console output Affects image testing with testimage.bbclass. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-09lib/oeqa/selftest/bblayers: improve test for add-layer and remove-layerYi Zhao
Use absolute path instead of relative path for meta-skeleton. Otherwise the case would fail if the builddir outside the poky source tree. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-06oe.sstatesig: align swspec handling with sstate.bbclassChristopher Larson
The logic tries to remove the -native suffix from pn to handle this (though it doesn't succeed, as it doesn't assign the new pn to the variable), but we need to do more for the swspec tasks than just not set the extrapath, we also need to change from SSTATE_PKGSPEC to SSTATE_SWSPEC. Alter to correct the spec for these cases, and also add preconfigure to align with the current logic in sstate.bbclass, which includes that task as well in the list of tasks to adjust to use swspec. [YOCTO #7563] Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-06meta/lib/oe/utils.py: Corrected the return value of both_contain()Jun Zhu
oe.utils.both_contain() should return the result as "checkvalue" or "", but the latest implement returns as "set(['checkvalue'])" or ""; It causes that bitbake.conf generates the wrong result of COMBINED_FEATURES, which contains the common components in both DISTRO_FEATURE and MACHINE_FEATURES. For example, build in Dizzy branch, COMBINED_FEATURES is "alsa usbhost ...", but recently, COMBINED_FEATURES is like "set(['alsa']) set(['usbhost']) ...". Signed-off-by: Jun Zhu <R01007@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-02package_manager: call createrepo with --dbpath pointing inside WORKDIREd Bartosh
Rpm database in staging area is used only by createrepo. createrepo fails with the error "rpmdb: BDB0060 PANIC: fatal region error detected" if rpm database is broken during previous run of createrepo. Made createrepo to create rpm db in $WORKDIR/rpmdb/ from scratch for every build and architecture. This should potentially fix the failure as every run of createrepo will be using separate db. [YOCTO #6571] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-24package_deb: DpkgIndexer use apt-ftparchive that needs a valid configAndreas Oberritter
Since we have support of log checking in deb/ipk [1] rootfs generation in non Debian-based hosts fails because apt-ftparchive generates a Warning when not find /etc/apt/apt.conf.d/ (available in Debian-based hosts). package_manager.py: DpkgPMIndexer add support for generate and export apt configuration. [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=86aec93902af2e2d7d73ca9a643707fcca45055c Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-24rootfs.py: Also uninstall update-alternatives and shadow for read-only-rootfsAndreas Oberritter
This brings back commit d41097a970e9bfa553cd4bc3c9fad4b9073d7bd5, which got lost during transition from image.bbclass to rootfs.py. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-22lib/oe/lsb.py: Prioritize parsing of /etc/os-releaseEd Bartosh
Moved parsing of /etc/os-release before parsing of /etc/SuSE-release as /etc/SuSE-release is deprecated in recent releases of OpenSuSE. Here is the quote from /etc/SuSE-release: /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-22rootfs.py: add log checking ability for deb and ipkChen Qi
Extract the common codes of log checking and add the ability of log checking for deb and ipk package backend. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-22rootfs.py: two changes regarding log checkingChen Qi
This patch involves two changes. 1. Extend the regular expression to also catch '^WARNING:' in _log_check_warn. Warnings from bb.note or bbnote begin with 'WARNING:'. So if we decide to catch warnings at rootfs time, we should not ignore those produced by the build system itself. 2. Delay _log_check in rootfs process so that more warnings are likely to be catched. Note that we should at least delay the _log_check after the execution of ROOTFS_POSTPROCESS_COMMANDS, because we want to catch warnings there. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21oeqa/runtime: Added a new auto rpm testLucian Musat
The test tries to query the rpm list with a non-root user Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21oe-selftest: use spaces to indent python code, not tabsPaul Eggleton
Indenting-only change. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20package_manager: Create variable for install_dir_nameSaul Wold
This patch creates a variable for the install_dir name so it can be something other than /install, also by doing this we can correctly clean up the empty directories (/install/tmp) during the clean-up phase. The new default is /oe_install so as to not conflict with other possible packages that might use /install to place files. [YOCTO #7353] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20lib/oeqa/selftest/lic-checksum: Add INHIBIT_DEFAULT_DEPSRandy Witt
The test_nonmatching_checksum doesn't need the default dependencies, and they would just take extra time to generate. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20lib/oeqa/selftest/lic-checksum: Rename test_fooRandy Witt
test_foo is renamed to test_nonmatching_checksum. It was a mistake to submit it with the old name. There was also some extra whitespace removed. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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>
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20meta/lib/oe/package.py: fix files ownership in packagesFabrice Coulon
This fix solves the problem with the ownership of files in packages. The do_install task was producing correct and expected output but when the files were being put in, e.g. a rpm package, the ownership could be different than that in the do_install task. [YOCTO #7428] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Fabrice Coulon <fabrice.coulon@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oeqa/runtime: Fixed a problem in logparser where it failed to whitelist some ↵Lucian Musat
common errors. And some minor tweaks like moving some errors from qemu to common. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oe-selftest: improve bitbake-layers testsPaul Eggleton
* Add a test for add-layer and remove-layer * Correct message for test_bitbakelayers_showoverlayed() * Improve test_bitbakelayers_flatten() to use a more unique name for the temp output directory and clean it up using track_for_cleanup() Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16rootfs.py: fix logic error so that warnings are checkedChen Qi
The following commit caused log checking for warnings not working for RPM rootfs. rootfs.py: ignore "NOTE:" when catching warnings The problem is that checking for warnings is always skipped because the following statement is always true. if 'log_check' or 'NOTE:' in line: This patch fixes the above problem so that warning checking in RPM rootfs can work again. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16lib/oeqa/runtime/systemd: Add a basic runtime test for the journalRandy Witt
The test_systemd_journal() test will fail if journalctl exits with a non-zero exit status. The exit status is non-zero even if there are no journal files, which is what drove the creation of this test. [Yocto #7388] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-12oeqa/parselogs: Skip hda opcode errorsRichard Purdie
These occur when running images under virtualisation on machines with high load which sometimes trigger timeouts in the kernel DMA code. They're harmless to ignore in these cases. Adding this since "failing" the build due to this is more annoying thank useful. [YOCTO #7387] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-09oeqa/selftest: Added a testcase to verify INCOMPATIBLE_LICENSE option.Lucian Musat
Fixes bug 6933 Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09lib/oeqa/selftest/lic-checksum: Verify failure when checksum changes.Randy Witt
The test added verifies that when a file with an absolute path in LIC_FILES_CHKSUM changes without a corresponding change to the md5sum, it triggers the license qa test again with a failure. [Yocto #6450] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09meta/lib/oe/utils.py: properly implement both_contain()Cristian Iorga
oe.utils.both_contain() just does a find() on the value rather than splitting the value and then looking in the list of split items. The result is that if you add a feature to MACHINE_FEATURES that itself has a substring that matches one of the values looked for when building COMBINED_FEATURES, you end up with an incomprehensible error (here with "ext2i" in MACHINE_FEATURES): ERROR: Nothing RPROVIDES 'packagegroup-base-ext2' (but /home/balister/src/oe-core/oe-core/meta/recipes-core/ /packagegroups/packagegroup-base.bb RDEPENDS on or otherwise requires it) Fix [YOCTO #6888]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-26lib/oe/terminal: fix konsole terminal support for KDE 4.xPaul Eggleton
It seems that the --nofork option genuinely stops konsole from going into the background now; I'm not sure when this changed but it does seem to be working so we can use it. (Tested with Konsole 2.10 and 2.14.2). Fixes [YOCTO #4934]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-26lib/oe/terminal: fix regressionsPaul Eggleton
Fix up some issues introduced by OE-Core commit 818c94f5b9882c2028ef9f056714a0a3c9045551: * If we want to support versions with more than two parts, versions with only one part, or versions with non-integer parts, then we have to stay with strings. We can use distutils.version.LooseVersion() to help with comparisons. * We don't want a warning when launching gnome-terminal 3.10+ and logger.warn() doesn't take a first integer parameter anyway (logger.debug() does). * Also clean up tabs. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24terminal.py: No --disable-factory for gnome-terminal >= 3.10Sven Ebenfeld
--disable-factory has been disabled in earlier versions of gnome-terminal but from version 3.10 it raises an error and quits. This makes devshell unusable with gnome-terminal >= 3.10. This patch checks for the version and removes --disable-factory if you have the terminal version 3.10 or higher. Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23copy_buildsystem.py: Add methods to copy shared state.Randy Witt
Added the helper functions necessary to copy the sstate from the current build, and generate the file to "lock" it. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23copy_buildsystem.py: Add a way to copy buildsystem to a directory.Randy Witt
This file provides a way to take bitbake and the layers in the current build and copy them to a target specified. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23sstatesig: Add ability to filter list of tasks for locked-sigs.incPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.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.) 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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23lib/oe/recipeutils: minor improvements to patch_recipe()Paul Eggleton
* Ensure it knows where to put SRCREV and S * Handle prepend/append and functions in general Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>