summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/oe/package_manager.py: check that package list is not emptyLaurentiu Palcu2014-02-111-1/+7
| | | | | | | | | | If we're just attempting to install packages and the package list is empty, just return. (From OE-Core rev: 8bf5d80e3502a71fdda688aace0799b47ae19b3b) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py, package_manager.py, sdk.py: Fix building from feeds feature for opkgLaurentiu Palcu2014-02-113-5/+51
| | | | | | | | | | | | | | | When using opkg as the PM backend, one has the option to provide custom feeds to create the rootfs from. This commit: * fixes this in the refactored code; * moves the custom config creation code to python; * clean up the package-ipk.bbclass; (From OE-Core rev: 19c538f57c8fa7c566e88a6dbe13ea4826d4f26c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: OpkgPM, bad recommendation handling changeLaurentiu Palcu2014-02-111-6/+4
| | | | | | | | | | | | | | | The following commit: rootfs_ipk: Ensure that BAD_RECOMMENDATIONS are honoured for all architectures changed the way BAD_RECOMMENDATIONS are handled. Make the change in the new code too. (From OE-Core rev: 7e518e399da51de3b159bd6804735b2f14c39357) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: do not use stampsLaurentiu Palcu2014-02-111-8/+0
| | | | | | | | | | | | | | Using stamps shortens rootfs/image creation because the package indexes are not created again if no new package was installed in the deploy dir. Unfortunately, there are some syncronization issues with do_package_write_*() and the indexes are not properly created. Will have to revisit this issue in the near future. For now, lose it. (From OE-Core rev: 276f2a8a072ce243daa74210934ee63046e9c480) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: OpkgRootfs, fix issue in _get_delayed_postinsts()Laurentiu Palcu2014-02-111-1/+1
| | | | | | | | | Status file path was not created correctly. (From OE-Core rev: 628c4bce36ca0bc2b316ec78cf58b02a42e7f35f) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: OpkgPM/DpkgPM fixesLaurentiu Palcu2014-02-111-12/+42
| | | | | | | | | | | | | | | | | This commit: * adds missing mark_packages() function for OpkgPM. This is needed to * manually change the packages installation status in the status file; * fix OpkgPM remove_packaging_data() issue; * fix OpkgPM handle_bad_recommendations() issue; * improve OpkgPM/DpkgPM mark_packages() regex pattern; * fix DpkgPM list_installed() problem; * fix DpkgPM _create_configs() problem: status file should not be truncated if it already exists/ (From OE-Core rev: d50a40100763dcbfabec2c147fdfcb46aa909329) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: fix image size calculation routineLaurentiu Palcu2014-02-111-2/+2
| | | | | | | | | | The IMAGE_ROOTFS_EXTRA_SPACE value was not correctly added to the base size. (From OE-Core rev: f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: DpkgPM, use lock on deploy dirLaurentiu Palcu2014-02-111-0/+8
| | | | | | | | | Lock deploy directory against concurrent index creation. (From OE-Core rev: 127d19b84e78b5e650d0e6d7eaf29a8b7d799e5e) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: warn the user if intercept hooks failLaurentiu Palcu2014-02-111-2/+2
| | | | | | | | | | | | | | | The idea of postinstall intercept hooks is to run CPU intensive postinstalls (like the ones generating font/pixbuf/icon caches) on host, at rootfs generation time. So, ideally, the user would like to know if the intercepts fail on host. With this patch, the user will see warnings on console if intercept hooks fail to execute. (From OE-Core rev: 5666ce9720132a76b5ff6e99712e240b8dc8e47a) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: RpmPM fixesLaurentiu Palcu2014-02-111-12/+12
| | | | | | | | | | | | | | | | | | | This commit: * fixes a crash when handling interecept hook failures which happened when MULTILIB_GLOBAL_VARIANTS was not set; * convert dashes to underscores and use sets (so that we make sure the items are unique) when creating RPM repos; * uses a regex pattern to search for packages in the feeds list. The old method could match also strings in the middle. For example: 'rpm' matched 'kernel-module-lttng-probe-rpm" in qemux86_64 feeds; * issue a bb.fatal if smart returns error while installing packages. Otherwise we might end up with an incomplete image... * fixes the /etc/rpm/platform file creation; (From OE-Core rev: b98c7e4945f1c36a6e4f98144a3af4f3049450ae) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: moving global SCRIPTLET_FORMAT and ↵Hongxu Jia2014-02-111-52/+51
| | | | | | | | | | | | DB_CONFIG_CONTENT to RpmPM The tweak made the code looks better. (From OE-Core rev: 8e06be633222635c549d7f067218e8b833e76bda) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manger.py/rootfs.py: rename save_rpmpostinist with save_rpmpostinstHongxu Jia2014-02-112-3/+3
| | | | | | | | | | The tweak made the code looks better. (From OE-Core rev: 61981755b4738ccc49be0e790de828f4166ef0e8) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: fix invoking _run_intercepts failedHongxu Jia2014-02-111-0/+1
| | | | | | | | | | - The variable D is needed by intercepts scripts; (From OE-Core rev: 3d37dcdb836b59d8a7f880ce22d06760eb8af232) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: fix invoking rpm save_rpmpostinist failedHongxu Jia2014-02-111-2/+3
| | | | | | | | | | | - Use self.target_rootfs instead of self.image_rootfs as saved dir; - Remove redundant comment line; (From OE-Core rev: 41d6edab676277afbcaa6cf41cd64a5663f09dc7) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: fix invoking rpm _handle_intercept_failure failedHongxu Jia2014-02-111-1/+1
| | | | | | | | (From OE-Core rev: 7858c8ac141a7bf66c65ddc7e4b39ad937a7e084) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk.py: support RpmRootfsHongxu Jia2014-02-111-2/+136
| | | | | | | | | | - Implementation RpmSdk class (From OE-Core rev: 417b27ce5c1ea2fe2057caa898291cce0c043359) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: fix get rootfs_extra_space failedHongxu Jia2014-02-111-1/+1
| | | | | | | | | | | The value of IMAGE_ROOTFS_EXTRA_SPACE is "0 + 51200", we should use eval rather than int in python. (From OE-Core rev: dd3418e2db732ca1bc78fd93efa3f08da88a1183) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: strip kernel-abiversion useless readlineHongxu Jia2014-02-111-1/+1
| | | | | | | | | | | | | | | It failed to read Kernel version from kernel-abiversion file, the reason was it didn't strip the readline. ... Error: Kernel version 3.10.25-yocto-standard does not match kernel-abiversion (3.10.25-yocto-standard) ... (From OE-Core rev: 17a0a8f44fe344ab1ae49730d9f17705b43987e5) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: fix uninstall uneeded pkgs failedHongxu Jia2014-02-111-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactor of shell function rootfs_uninstall_unneeded is incorrect, it should check and update the installed_pkgs.txt file for the existance of the packages that were removed. ... rootfs_uninstall_unneeded () { if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then if [ -z "$(delayed_postinsts)" ]; then # All packages were successfully configured. # update-rc.d, base-passwd, run-postinsts are no further # use, remove them now remove_run_postinsts=false if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then remove_run_postinsts=true fi # Remove package only if it's installed pkgs_to_remove="update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}" for pkg in $pkgs_to_remove; do # regexp for pkg, to be used in grep and sed pkg_regexp="^`echo $pkg | sed 's/\./\\\./'` " if grep -q "$pkg_regexp" ${WORKDIR}/installed_pkgs.txt; then rootfs_uninstall_packages $pkg sed -i "/$pkg_regexp/d" ${WORKDIR}/installed_pkgs.txt fi done ... (From OE-Core rev: 9cdecb3935962653733705ad6313558bfd4fda29) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: Tweak the rootfs removing operationHongxu Jia2014-02-111-3/+4
| | | | | | | | | | | | Move the bb.utils.remove(self.image_rootfs, True) from the base class constructor, to Opkg/Ipkg constructors after super's constructor is called. (From OE-Core rev: 66d86c4bbb9423c9fe0fc89005530be54068d401) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: support RpmRootfsHongxu Jia2014-02-111-6/+205
| | | | | | | | | | | - Implementation RpmRootfs class - Refactor list_installed_packages in python (From OE-Core rev: b3eeb0edf3f0296d30d7e62628bde722402bdb9d) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: support RpmPMHongxu Jia2014-02-111-5/+651
| | | | | | | | | | | - Implementation RpmPM class - Support rpm incremental image generation (From OE-Core rev: ca5203d6b1bb0cbf7830ea4f46109c6867138efc) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/manifest.py: add rpm image manifest creationHongxu Jia2014-02-111-1/+41
| | | | | | | | | | Implementation RpmManifest class. (From OE-Core rev: a0ef59ef9263653877db4853633883f2684d7a30) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk.py: add SDK classLaurentiu Palcu2014-02-111-0/+209
| | | | | | | | | | This new file contains the python 'populate sdk' implementation of the old bash populate_sdk_image() function for Opkg and Dpkg. (From OE-Core rev: 6247efaba592db924e6466c39aef441f0e07c62a) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: fixes for dpkg backendLaurentiu Palcu2014-02-111-8/+16
| | | | | | | | | | | | | | | | This commit contains the following fixes: * pass the apt config directory to the DpkgPM constructor, so one can instantiate this class multiple times and give it different config files (like for creating SDK); * change constructor argument name from 'dpkg_archs' to 'base_archs'; * export APT_CONFIG environment variable before calling apt-get, not in constructor. If done in constructor, the last class instantiation, sets the environment, which is note desireable; (From OE-Core rev: dc626cbcfd37c940bb8739b14d3ab8097e1760ea) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: use Manifest.INSTALL_ORDERLaurentiu Palcu2014-02-111-5/+1
| | | | | | | | | | Since the Manifest class has this property, use it. This contains the default package installation order. (From OE-Core rev: bb1fb4ceb544c161ed30cd102155657e3771859b) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/manifest.py: create manifests for SDK tooLaurentiu Palcu2014-02-111-18/+57
| | | | | | | | | | | | | | | | | | | | This commit contains several changes: * it is possible to create manifests for following types of images: regular image, target SDK and host SDK. To distinguish between these types of manifests, one has to pass the manifest_type argument to the contructor or create_manifest() wrapper. The manifest type can have the following values: image, sdk_host, sdk_target; * move image_rootfs variable to _create_dummy_initial() since it's used only here. This function will probably be removed in the future; * fix a bug in the Dpkg class; * add INSTALL_ORDER property to Manifest class which contains the default install order for the packages and will be used Rootfs/Sdk classes; (From OE-Core rev: a8c1b7504bf9cd5625fdecfdc3c3adce53aa164c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass, lib/oe/rootfs.py: remove intercept_scripts directoryLaurentiu Palcu2014-02-111-0/+2
| | | | | | | | | Remove the directory, manually, in the Rootfs.create() function. (From OE-Core rev: 37a9dc05272e7e49c8a475ccb3d10880dcee4763) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: add support for opkg backendLaurentiu Palcu2014-02-111-9/+149
| | | | | | | (From OE-Core rev: 0650e1f2354cdb6f925040d9d07e2c785274a592) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: add support for opkg backendLaurentiu Palcu2014-02-111-8/+210
| | | | | | | | | | Additionaly, the commit contains a couple of minor changes (comments, error printing, etc). (From OE-Core rev: ef3faaef6b1a25c943a8d5594ce55b0e558b62f3) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: use the bitbake APT_ARGS variableLaurentiu Palcu2014-02-111-1/+1
| | | | | | | | | | This commit will revert on using the bitbake APT_ARGS variable, so users can alter the way apt is called without needing to change it in code. (From OE-Core rev: ae337edc8ac441c947d1543c2800f37104a0be70) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: add deploy dir locking mechanismLaurentiu Palcu2014-02-111-0/+17
| | | | | | | | | | This is needed in order to serialize the index file creation when multiple do_rootfs tasks are running in the same time. (From OE-Core rev: cb03d15482569c2e56232c921526938dcecfdb68) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/manifest.py: create global variables for package typesLaurentiu Palcu2014-02-111-10/+20
| | | | | | | | | | Manifest class clients don't really need to know how package types are encoded. (From OE-Core rev: bac2e279005b601daff4d53549612ceb76a6a857) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/manifest.py: Add manifest creation for opkgLaurentiu Palcu2014-02-111-7/+44
| | | | | | | | | | | In this commit: * add ability to create initial manifest for opkg; * make var_map available to all backends; (From OE-Core rev: 8d14fbedcee02b723288004ae29a5c29524eec5a) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: add new library for rootfs creationLaurentiu Palcu2014-02-111-0/+328
| | | | | | | | | | | | | | | | | | This library will be used to generate the rootfs. Recommended usage: create_rootfs(d, manifest_file) this will determine the PM backend used, save the shell environment and will call the appropriate backend implementation (DpkgRootfs(d, manifest_file).create()). NOTE: this commit adds Dpkg support. (From OE-Core rev: 5ad8c21bc7f2213d1287cecf07d00a61d1456ff7) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: add new package management libraryLaurentiu Palcu2014-02-111-0/+425
| | | | | | | | | | | | | | | | | | | | | | | | | This new library is intended to be used by the new python rootfs creation code. It implements the rpm/dpkg/opkg package management backends: RpmPM, DpkgPM and OpkgPM. The base API is this: update() install() install_complementary() remove() write_index() remove_packaging_data() list_installed() All implementations have to provide these functions. Some backends may need to implement additional functions though. (From OE-Core rev: 224e5053044b4c7966fea3b8d199a3dfd4fe438e) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/manifest.py: add library for image manifest creationLaurentiu Palcu2014-02-111-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | This new library allows for the creation of 2 types of manifests: * initial manifest - used by the new rootfs creation routines to generate the rootfs; * final_manifest - this will contain all the packages in the image, after all installations finished; Usage: Manifest(d, manifest_dir).create_initial() Manifest(d, manifest_dir).create_final() or using the provided wrapper function: create_manifest(d, False, manifest_dir) -> creates initial manifest create_manifest(d, True, manifest_dir) -> creates final manifest If manifest_dir argument is ommited, it defaults to ${WORKDIR}. NOTE: this commit creates fixed manifests for minimal/sato/sato-sdk images, for Rpm & Opkg backends, in order to help speed up development of rootfs refactoring. Dpkg initial manifest creation is implemented. (From OE-Core rev: a9d8e5e5878d14b4804317a7f7ea6394fca5e010) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: add new image creation libraryLaurentiu Palcu2014-02-111-0/+239
| | | | | | | | | | | | | | | This will replace the old bash image creation code. This needs the rootfs to be already generated in order to work. Usage: Image(d).create() or using the provided wrapper function: create_image(d) (From OE-Core rev: b75b78ce534fbf0d4de2f7f66af5b721d68b7471) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/utils.py: add pre/post process helper functionLaurentiu Palcu2014-02-111-1/+11
| | | | | | | | | This helper function will be used to execute pre/post process commands. (From OE-Core rev: 23d409558cb12cbf0300156e67f768a13442910a) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils: targetbuild: don't use bb.fetch anymoreStefan Stanacar2014-02-091-19/+8
| | | | | | | | | | | | | When running tests outside of the build system we can't use bb.fetch anymore. It was nice but tests and their modules need to rely on the data storage only as that gets exported. This module is used by the oeqa/runtime/build* tests. (From OE-Core rev: 3caf8e244ea94f62a93f3b40e73e15ea78fc2880) 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>
* lib/oeqa: add module for running tests outside of the build systemStefan Stanacar2014-02-091-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script will run the exported tests outside of the build system. Simplest way to test this is with a qemu image that you manually start. For an already build image use this in local.conf: TEST_EXPORT_ONLY = "1" TEST_TARGET = "simpleremote" TEST_TARGET_IP = "192.168.7.2" TEST_SERVER_IP = "192.168.7.1" Export the tests: bitbake core-image-sato -c testimage Then: runqemu core-image-sato And: cd build/tmp/testimage/core-image-sato ./runexported.py testdata.json The contents of build/tmp/testimage/core-image-sato can be moved on another machine as long as some paths are updated in the json. The exported data contains paths to the build dir. We only care about DEPLOY_DIR/rpm ( if the rpm and smart tests are enabled), so running the tests on other machine means that the user has to move the contents and call runexported with --deploy-dir PATH: ./runexported.py --deploy-dir /path/on/another/machine testdata.json runexported.py accepts other arguments as well, see --help. [YOCTO #5613] (From OE-Core rev: 087ee840ad642bada6fe0b02311f05a595ea2e65) 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>
* testimage: add ability to export testsStefan Stanacar2014-02-091-11/+6
| | | | | | | | | | | | | | | | | | | | | Add the ability to export the tests so that they can run independently of the build system, as is required if you want to be able to hand the test execution off to a scheduler. Booting/deployment of the target is still handled by the build system, as before, only the execution of the tests happens outside of the build system. Tests exported are the ones defined in TEST_SUITES. No tests have been changed as interesting parts of the data store have been exported and tests can continue to query them as before. Small adjustments were made for a couple of oeqa modules though. [YOCTO #5613] (From OE-Core rev: 155dd52e0f707e06f50756584a50f744ba6b7844) 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>
* oeqa/runtime/systemd: remove race in settle()Ross Burton2014-02-041-14/+8
| | | | | | | | | | | | The settle() function had a race where services could still be activating at two minutes but then when the final log is output, they've activated. Remove this race and generally clean up the code. (From OE-Core rev: 8d107e0a828868702cfe035104c1f0b51da4291e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: allow multiple layers to provide their own TEST_TARGET classSipke Vriend2014-02-023-6/+79
| | | | | | | | | | | | | | | | | | | | | Use a python module "folder" rather than a single module within layers to ensure multiple layers can define a TEST_TARGET class. Current implementation using controllers.py module will only allow a single layer to define test targets. Add a controllers folder as well as a TestTargetLoader class whose job is to load the given TEST_TARGET class from any number of python modules within the oeqa/controllers/ directory of any layer. The only condition will be that layers will need to ensure the TEST_TARGET class name they provide is unique otherwise there is no guarantee which class is instantiated. a bb.warn is used to alude to this if it happens. (From OE-Core rev: 3f25705f4a986e06cbd397aaea52b841c1a1e054) Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: syslog: update --help testStefan Stanacar2014-02-021-1/+1
| | | | | | | | | | | | | | | busybox 1.22 now returns exitcode 0 instead of 1 for --help options, so this test needs to be updated when busybox gets upgraded to 1.22. https://bugs.busybox.net/show_bug.cgi?id=5612 http://git.busybox.net/busybox/commit/?id=efd0698f74caab0a0c8a51228b923ee142e8e278 (From OE-Core rev: 1e560d234b6d3040a7a9f0eb023f1e4a654be1ea) 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>
* oeqa/utils: sshcontrol: rewrite the SSHControl classStefan Stanacar2014-02-021-83/+92
| | | | | | | | | | | | | | | | | | Split the class in two, one to handle the process and the timeout based on output and one for the actual ssh/scp commands. The ssh/scp methods now use the same run method. It does the same thing as before but: - it looks cleaner. - adds support for using a different user than root - optionally, raises an exception when exit code != 0 (that's useful for code outside of tests, where you wouldn't want to check the return code every time as the tests do) (From OE-Core rev: bb14a7598d3c0636dc249f719bde0d9d65b2694d) 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>
* oeqa/runtime: smart: fix adding channelsStefan Stanacar2014-01-291-1/+1
| | | | | | | | | | Without this it won't add core2-64 and similar channels, as the directory name in deploy_dir/rpm uses _ not - as the package arch. (From OE-Core rev: 14e3a8f58e309121760fec70619633281dd9d88c) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: drop restartTarget methodStefan Stanacar2014-01-294-10/+0
| | | | | | | | | | | | | | | Restart is a property of a specific target, not of a test class, should a test really need to restart the target the direct method should be called. Also some tests used this to enforce more ram, which makes sense only for qemu targets only (and the inital reason this was needed isn't valid anymore, qemu machines had the default ram size bumped a while ago). (From OE-Core rev: 333a4326082e500bdbcd323af37e183e74adf617) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: rpm: fix finding the test rpm fileStefan Stanacar2014-01-281-5/+6
| | | | | | | | | | | | | | Translate TUNE_PKGARCH to find the right file (this used to work because tune for qemux86-64 used to be x86_64 now it's core2-64) Also, while using packagedata was nice, it's harder to make the test exportable and runnable outside of the build system. (where oe.packagedata isn't available) (From OE-Core rev: fd0e9ad4d295ca11b33c3e3e11069421dee834e8) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: sshcontrol: Allow alternate port for SSHControlSipke Vriend2014-01-281-1/+3
| | | | | | | | | | Add an optional parameter to SSHControl so the user can specify and alternate port to the default (22). (From OE-Core rev: 091d395e43836575587112ee1696a18c401505bb) Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>