aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2014-09-17sstatesig: fix overrides behaviour to remove SIGGEN_LOCKEDSIGS_i586Hongxu Jia
Require a sig file which SIGGEN_LOCKEDSIGS_i586 is not null, but the actual SIGGEN_LOCKEDSIGS_i586 is null. Invoking 'bitbake -e' and we got: ... 3935 # $SIGGEN_LOCKEDSIGS_i586 [2 operations] 3936 # set /path/to/locked-sigs.inc:8576 3938 # del data_smart.py:406 [finalize] 3939 # "" ... It was caused by the following commit: ... (Bitbake rev: 899d45b90061eb3cf3e71029072eee42cd80930c) Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue May 31 23:52:50 2011 +0100 bitbake/data_smart: Change overrides behaviour to remove expanded variables from the datastore ... We add prefix 't-' to type to workaround the overrides behaviour. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-09-17sstatesig.py: Replace '_'s with '-'s in SSTATE_LOCKEDSIGS* names.Randy Witt
Using underscores in the "types" parts of the variable names can cause unexpected issues with overrides. For example, if you have both SSTATE_LOCKEDSIGS_x86_64 and SSTATE_LOCKEDSIGS_x86_64_i586, and i586 is in OVERRIDES, then you lose all of the contents in SSTATE_LOCKEDSIGS_x86_64 and thus don't get some of the locked sstate. Using '-'s in the variable names instead, eliminates these issues. (From OE-Core rev: 6662c412a949a9f6b602c848e6303b19db7e5272) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-17sstatesig: Improve the support for locked down sstate cache usageHongxu Jia
Add code in the sstate hash validation code to ensure it really did install these from sstate since if it didn't should to warn/abort the build. The judgment condition is: 1) If a build is replaced by locked sstate-cache, it will triger a warn/error; 2) If objects are not used from the locked cache, it will triger a warn/error; 3) Use SIGGEN_LOCKEDSIGS_CHECK_LEVEL variable controls whether this is just a warning or a fatal error or nothing to report. [YOCTO #6639] (From OE-Core rev: 305912dce61c4fed0cbf631aa98a9e6f29db88e4) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-17sstatesig: Improve to handle locking of multiple machinesRichard Purdie
Instead of a single monolithic SIGGEN_LOCKEDSIGS, split this into separate variables, one per sstate package architecture. Add in a new SIGGEN_LOCKEDSIGS_TYPES variable which lists the package architectures to load in. SIGGEN_LOCKEDSIGS_TYPES is made machine specific using overrides. Also sort the hashes in the lists by PN to make diffing them easier. (From OE-Core rev: d8b0ce35981931a39e7db9d8e78de6e009b34688) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-17sstatesig/sstate: Add support for locked down sstate cache usageRichard Purdie
I've been giving things some thought, specifically why sstate doesn't get used more and why we have people requesting external toolchains. I'm guessing the issue is that people don't like how often sstate can change and the lack of an easy way to lock it down. Locking it down is actually quite easy so patch implements some basics of how you can do this (for example to a specific toolchain). With an addition like this to local.conf (or wherever): SIGGEN_LOCKEDSIGS = "\ gcc-cross:do_populate_sysroot:a8d91b35b98e1494957a2ddaf4598956 \ eglibc:do_populate_sysroot:13e8c68553dc61f9d67564f13b9b2d67 \ eglibc:do_packagedata:bfca0db1782c719d373f8636282596ee \ gcc-cross:do_packagedata:4b601ff4f67601395ee49c46701122f6 \ " the code at the end of the email will force the hashes to those values for the recipes mentioned. The system would then find and use those specific objects from the sstate cache instead of trying to build anything. Obviously this is a little simplistic, you might need to put an override against this to only apply those revisions for a specific architecture for example. You'd also probably want to put code in the sstate hash validation code to ensure it really did install these from sstate since if it didn't you'd want to abort the build. This patch also implements support to add to bitbake -S which dumps the locked sstate checksums for each task into a ready prepared include file locked-sigs.inc (currently placed into cwd). There is a function, bb.parse.siggen.dump_lockedsigs() which can be called to trigger the same functionality from task space. A warning is added to sstate.bbclass through a call back into the siggen class to warn if objects are not used from the locked cache. The SIGGEN_ENFORCE_LOCKEDSIGS variable controls whether this is just a warning or a fatal error. A script is provided to generate sstate directory from a locked-sigs file. (From OE-Core rev: 7e14784f2493a19c6bfe3ec3f05a5cf9797a2f22) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10oeqa/runtime: Automatic test for ptestLucian Musat
For images without ptest the packages are automatically installed alongside ptest-runner. Log results are saved in ./results folder. No cleanup is done for packages after the test is finished. Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-09-10oeqa/utils/logparser.py: results based log parser utilityLucian Musat
A module for parsing results based logs like ptest, compliance and performance. Supports breaking the logs into multiple sections and also provides a result object to use the parser with. The parser is initialized with the regex required to identify results and section statements in the target log file. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-09-10oeqa: Added package installer to oetest to aid in future automatic install ↵Lucian Musat
of packages Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-09-10package_manager.py: use RPM_PREFER_ELF_ARCHRobert Yang
Use RPM_PREFER_ELF_ARCH to instead of RPM_PREFER_COLOR as rpm upstream suggested, and use "4" to instead of "3" since it is a bit mask (not enumeration), so we need "4" here. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10package_manager: RpmPkgsList: determine rpm versionKévin THIERRY
Do not set the rpm_version to 5 if it is not provided, instead determine the real rpm version. (From OE-Core rev: 48beaee2e5b2b4ae35c596c19f8a38e0ff4427e9) Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-02package_manager: Add rpm v4 supportRichard Purdie
Currently the package manager code only supports rpm v5. To be useful outside of OE or with OE layers using v4, it makes sense to add in rpm v4 support. This takes a patch from "Bartosh, Eduard" <eduard.bartosh@intel.com> and enhances it to also include versions of the workarounds from poky-eurogiciel to allow rpm v4 usage with the class for image construction. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01oeqa: sstatetests should now look for glibc-initialKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2014-08-31package_manager.py: enable smart non-interactive modeEd Bartosh
Added --quiet option to smart command line. Without this option smart 1.4.1 turns into interactive mode, i.e. start asking questions and expecting answers. Internally within smart, this changes the default UI to one which just prints to stderr, the naming of the parameter is a little odd but does what we need. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29lib/oe/utils: Make multiprocess_exec() return anythingPeter Kjellerstedt
The variable "results" was accidentally used for multiple different things at the same time, which unintentionally discarded anything that was supposed to be returned from the function... Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29oeqa: xorg log test is being replaced by parselogs so removeRichard Purdie
Now we have the parselogs test, this one can be removed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29oeqa/pasrselogs: Improve the machine/string whitelistRichard Purdie
Currently the whitelist is imcomplete, inaccurate and suffers duplication. These changes: * Add common groups of errors * Change to make the default whitelist clear * Correctly (or at least better) escape the regexp expressions * Add in missing machines to allow builds on the autobuilder to suceed Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29oeqa/runtime: Automatic test for parsing the logs on a machine and search ↵Lucian Musat
for certain error keywords. This adds a common new qa test for general processing of log files. One significant improvement is machine dependent ignore filters. This can be used to replace several weaker individual QA tests that are currently used. Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27oeqa/sdk/buildsudoku.py: add setUpModule method to run only when gtk+ in ↵Corneliu Stoicescu
installed. Adding setUpModule in order to skip the module when gtk+ is not installed in the toolchain. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27oeqa/oetest.py: enable sdk tests to use hasFeature and hasPackage methods.Corneliu Stoicescu
In order to use the hasFeature and hasPackage methods, we need to make oeSDKTest extend oeTest and also set the test context (tc) attribute in the oeTest class when loading the tests. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23sstatesig: Only squash dependencies for allarch packagegroupsRichard Purdie
The idea of squashing packagegroup dependencies was to avoid allarch packages rebuilding upon tune/arch changes. Now that the allarch class inclusion is conditional, we can narrow down the packagegroup squashing to be specifically applied to allarch recipes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23lib/oe/utils: Add utils function for multiprocess executionRichard Purdie
Our usage of multitprocessing is problematic. In particular, there is a bug in python 2.7 multiprocessing where signals are not handled until command completion instead of immediately. This factors the multiprocess code into a function which is enhanced with a workaround to ensure immediate signal handling and also better SIGINT handling which should happen in the parent, not the children to ensure clean exits. The workaround for the signals is being added to the core bb.utils function so it can benefit all users. package_manager is then converted to use the new code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23oeqa/utils/httpserver: Reset SIGTERM handlerRichard Purdie
With bitbake-worker installing a SIGTERM handler, we now need to reset the one here to ensure that when this process shuts down, it doesn't take the rest of the task with it. This does appear to be the only place in OE that we have this problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18oeqa/sdk/: add sdk tests for sudoku, iptables and cvsCorneliu Stoicescu
Add test modules for sdk tests. NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18oeqa/utils/targetbuild.py: add support for sdk testsCorneliu Stoicescu
- Create new abstract class BuildProject that provides basic functionality for a project/package building class * contains abstract method _run() that needs to be implemented by all extending classes. - The old TargetBuildProject class now extends the abstract BuildProjct class - Introducing new SDKBuildProject that extends the abstract BuildProjct class NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18oeqa/oetest.py: enable sdk testingCorneliu Stoicescu
- add support for sdk tests in the loadTests and runTests methods - add new oeSDKTest test object NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11oe.package_manager: fix use of PACKAGE_EXCLUDE for dpkgChristopher Larson
It was iterating over the variable character-by-character rather than word-by-word. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11oeqa/runtime: add new cpp test and fileCorneliu Stoicescu
This tests out the limits header which we've noticed does have problems in some SDK builds. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11lib/oeqa/selftest: Don't match log level in outputTyler Hall
To facilitate changing the log level of the "Fetcher failure" message, search only for the message without the "Error:" prefix. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02package_manager.py: set preferred ABI for rpmRobert Yang
When using the RPM packaging backend to generate a rootfs there needs to be a way to configure the preferred ABI to resolve ELF file conflicts. Currently RPM resolves ELF file conflicts with the last-installed wins. Using SMART it's difficult to know what the last installed will be. There are three specific policies that can be selected: 1: ELF32 wins 2: ELF64 wins 3: ELF64 N32 wins (mips64 or mips64el only) Another option "0" is uncontrollable, which means that if two are being installed at once Elf64 is preferred, but if they're being installed in two different transactions, last in wins, so we don't document it. Add RPM_PREFER_COLOR to let the user config the preferred ABI. [YOCTO #4073] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-08-02oeqa/utils/decorators.py: add import osCorneliu Stoicescu
An 'import os' was omitted here while testing the previous decorators using runtime tests that import the os module before this one. Unfortunately oe-selftest fails because of this missing import. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-29selftest/buildoptions.py: fix QA_WARN test and add more output when failingCorneliu Stoicescu
The -ccleansstate should be done before building the package for the second time. Also printing the command output when failing. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-28lib/oe/rootfs: Improve error message whitespaceRichard Purdie
[YOCTO #6493] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25lib/oeqa: Fix accidental revert of codeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25oeqa/rutime: Added testcase decorators for automated runtime tests. Also ↵Lucian Musat
added LogResults decorator for oeTest class in oetest.py Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25oeqa/runtime: Added skipModule import for test modules that use it.Lucian Musat
The modules that use skipModule should import it themselves and not rely on somebody else to import it. Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25oeqa: Refactor test skipping decorators to use the unittest result objectLucian Musat
In order to make the test skipping decorators independent of the oeTest object we rely on the unittest result object to construct skip, fail and error lists used by these decorators. Created a new object getResults that analyses upper frames and retrieves the unittest result object instance, then return a list of failed, skipped and error tests. Also removed the oetest import from decorators.py because it was no longer required. Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25lib/oe/classextend: Avoid early expansion of PR valuesRichard Purdie
Variables like RDEPENDS can contain EXTENDPKGV which in turn uses AUTOPR based values. This gets set during do_package execution so we want to defer expansion until then. The only way we can do this in the RDEPENDS (and friends) mapping code is to subsitute a dummy value, then change it back again. Horrible but I can't see any other way. This resolves multilib build failures with inconsistent PR values. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23image.bbclass/rootfs.py: add variables to rootfs[vardeps]Roxana Ciobanu
Added base variables and package backend specific variables to rootfs[vardeps] in order for rootfs to rebuild when changes are made. Set some variables as [func] to inform bitbake that they are shell scripts, so that it invokes its shell dependency parsing. Without marking them as functions, changes in the actual function body would not trigger rootfs rebuilds. [YOCTO #6502] Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19rootfs: Remove the extraneous install directorySaul Wold
The /install/tmp diectory is created during installation by the smart package manager, we need to clean it up here [YOCTO #6497] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-17oeqs/selftest: Added test case decorators for toasterLucian Musat
Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-17oeqa: fix return status in pam.py to match shadow-4.2.1Chen Qi
The return statuses of commands like `su --help' or `passwd --help' in shadow 4.2.1 version are different from those in shadow 4.1.4.3 version. Now that we've upgraded shadow to 4.2.1, we need to fix these statuses in the pam.py to make things work as expected. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10lib/oe/image.py: check the rootfs size against IMAGE_ROOTFS_MAXSIZERobert Yang
* Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set) * Add comments for IMAGE_ROOTFS_SIZE to not confuse with IMAGE_ROOTFS_MAXSIZE [YOCTO #2610] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-10oeqs/selftest: Added test case decorators for the rest of selftest testcases ↵Lucian Musat
except toaster Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-03Added testcase decorator to use in logging. Added class decorator LogResults ↵Lucian Musat
that outputs test results in separate log file. Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03lib/oe/package_manager.py: Fix _pkg_translate_smart_to_oe functionMark Hatle
File: '/home/mhatle/git/oss/oe-core/meta/lib/oe/package_manager.py', lineno: 278, function: _pkg_translate_smart_to_oe 0274: 0275: if found == 1 and fixed_arch == fixed_cmp_arch: 0276: break 0277: #bb.note('%s, %s -> %s, %s' % (pkg, arch, new_pkg, new_arch)) *** 0278: return new_pkg, new_arch 0279: 0280: def _list_pkg_deps(self): 0281: cmd = [bb.utils.which(os.getenv('PATH'), "rpmresolve"), 0282: "-t", self.image_rpmlib] Exception: UnboundLocalError: local variable 'new_arch' referenced before assignment Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-30oeqa/selftest/_toaster.py: fix 'IndentationError' issuesIonut Chisanovici
There were some indentation errors when the _toaster.py was merged into master. This patch fix those errors. Signed-off-by: Ionut Chisanovici <ionutx.chisanovici@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-30oeqa/selftest/toaster.py: renamed to _toaster.pyIonut Chisanovici
In order not to run the toaster selftests by default, we renamed to _toaster.py Signed-off-by: Ionut Chisanovici <ionutx.chisanovici@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25lib/oe/package_manager.py: Add processing for alternative SDK_OSMark Hatle
For the meta-mingw layer, we need to process alternative SDK_OS, since this is not a Linux based OS. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25populate_sdk: Fix TOOLCHAIN_TARGET_TASK_ATTEMPTONLY implementationMark Hatle
The variable was only partially implemented, and the part that was there was named incorrectly to, missing the 'TASK' piece. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-24oeqa/targetcontrol.py: Separate the matching of supported image fstypes from ↵Corneliu Stoicescu
the resulting value check. Because we used a bb.fatal call inside the get_image_fstype classmethod, this caused problems when accessed without instantiating the object with a valid bb environment. Separating the matching part of the classmethod(that is usable by outside scripts) from the check of the resulting value. The matching is done within a new classmethod and the latter keeps the old method name and internal functionality, this way we don't have to change any other target controllers code. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>