aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2014-01-19sstatesig: include native/cross/nativesdk deps in target signaturesMartin Jansa
* I don't have any real evidence or good statistics for this, but when comparing signature dumps from my big bitbake world builds I usually see a lot of rebuilds caused by changes in .bbclasses and only very rare would be the case where oe-core upgrade brings changes in -native recipes and no change in .bbclasses used from target recipes * changing the default to include them shouldn't cause significant increase in rebuilds and sstate reuse a bit safer * people working on toolchain (e.g. using gcc from AUTOREV) can easily extend sstate_rundepfilter to ignore them again (it's easier than removing existing filter), example how add own signature handler in your layer is here: https://github.com/openwebos/meta-webos/commit/9ac3a7c803e7793b3274e4998f167b6278db8042 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-17oe-selftest: Patch sstate tests to work with new sstate-cache naming and contentCorneliu Stoicescu
Made modifications to account for: - .siginfo files present in sstate-cache from non sstate-enabled tasks - new naming format for sstate files Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-16lib/oeqa: allow a layer to provide it's own TEST_TARGET classStefan Stanacar
Allows a layer to define new classes in <layer>/lib/oeqa/utils/controllers.py and completely control or extend deployment of a target. (core currently has QemuTarget and SimpleRemoteTarget). The value of TEST_TARGET must be the name of the new class. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-16oe-selftest: separated the SStateBase and SStateTests in different modulesCorneliu Stoicescu
- SStateBase now has its own module to be imported by itself by other modules like sstatetests.py Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-16oe-selftest: renamed sstate.py module to sstatetests.pyCorneliu Stoicescu
Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-16oe-selftest: New object SStateBase cut off from SStateTests.Corneliu Stoicescu
- SStateBase object contains basic methods used to run sstate related tests - SStateTests now contains only sstate-related tests Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-14oeqa/runtime/systemd: wait for services to start/failRoss Burton
When checking that no services have failed to start, actually wait for services to finish starting by waiting for there not be no units in the "activating" state. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-01-06lib/oeqa/runtime: add test for pythonTing Wang
Run a python script on the target 1)checks the output. 2)Call os.system method create a testfile Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-01-06oe-selftest: New tests for sstate related operationsCorneliu Stoicescu
Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-01-02meta/lib/oe/terminal.py: Don't pass non-supported '--disable-factory' flag ↵Jacob Kroon
to gnome-terminal By default, all GNOME terminals share a single process, reducing memory usage. This can be disabled by starting gnome-terminal with the --disable-factory option However, gnome-terminal in Fedora 20 does no longer support the '--disable-factory' flag, so remove it. As the support for 'mate' terminals was added as a copy of the gnome code in 8cc078a9c679845464c59028f584d7aba098cc1f, remove the flag here aswell. Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20sstate/sstatesig: Add populate_lic to list of arch invariant sstate tasksRichard Purdie
Like fetch, unpack and patch, populate_lic doesn't vary between different archs so we should mark it as such. This means better sstate cache reuse with fewer duplicate files as well as less confusing sstate debugging. sstatesig also needs to account for the fact BPN is used for sstate files in these cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20lib/oeqa/runtime: rewrite the systemd test moduleStefan Stanacar
They are basically the same tests but: - they look cleaner, using one single method / assert - output from unittest will be cleaner (and includes a verbose status when needed) - they are better grouped and use a real, active, enabled service (machineid will be dropped and hostnamed was a static service) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-20oe-selftest: added buildhistory buildtime tests in module buildoptions.pyCorneliu Stoicescu
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-20oe-selftest: New test module for OE scripts.Corneliu Stoicescu
Added a new module meta/lib/oeqa/selftest/oescripts.py containing tests for scripts from ${COREBASE}/scripts Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-20oe-selftest: New BuildhistoryBase object for buildhistory testing.Corneliu Stoicescu
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-20sstatesig: Correctly handle matches spanning stamps and sstatedirRichard Purdie
By resetting filesdates at this point, we lose matches from stamps which may not have been in sstatedir. When we don't have hashes specicifed, its better to return all matches and have the caller decide which are relavent and which are not since this function has no ability to decide. There will almost always be one match from stamps we need to keep and refer to. (From OE-Core rev: f4c1c9ad2c7e944d4926d0629611da97f9df6a9a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20sstatesig: Update for the removal of sstate-nameRichard Purdie
We've dropped sstate-name so we can remove this code. The fallback was incorrect since we use taskname without the do_ prefix so this patch updates to account for that too. (From OE-Core rev: 72ff58124081333d46d37f31f2d1bf40d715e3bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20sstatesig: Ensure we return all matches for find_sigdataRichard Purdie
When the hashes to find isn't specified we need to return matches from both the sstate cache and the local stamps directory regardless of how many we've found so far. If we don't do this, we can miss stamps and the comparison is less accurate/incorrect. (From OE-Core rev: 08a074e11e2d517b81ca71fd9bda65297bb015a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14lib/oeqa/runtime: systemd failure case improvementsRoss Burton
If the hostnamed service can't be started or stopped, show the output from systemctl status to assist debugging. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-14oe-selftest: Add track_for_cleanup method to be used in cleanup tasksCorneliu Stoicescu
Added a track_for_cleanup(path) method that removes the given path in the tearDown method. This mechanism can be used to make sure a file or directory we created will be removed at the end of a test, regardless of what happens. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-14oe-selftest: implement add_command_to_tearDown methodCorneliu Stoicescu
Add a new method that can be used by the tester to add a command to the executed in the tearDown stage of the test. This mechanism can be used to make sure certain test-specific cleanup tasks are done in the case of a test failure. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-05lib/oeqa/runtime: output more logging from systemd when services have failedRoss Burton
If some services have failed to start, get the status of them and some of their log to help debug the problem. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05lib/oeqa/runtime: print connman status if connman failed to startRoss Burton
If connman isn't running and we're running under systemd, use systemctl to get the state according to systemd and the end of the connman log. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05lib/oeqa/selftest: add tests for PR serviceCorneliu Stoicescu
Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05lib/oeqa/selftest: buildoptions: small fixes for some testsStefan Stanacar
While harmless, we should overwrite the config not append to it, and use m4 as target, otherwise the WARN check will build an entire image and we are not interested in that. Also add an output check for the WARN_QA test. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-04lib/oeqa/selftest/base, scripts/oe-selftest: fix wrong remove path and do a ↵Stefan Stanacar
complete cleanup at the end The script should clean-up all the .inc files that might have been created by tests regardless of the outcome or if the script is interrupted. (currently the last test will leave a conf/selftest.inc around, even if it's not included anywhere) Also fix delete_recipeinc to actually delete what's supposed to. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03lib/oeqa: targetcontrol.py: add abstraction for running tests on different ↵Stefan Stanacar
targets Add a new module which abstracts the target object used by testimage.bbclass The purpose of this module is to move the deployment of a target from testimage.bbclass, basically abstracting different implementations of how we setup a target and how it runs commands. It allows to select one implementation or another by setting TEST_TARGET (currently to: "qemu" and "simpleremote"). QemuTarget is used to start a qemu instance (as it's currently done in testimage.bbclass) SimpleRemoteTarget is meant for a remote machine (by setting TEST_TARGET_IP) that's already up and running with network and ssh. Simply put, it opens the door for running the tests on different types of targets by adding new classes (maybe qemu-nfsroot or remote-special etc.). One could also override BaseTarget which currently uses the existing SSHControl module and add a serial implementation. [ YOCTO #5554 ] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03testimage: use the new targetcontrol.py module for running testsStefan Stanacar
This patch makes the necessary changes for using the targetcontrol.py module so that one can run the same tests on a qemu instance or a remote machine based on the value of TEST_TARGET variable: "qemu" or "simpleremote". The default value is "qemu" which starts a qemu instance and it's the with what we currently have. With "simpleremote", the remote machine must be up with network and ssh and you need to set TEST_TARGET_IP with the IP address of the remote machine (it can still be a qemu instance that was manually started). Basically testimage.bbclass now does something along the lines of: - load tests -> deploy (prepare) / start target -> run tests. There were a couple of changes necessary for tests and also some cleanups/renames that were needed to adjust this change. (use ip everywhere when refering to target and server_ip when refering to host/build machine) Also two unnecessary and unsed methods were dropped from sshcontrol. [ YOCTO #5554 ] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03lib/oeqa: use the new manifest file for determining if a package is installedStefan Stanacar
Use the new manifest file instead of ${WORKDIR}/installed_pkgs.txt for determining if an image has a certain package, because installed_pkgs.txt goes away with rm_work enabled. We can't use the IMAGE_MANIFEST var for the file path because that relies on IMAGE_NAME which changes at every run (because of date), so we use the link which points to the last one built. [ YOCTO #5072 ] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03lib/oeqa/selftest: add test modules for expected bitbake output and ↵Corneliu Stoicescu
bitbake-layers Tests for bitbake-layers and expected output for some bitbake options. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03lib/oeqa/selftest: buildoptions.py: add simple image build testsAlexandru Palalau
Build images and tests different build options like RM_OLD_IMAGE and for WARN_QA/ERROR_QA behaviour. Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@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>
2013-12-03classes/buildhistory: add additional variables to image informationPaul Eggleton
Add PACKAGE_EXCLUDE and NO_RECOMMENDATIONS to the info we track for images, since these can change what ends up in the image. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29sstatesig.py: Fix image regeneration issueRichard Purdie
With the "ABI safe" recipes, we've been excluding those from signatures. This is fine in the general case but in the specific case of image recipes it breaks. A good test case is the interfaces file. Editting this causes init-ifupdown to rebuild but not an image containing it (e.g. core-image-minimal). We need to ensure the checksums are added to the image recipes and this change does that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-21oeqa/connman: disable unique testRoss Burton
The connman unique test starts another instance of connmand and then does a ps to verify that there's only one of these running, on the assumption that the new one has quit because there's already one running (started by init). However, connmand is forking into the background straight away so there's a race between running ps and the second connmand discovering the first and exiting. This race can be seen because the test displays the output of ps, and by the time that second ps has been executed the new connmand has exited. This is a classic race condition and on a heavily loaded autobuilder inserting an arbitrary sleep isn't wise. In the scheme of things this test isn't very useful, so delete it. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18buildhistory_analysis: fix error when comparing image contentsPaul Eggleton
OE-Core commit b7de1eaac9eed559b2d68058f5de67de74a6cb58 added an extra argument to the compare_dict_blobs() function but missed adding the argument to one call to compare two versions of the image-info.txt file. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12lib/oe/path: Fixup handling of .* files in top level paths for ↵Richard Purdie
copyhardlinktree() Files named .* in the top level of directories handled by this function were getting lost after the directory copying command was fixed. Rather than complicate the function further, use cpio instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12lib/oe/path: Fix performance issue got copyhardlinktree()Richard Purdie
With the directory copy was added to avoid race issues, it wasn't noticed that tar was recursing the directories and copying files too. This is completely crazy when we hardlink those files in the next command. Resolve the issue by telling tar not to recurse. This gives a significant performance boost to various parts of the system (do_package for linux-yocto 256s -> 178s for example). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-08lib/oeqa/utils: sshcontrol: make timeout depend on outputStefan Stanacar
Instead of running the commands with a fixed timeout, we should kill the command if there is no output for timeout seconds. Also changed some strings/comments. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-11-08lib/oe/sstatesig: Ensure packagegroups don't continually rebuildRichard Purdie
packagegroups are allarch and shouldn't change depending on the target or machine selected. In general they should have good stable namespaces for their dependencies. As such we can exclude them from rebuilding when dependency checksums change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-11-04lib/oeqa: add oeTest superclassStefan Stanacar
Add oeTest superclass, make oeRuntimeTest inherit that and make the necesarry adjustments. Tests in lib/oeqa/runtime don't change, they still inherit oeRuntimeTest. We should do this because oetest.py in the future can be a base module for more stuff than oeRuntimeTest. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-26buildhistory-diff: add ability to report version changesPaul Eggleton
Add a -v/--report-ver option to report changes in PKGE/PKGV/PKGR even if the value is the same as the default from PE/PV/PR. Also add a -a/--report-all option to report all changes instead of just the default significant ones. Addresses [YOCTO #5263]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-18lib/oeqa/runtime: build kernel module on target testStefan Stanacar
Builds a simple Hello World module on target. Added to the defaults for core-image-sato-sdk. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-11lib/oe/path: Fix copytree functions for tar 1.27Richard Purdie
tar version 1.27 returns: tar: --same-order option cannot be used with -c with the commandlines we have been using. We can remove the -s option (which is --same-order) to remove the error. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26lib/oeqa/runtime: ping: wait for 5 echo repliesStefan Stanacar
Instead of considering that ping test passed after 1 reply, wait for at least 5 consecutive replies in 60 seconds (which should be enough time for connman to reconfigure the interface in systemd images and help with the fake ssh/tests fails.) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-20lib/oeqa/runtime: cleanup and improve output readability for some testsStefan Stanacar
- move everything in the same test. setUp/tearDown aren't quite the right thing here, everything it's part of the same test. (and it get's confusing when ssh fails) ldd: - change test name and add output to error message vnc: - remove unnecessary check as there is no point in doing both ps and netstat. Also improve error output a bit. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-20lib/oeqa/utils: sshcontrol: log how long the last command takeStefan Stanacar
It might be useful for debugging to have in the ssh log the number of seconds a command has run. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18qemurunner: disable grabs in automated testingRoss Burton
Use the new QEMU_DONT_GRAB environment variable to disable grabs, finally/hopefully solving the random hangs that the autobuilder has been hitting for a while. [ YOCTO #5131 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17oeqa/runtime/smart: Increase timeout to 1500 testSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13lib/oeqa/runtime: timeout increasesStefan Stanacar
Increase the timeout for smart commands as under load for qemumips it's still to small. Also give ping more time fixing a potential timeout for sato systemd. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>