summaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
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>
2014-06-19sstatesig: Add try/except around the stat callsRichard Purdie
Its possible sstate symlinks to other sstate mirrors which then my get removed/cleaned. If we find invalid symlinks, skip over them rather than error with a backtrace. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13controllers/masterimage.py: Make testimage kernel naming pattern universalCorneliu Stoicescu
YB: #6254 The QemuTargetControl class does not specify any kernel naming but the runqemu script it uses uses the " KERNEL_IMAGETYPE + MACHINE + '.bin' " naming scheme. Modifying the other major target controller class, MasterImageHardwareTarget, to use the same kernel naming scheme. This is usefull also to outside scripts that want to anticipate the kernel file name for all target controllers. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13oeqa/controllers/testtargetloader.py: add 'import os'Corneliu Stoicescu
YB: #6254 This module uses os but relies on other modules to import it. Adding 'import os' in order to be self-sustained. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13targetcontrol.py: Add a classmethod to get extra files needed by the target ↵Corneliu Stoicescu
controllers YB: #6254 Add a new classmethod that can be used by outside scripts to get the extra files needed by the target controllers. An outside script can predict rootfs, manifest and kernel files needed by a target controller, but sometimes there are other files needed. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13masterimage.py: enable dynamical determination of rootfs typeCorneliu Stoicescu
YB: #6375 Adding support for get_image_fstype() in the MasterImageHardwareTarget and GummibootTarget classes. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13targetcontrol.py: make possible dynamical determination of rootfs typeCorneliu Stoicescu
YB: #6375 Added a new method get_image_fstype() that autodetermines what fstype to use for the rootfs file. This method uses a new list variable 'supported_image_fstypes' that contains image fstypes supported by the target controller. This method is also a classmethod which means outside scripts can get the image fstype. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13rootfs.py: change the logic in _uninstall_unneededChen Qi
Previously, if we have 'package-management' and 'read-only-rootfs' both in IMAGE_FEATRUES, we would meet the following error at system start-up. rm: can't remove '/etc/rcS.d/S99run-postinsts': Read-only file system However, what's really expected is that when there's no postinstall script at system start-up, the /etc/rcS.d/S99run-postinsts should not even be there. Whether or not to remove the init script symlinks to run-postinsts should not depend on whether we have 'package-management' in IMAGE_FEATURES; rather, it should only depend on whether we have any postinstall script left to run at system start-up. This patch changes the _uninstall_unneeded function based on the logic stated above. [YOCTO #6257] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10oeqa/utils/commands.py: add support for postconfig optionCorneliu Stoicescu
Adding support for postconfig option to the bitbake() and related methods. This enables us to use 'bitbake -R postconfig_file <command>'. Usage: bitbake(cmd, postconfig="some confguration") 'postconfig_file' would contain what we add in 'postconfig' Other methods affected: get_bb_env(), get_bb_var() Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-06-06Added new test cases for bitbake modes (-e -n -p -r -R -c -k)Lucian Musat
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-06-01classextend: Fix crosssdk remapping for multilibRichard Purdie
Multilib builds only require one crosssdk toolchain. We therefore shouldn't be remapping crosssdk names. This resolves build failures looking for weird multilib crosssdk toolchains. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-30toaster: toaster oe-selftest supportIonut Chisanovici
This patch adds toaster tests using the oe-selftest infrastructure. You need to have builds done - the tests will verify data integrity after the toaster collection phase. Once you have your toaster builds done, to run the automated backend tests via oe-selftest do the followings: 1. Update builddir/conf/bblayers.conf to contain the meta-selftest layer 2. From the builddir run: 'oe-selftest toaster' or if you just want to run a single test: 'oe-selftest toaster.Toaster_DB_Tests.testname' This first part adds the meta/lib/oeqa toaster file. Signed-off-by: Ionut Chisanovici <ionutx.chisanovici@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-29sstatesig: Move saferecipedeps handling to be earlierRichard Purdie
We want to use the saferecipedeps handling code to allow gcc-cross-* to work on multiple different tunes. Its currently in target only code so it needs to be earlier to allow it to work on native-> target dependencies. This change has no effect on existing uses but makes gcc-cross become shared as desired. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-11classes/lib/oe: Fix cross/crosssdk referencesRichard Purdie
With the renaming of the cross packages, its no longer possible to use endswith("-cross") and similar to detect cross packages. Replace these references with other techniques. This resolves certain build from sstate failures which were due to the system believing cross packages were target packages and therefore dependency handling was altered. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-08package_manager: Fix NoneType Object on do_populate_sdkRicardo Ribalda Delgado
PACKAGE_EXCLUDE can be not defined or empty, leading to a build error. File: '/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/meta/lib/oe/package_manager.py', lineno: 1649, function: _create_configs 1645: "Pin-Priority: %d\n\n" % (arch, priority)) 1646: 1647: priority += 5 1648: *** 1649: for pkg in self.d.getVar('PACKAGE_EXCLUDE', True).split(): 1650: prefs_file.write( 1651: "Package: %s\n" 1652: "Pin: release *\n" 1653: "Pin-Priority: -1\n\n" % pkg) Exception: AttributeError: 'NoneType' object has no attribute 'split' ERROR: Function failed: do_populate_sdk ERROR: Logfile of failure stored in: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/meta-toolchain/1.0-r7/temp/log.do_populate_sdk.21363 NOTE: recipe meta-toolchain-1.0-r7: task do_populate_sdk: Failed Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-08package_manager: Fix Argument list too longRicardo Ribalda Delgado
Function buildhistory_list_installed_image fails with error "Argument list too long". This patch uses a temporal file to pass the package list to opkg-query-helper.py File: '/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/meta/lib/oe/package_manager.py', lineno: 421, function: list 0417: try: 0418: output = subprocess.check_output("echo -e '%s' | %s" % 0419: (output, opkg_query_cmd), 0420: stderr=subprocess.STDOUT, *** 0421: shell=True) 0422: except subprocess.CalledProcessError as e: 0423: bb.fatal("Cannot compute packages dependencies. Command '%s' " 0424: "returned %d:\n%s" % (e.cmd, e.returncode, e.output)) 0425: Exception: OSError: [Errno 7] Argument list too long ERROR: Function failed: buildhistory_list_installed_image ERROR: Logfile of failure stored in: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/qt5022-poky-linux/qimage-dev/1.0-r0/temp/log.do_rootfs.16747 NOTE: recipe qimage-dev-1.0-r0: task do_rootfs: Failed ERROR: Task 7 (/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/../qtec/meta-qt5022/recipes-core/images/qimage-dev.bb, do_rootfs) failed with exit code '1' NOTE: Tasks Summary: Attempted 4999 tasks of which 30 didn't need to be rerun and 1 failed. NOTE: Writing buildhistory Auto packing the repository for optimum performance. Summary: 1 task failed: /var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/../qtec/meta-qt5022/recipes-core/images/qimage-dev.bb, do_rootfs Summary: There were 74 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-04sstatetests: Use TUNE_ARCH instead of TARGET_ARCHRichard Purdie
The scripts extact variable values from bitbake -e. Unfortunately TARGET_ARCH is unset from that environment so we use TUNE_ARCH instead which will have the value we need. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-04sstatetests: Update after binutils-cross name change with PN additionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30oeqa: add proper handling for command errors where neededPaul Eggleton
For use outside of tests themselves, we want a better error than AssertionError, so create one and allow us to request it when calling runCmd(). This enables us to avoid tracebacks during master image operations if the power control command fails. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30classes/testimage: if start fails, don't try to stopPaul Eggleton
If we couldn't start the target, it doesn't make sense to try and stop it here since logically it shouldn't now be in any kind of "started" state. (It's the start function's job to clean up after itself if it fails - to that end, fix up the QemuTarget class so that it does.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30oeqa/controllers/masterimage: more robust master image startupPaul Eggleton
Instead of powering up the target when the object is constructed, wait until deploy is called. Then there are basically two different scenarios: a) The device is booted into the master image already, in which case we can just use it b) The device is booted into another image or can't be contacted, in which case we need to power cycle it. Here we also now wait until it has booted up instead of trying to contact it immediately. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30oeqa/controllers/masterimage: add a serial control commandStefan Stanacar
Similar to power control command, this depends on a user's setup to get to the serial port of a board. For a local connected board this could just be: TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" and for a serial console server: "telnet 10.11.12.13 7003" or some conmux command. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30oeqa/targetcontrol: restart method shouldn't be abstractStefan Stanacar
And drop the un-needed and un-used restart methods. Only qemu ever used this and actually does it safely. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30oeqa/controllers/masterimage: add a base class for hw targetsStefan Stanacar
Right now GummibootTarget is the only hardware TEST_TARGET with deployment, but we will add more, so let's make an abstract base class, that will do the common thing for all the hw targets. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30lib/oe/sdk: Ensure target directory exists before creating the linkRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-29oeqa/utils: sshcontrol: realtime logging of outputStefan Stanacar
Log the output of the command as it runs not when it finished, else tail -f tmp/work/minnow-poky-linux/core-image-sato/1.0-r0/testimage/ssh_target_log isn't as useful as it could be. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-04-25Globally replace oe.utils.contains to bb.utils.containsOtavio Salvador
BitBake has the exact same code as oe.utils.contains so there's no reason to duplicate it. We now rely on the bb.utils.contains code for metadata. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23make menuconfig work for recent xfce environmentAndreas Müller
xfce terminal was renamed 'Terminal' -> 'xfce4-teminal' mainline end of 2012, so the distros supporting 'Terminal' will dissapear. The distros not mentionied in __init__ do (e.g fedora 19 - tested) fail - or will fail sooner or later. Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23selftest: DiskMonTest: use a high value for free spaceStefan Stanacar
Using the free space of the host works when oe-selftest is the only build running, but if something else on the host remove things this will fail (as seen on AB). Using an absurdly high value should fix this. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>