summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/utils/metadata: Allow to function without the git moduleRichard Purdie2018-10-291-2/+15
| | | | | | | | | | The python git module may or may not be enabled, allow this code to function without it, falling back to the same method as metadata_scm.bbclass uses. This will be cleaned up in the next round of feature development. (From OE-Core rev: 6350586ba9f4a4107a2d457590824cd4d662d5b9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: Don't add empty log entriesRichard Purdie2018-10-291-1/+4
| | | | | | | | | There is no point in adding empty log entries to the json result files, only add them if there is log data. (From OE-Core rev: da6aef0b6bd4655805f7f743858d4e04341f75ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Improvements to the json loggingRichard Purdie2018-10-291-14/+11
| | | | | | | | | | | | | Tweak the preceeding commit to: * Add STARTTIME to the identifier to make it unique * Use LOG_DIR * Store the layer config in a more natural json format * Drop '_' function prefixes (From OE-Core rev: 173f59acf9722e2ef27fdd49c20f7d3d664917eb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/context: write testresult to json filesYeoh Ee Peng2018-10-291-3/+31
| | | | | | | | | | | | | | | | | | | | As part of the solution to replace Testopia to store testresult, OEQA selftest need to output testresult into json files, where these json testresult files will be stored into git repository by the future test-case-management tools. By default, json testresult file will be written to "oeqa" directory under the oe-selftest log directory. To configure multiple instances of bitbake to write json testresult to a single testresult file at custom directory, user will define the variable "OEQA_JSON_RESULT_DIR" with the custom directory for json testresult. (From OE-Core rev: 10697165c832e3dbb2913b6215164ea75e23ec23) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: write testresult to json filesYeoh Ee Peng2018-10-291-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the solution to replace Testopia to store testresult, OEQA need to output testresult into single json file, where json testresult file will be stored in git repository by the future test-case-management tools. The json testresult file will store more than one set of results, where each set of results was uniquely identified by the result_id. The result_id would be like "runtime-qemux86-core-image-sato", where it was a runtime test with target machine equal to qemux86 and running on core-image-sato image. The json testresult file will only store the latest test content for a given result_id. The json testresult file contains the configuration (eg. COMMIT, BRANCH, MACHINE, IMAGE), result (eg. PASSED, FAILED, ERROR), test log, and result_id. Based on the destination json testresult file directory provided, it could have multiple instances of bitbake trying to write json testresult to a single testresult file, using locking a lockfile alongside the results file directory to prevent races. Also the library class inside this patch will be reused by the future test-case-management tools to write json testresult for manual test case executed. (From OE-Core rev: 00e03b5004f1eb6d59295544b3a8620504278f51) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: correct the deploydir when packagefeed-stability inheritedMingli Yu2018-10-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After create_packages_dir added in below commit: 85e72e1 package_manager: Filter to only rpms we depend upon When add below line into conf/local.conf INHERIT += "packagefeed-stability" There comes below error when do_rootfs Exception: FileExistsError: [Errno 17] File exists: '/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' -> '/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies): [snip] bb.utils.remove(subrepo_dir, recurse=True) [snip] In create_packages_dir function, there is a logic as bb.utils.remove(subrepo_dir, recurse=True) to clean subrepo_dir which is actually as example is /$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm. But currently when inherit packagefeed-stability class, the deploydir should be /$Prj/tmp/deploy/rpm-prediff, not the default /$Prj/tmp/deploy/rpm. If use /$Prj/tmp/deploy/rpm, then result in the logic as below: os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm") Update to the actual deploydir to guarantee the logic as below: os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm/i586/initscripts-1.0-r155.i586.rpm") (From OE-Core rev: 3b17052611e640fb3db5d03c06ab87185a12be58) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: Support meta being a symbolic linkuninative-2.3Peter Kjellerstedt2018-10-211-1/+2
| | | | | | | | | | | oe-selftest's devtool tests have been broken since commit 2457cd57 (oe-selftest: devtool: avoid parallel races by using temporary copy of core) if meta is a symbolic link. (From OE-Core rev: daba6c5a991b370709d17e51305334f55a3858ec) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: refactor for OEQA to write json testresultYeoh Ee Peng2018-10-181-41/+29
| | | | | | | | | | | | | | Refactor the original _getDetailsNotPassed method to return testresult details (test status and log), which will be reused by future OEQA code to write json testresult. Take the opportunity to consolidate and simplify the logic used to gather test status and log within the TestResult instance. (From OE-Core rev: 79ee7d1c371a86edeb61c99679985118da657e5d) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: handle remove() with no packagesRoss Burton2018-10-181-1/+8
| | | | | | | | | | | | If remove() is called with an empty package list, ensure we do nothing instead of calling the underlying package manager with an invalid command line. [ YOCTO #12900 ] (From OE-Core rev: 715ec20c433cb4ed5fde938c33a42b2a296e4e56) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: implement PACKAGE_EXCLUDE for opkgRoss Burton2018-10-181-1/+5
| | | | | | | | | | opkg has supported the --add-exclude option to install since 0.3.0, so use it to implement support for PACKAGE_EXCLUDE. (From OE-Core rev: 6cc99d48c57cb22104980d0d758540e06cb7b80d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: possibility to add packages to debug rootfsAndrej Valek2018-10-181-0/+10
| | | | | | | | | | | Static libraries are not included in rootfs, it means, that sources are not going into debug rootfs. This option enables to install additional packages even if the standard package is not installed. (From OE-Core rev: 708fe1df3d3e22dd693ae7bbfdd3e5af1a1b0bdc) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatetests.py: reset TCLIBCAPPENDKai Kang2018-10-161-0/+12
| | | | | | | | | | | | | | It appends TCLIBCAPPEND to TMPDIR in meta/conf/distro/defaultsetup.conf: TMPDIR .= "${TCLIBCAPPEND}" It affects some oe selftest cases in sstatetests.py. Reset TCLIBCAPPEND for these cases. (From OE-Core rev: 4549c9dd96be8db69d520f66f4507939df9e9587) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ksample.py: fix error messageChen Qi2018-10-121-1/+1
| | | | | | | | | | | | | | | The current error message is like: kobject-example.kodoesn't exist Add a space so that it looks like: kobject-example.ko doesn't exist (From OE-Core rev: 30f2cdd0a3ee0874bebd135e35ab591f630e8adc) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual/oe-core: Drop image build during taskexp testRichard Purdie2018-10-111-4/+0
| | | | | | | | | Building an image takes time and isn't necessary to test taskexp, we can drop this step. (From OE-Core rev: 298eb27037172925a83b37541e5955bbf3b7d2fb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual: Remove bitbake-selftest executionRichard Purdie2018-10-111-30/+0
| | | | | | | | | The autobuilder runs bitbake-selftest already so we don't need to execute this manually. (From OE-Core rev: f223f49b7e3d3f6ef07915edea1a6233ae9869e2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual: transfer manual test cases from testopia to oeqaYeoh Ee Peng2018-10-119-0/+2750
| | | | | | | | | | | | | | | | | | | | | | As part of the solution to replace Testopia, manual test cases need to be migrated to OEQA. These manual test case json files will serve two use cases. Use case#1: as input to the future commandline-based manual test runner script, where this script will display actions and expected result information in user friendly text, then it will capture user input for test result and log, finally it will write test result and log into existing standardize test result json format from OEQA framework for automated tests. Use case#2: QA will open and read these json file manually for planning manual test execution. Any reader interested in understanding manual test cases will open and read these files. (From OE-Core rev: dcaf843878e9adcb3fab025d54cd5d9ceb6c2fce) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/opkg: Ensure the test works on multilibRichard Purdie2018-10-111-1/+4
| | | | | | | | | After allarch was disabled in multilib, this test broke. Fix the test to account for that change. (From OE-Core rev: 6f692d86c2c6742c67aba93fa24b930af02d8e85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/utils: add eol to format_pkg_list()grygorii tertychnyi via Openembedded-core2018-10-111-1/+7
| | | | | | | | | | | | | | | | | Append '\n' to the non-empty formatted string before return. If you write it to the (manifest) file, it will ensure file ends with a newline. Many GNU utilities have problems processing the last line of a file if it is not '\n' terminated. E.g. if the last line is not terminated by a newline character, then "read" will read it but return false, leaving the broken partial line in the read variable(s). It can also break or adversely affect some text processing tools, that operate on the file. (From OE-Core rev: ee4d0c879713ba50dc6cc3300f44647faebee2e0) Signed-off-by: grygorii tertychnyi <gtertych@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/runqemu: Handle SystemExitRichard Purdie2018-10-091-8/+11
| | | | | | | | | | | | | | | | | | | The sigchld handler in runqemu can raise a SystemExit when qemu shuts down. Rather than backtracing, accept this as a successful test result. ERROR: runqemu.QemuTest.test_qemu_can_shutdown (subunit.RemotedTestCase) testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 183, in test_qemu_can_shutdown qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 175, in _start_qemu_shutdown_check_if_shutdown_succeeded time.sleep(1) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/qemurunner.py", line 100, in handleSIGCHLD raise SystemExit SystemExit (From OE-Core rev: 417245923c1c2c35a60d6db29cbe5a78548860d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Remove the signal handler before stopping qemuRichard Purdie2018-10-091-2/+2
| | | | | | | | | | | The qemu shutdown can race with the signal handler removal leading to confusing tracebacks on slower/loaded systems. Remove the signal handler first before shutting down. (From OE-Core rev: 1b63ce7bb83134f84bf07d1075d5ca0d5466ed3d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: Install -src packages when PACKAGE_DEBUG_SPLIT_STYLE is ↵Joshua Watt2018-09-251-0/+4
| | | | | | | | | | | | | | | "debug-with-srcpkg" When the source packages are created, they need to be included in the debug image created when IMAGE_GEN_DEBUGFS = "1" for it to be usable for debugging. [YOCTO #12930] (From OE-Core rev: 5fc7fbc10bbd3a54df16db275ecd6080bc58f19e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: always update the opkg indexIoan-Adrian Ratiu2018-09-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous logic assumed that if $BUILD_IMAGES_FROM_FEEDS=1 then a complete set of ipk feeds from which to build the image is already present under $IPK_FEED_URIS at do_rootfs runtime. $IPK_FEED_URIS usually contains "file://${DEPLOY_DIR_IPK}" which renders the above assumption bad because some recipes in the current build can contain code like do_install[nostamp] = "1" which will cause rebuilds bumping $PR and invalidating the index. Even when the index is manually re-created before an image build ("bitbake package-index"), the nostamp will cause failures because the dependency gets rebuilt before do_rootfs in the "bitbake <image>" call. So make the opkg rootfs index logic the same as for rpm/deb, to always update the index in $DEPLOY_DIR_IPK to fix the above nostamp failure. Feeds outside $DEPLOY_DIR_IPK added to $IPK_FEED_URIS continue to work as usual, for eg. by using a http:// URI. (From OE-Core rev: bce90f48d1cc136fdfdf98b3830f5d99e381271b) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/elf.py: Add LatticeMico32 architecture definitionNathan Rossi2018-09-211-0/+1
| | | | | | | | | | | Add the ELF definition for the LaticeMico32 architecture. This architecture is 'elf' OS only as it does not target Linux. (From OE-Core rev: d14f86f39a25649c923deecc24a283ba968b13f5) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: use normalized path when doing the filtered copyMax Krummenacher2018-09-211-0/+1
| | | | | | | | | | | | | | | | | The linking/copying of the package files failes if the deploy dir is set in a non normalized way e.g. like this DEPLOY_DIR = "${TOPDIR}/../deploy" Then the simple string replacement which is used to calculated the link destination from the link source fails, as the link source is normalized but the deploydir prefix is not. Normalizing deploydir fixes this. (From OE-Core rev: e0ebfaa92bbfd3158b48e28dfb6435890c73bef3) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: fix non-determinism in cmake testRoss Burton2018-09-131-1/+3
| | | | | | | | | | | | | | The Navit recipe can depend on fribidi which is now part of oe-core. Since the pkgconfig lookup is based on pkgdata the results can change depending on what has been built, which leads to occasional failures. Build gtk+ before the test to ensure that the pkgdata is populated with more of the dependencies, and add fribidi to the generated DEPENDS checklist. (From OE-Core rev: d180dc758710c7259d45eeb9304e7284a8fd8825) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runtime_test: Ensure we build/use gnupg-nativeRichard Purdie2018-09-131-1/+3
| | | | | | | | | Without this, we see errors if gpg is missing from the host system for "oe-selftest -r runtime_test.TestImage.test_testimage_dnf". (From OE-Core rev: e91838b63b506e2969582b2b8511fd3724d6aa3f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Recognise BPF as a valid EM_MACHINE typeKhem Raj2018-09-132-1/+3
| | | | | | | | | | | | | | | | BPF Linux ELF objects are generated with kernel-selftests with >= 4.18 kernel and when clang is enabled which packages BPF objects into packages, therefore recongnise this as a valid ELF target Add a selftest for BPF Do not flag BPF objects in target, since they pretty much will be ok for most of kernels architectures we care do support BPF (From OE-Core rev: 3667a8ec016bae3f8026ef7b4c895546804f6368) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* statetests.py: drop test_sstate_allarch_samesigs_multilibKai Kang2018-09-131-9/+2
| | | | | | | | | | | allarch is disabled when multilib is used, so sstate oeqa case test_sstate_allarch_samesigs_multilib is useless. Remove check for allarch part and rename to test_sstate_nativesdk_samesigs_multilib. (From OE-Core rev: 32fe47ea0aea791357d3045c202cdad86b16f2ff) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/utils.py: Add vartrue()Robert Yang2018-09-131-0/+8
| | | | | | | | | | It can be used to simplify code like: "${@['iffalse', 'iftrue'][var]}" (From OE-Core rev: fc5a5af7bc3619f575988a75efc0c4fe15478b2d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_base_sdk: Stop running gcc --version all the timeRichard Purdie2018-09-051-1/+4
| | | | | | | | | | Running 'gcc --version' for every image recipe is slow and increases parsing time/resource usage for no good reason. Only compute the value in when we're really running the task/function. (From OE-Core rev: bf49316bb9913b7c89de64d6a194be31aa66e16b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: add noarch to buildarch_compatKai Kang2018-09-051-1/+3
| | | | | | | | | | | | | | It fails to run rpmbuild to build a noarch package on target when it contains 'BuildArch: noarch' in the spec file: | error: No compatible architectures found for build Add 'noarch' to buildarch_compat in configure file rpmrc to fix it. (From OE-Core rev: 2bdddb458bcc779d595e972f60a719aeb1c1b6d5) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runtime_test: Fix ↵Richard Purdie2018-09-041-0/+1
| | | | | | | | | | | | | | runtime_test.TestImage.test_testimage_install after ssl changes The test installs socat and expects it to run but assumes all its dependencies are already installed (which includes libssl). Recent changes mean this isn't the case so force libssl into the image in advance to work around this issue for now. (From OE-Core rev: 13b82380abb273e6575b1e74870d3fe8249ebbc1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/dnf: Make sure test_dnf_install does not skippedYeoh Ee Peng2018-09-041-1/+5
| | | | | | | | | | | | | | | | | | | | During debugging dnf issue, we found that the test_dnf_install PASSED the testing even though the environment does not allow dnf install to run successfully. Further debugging had identified that current test_dnf_install will execute dnf install even when the package to be installed already exist, thus dnf install will just skipped and this test will PASSED even though it was not. To solve this, added additional logic to check if the package to be installed already exist, if yes then remove the package before actually run dnf install. This will make sure dnf install was tested as expected. (From OE-Core rev: 4f662b253f7313c4e02bfafb527cdac076b6309a) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: fixes related to hasPackage semanticsChen Qi2018-09-044-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | The current _hasPackage does a regex match when checking for the existence of packages. This will sometimes result in unexpected result. For example, the condition hasTargetPackage('gcc') is likely to be always true as it matches libgcc1. For most of the time, we should do exact match instead of regex match. So change _hasPackage function to do that. For the current sdk test cases, the only place that needs regex match is '^gcc-'. This is because there's no easy way to get multilib tune arch (e.g. i686) from testdata.json file. Besides, packagegroup-cross-canadian-xxx and gcc-xxx should be check in host manifest instead of the target one. So fix to use hasHostPackage. Also, as we are doing exact match, there's no need to use r'gtk\+3', just 'gtk+3' is enough. (From OE-Core rev: 595e9922cdbacf84cf35cc83f0d03cace042e302) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk/buldgalculator.py: check against multilib for gtk+3Chen Qi2018-09-041-2/+2
| | | | | | | | | | | | | When determining whether to skip the test case, the check should be done with consideration of multilib. Otherwise, we will meet the following error when testing against lib32 environment. No package 'gtk+-3.0' found (From OE-Core rev: ce82ee46f4a7beb5663238b276e779e5c9657777) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk/context.py: add ability to check for multilib version of target packageChen Qi2018-09-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a named argument 'multilib' for the hasTargetPackage function. Its default value is False. When setting to True, it will try to get the correct multilib prefix from the sdk_env, the environment setup script. We need this because we don't want unexpected run of some sdk test cases. The following steps will generate error. 1. Enable multilib for qemux86-64 require conf/multilib.conf MULTILIBS ?= "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 ?= "core2-32" 2. bitbake core-image-sato -c populate_sdk 3. bitbake core-image-sato -c testsdk The error message is like below. No package 'gtk+-3.0' found RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: FAILED As we don't have lib32-gtk+3 installed, the test case should be skipped when testing against the lib32 environment setup script. (From OE-Core rev: 163764ad4760a5fabf65640df5f968be98ad13d2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager: turn postinst failure warnings into bitbake failuresAlexander Kanavin2018-09-042-17/+9
| | | | | | | | | | | | | Sumo release provides a transition period so that deferrals to first boot via 'exit 1' can be converted to pkg_postinst_ontarget(). For the next release however, postinst script failures should be treated as such. [YOCTO #12607] (From OE-Core rev: 42acb0ebde4e88bcdf34a541b700f19d8607abb0) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/package: Add package separated debug symbols hardlink testHongxu Jia2018-08-281-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tweak recipe selftest-hardlink - addition of libexecdir to simulate multiple directories - add gdb.sh to run gdb from script which is invoked at test time. - rename `hello' -> `hello1' to workaround name confliction with the one in lmbench Add test_gdb_hardlink_debug to selftest/package - run a qemu and invoke gdb.sh to gdb binaries of selftest-hardlink - check gdb to read symbols from separated debug hardlink file - check debug symbols works correctly [Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory'] 2018-08-26 01:27:30,195 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests) 2018-08-26 01:30:29,005 - oe-selftest - INFO - gdbtest /usr/bin/hello1 2018-08-26 01:30:36,539 - oe-selftest - INFO - gdbtest /usr/bin/hello2 2018-08-26 01:30:43,568 - oe-selftest - INFO - gdbtest /usr/libexec/hello3 2018-08-26 01:30:50,157 - oe-selftest - ERROR - No debugging symbols found. GDB result: Reading symbols from /usr/libexec/hello3...(no debugging symbols found)...done.^M (gdb) Function "main" not defined.^M Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]^M (gdb) Starting program: /usr/libexec/hello3 ^M Hello World!^M [Inferior 1 (process 320) exited normally]^M (gdb) The program is not being run.^M (gdb) 2018-08-26 01:30:51,180 - oe-selftest - INFO - ... FAIL 2018-08-26 01:30:51,181 - oe-selftest - INFO - Traceback (most recent call last): File "oe-core/meta/lib/oeqa/selftest/cases/package.py", line 148, in test_gdb_hardlink_debug self.fail('GDB %s failed' % binary) AssertionError: GDB /usr/libexec/hello3 failed [Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory'] [Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory'] 2018-08-26 12:40:30,976 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests) 2018-08-26 12:42:15,149 - oe-selftest - INFO - gdbtest /usr/bin/hello1 2018-08-26 12:42:24,064 - oe-selftest - INFO - gdbtest /usr/bin/hello2 2018-08-26 12:42:31,078 - oe-selftest - INFO - gdbtest /usr/libexec/hello3 2018-08-26 12:42:38,646 - oe-selftest - INFO - gdbtest /usr/libexec/hello4 2018-08-26 12:42:46,824 - oe-selftest - INFO - ... ok [Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory'] (From OE-Core rev: 104d07e57488f4a414fb5e1f60d0c8b0c02d6b4d) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator: add skipIfInDataVarRichard Leitner2018-08-231-0/+14
| | | | | | | | | skipIfInDataVar will skip a test if a value is in a certain variable. (From OE-Core rev: 10b935c713748346aea6c36c2f41e0ae6c320821) Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/patch.py: Clean up getstatusoutput usageRobert Yang2018-08-231-1/+2
| | | | | | | | | | | We can't use subprocess.check_output() or subprocess.call() here since the one who invokes runcmd() needs handle CmdError() exception (error out or ignore it). (From OE-Core rev: c3e7739987d804f7865428442479d5bece5ff2dd) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/gpg_sign.py: Clean up getstatusoutput usageRobert Yang2018-08-231-10/+5
| | | | | | | | | Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. (From OE-Core rev: 90c730a898f11adb2ecd377cdd913af83123bcb7) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/utils: Fix get_multilib_datastore to work for original tuneRichard Purdie2018-08-231-0/+3
| | | | | | | | | | | Currently the original datastore returned by this function doesn't always work as the tune isn't set back to the original. Fix it to work like all_multilib_tune_list() in utils.bbclass and correct the data returned. (From OE-Core rev: 4e1dc858fbf671ef27089a2b9bcdc965fe19d698) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package.py: use bb.utils.break_hardlinks helperRasmus Villemoes2018-08-231-1/+1
| | | | | | | | | | | | This does the same thing, but is more efficient in case st_nlinks is (already) 1. Depends on bitbake commit 7ae93cf40ab91965147055100432961436bce46c . (From OE-Core rev: a09f8e32044c8daec2d2fb3ff0e830c21402df6e) Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/ldd: Clean up testRichard Purdie2018-08-231-8/+7
| | | | | | | | | | | * Merge the two tests together as having them separate is pointless * Test that ldd runs correctly * Add in a dependency on the "ldd" package being installed instead of the sdk tools feature (From OE-Core rev: 80db456387fb63ee74d53a9719ab3997432f4c80) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runner: Print any errors/failures earlyRichard Purdie2018-08-231-0/+8
| | | | | | | | | Its a pain to have to wait until oe-selftest finishes to see the failures for example. (From OE-Core rev: 4c499a1b10a0c2647b6a753b8f9cd934ae4ad0da) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runner: Use the proper logger functions instead of print()Richard Purdie2018-08-231-1/+1
| | | | | | (From OE-Core rev: 5ccd2284e5dd994230e9e229b7931d049c9f46c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/context: Only set buffer mode for non-concurrent testsRichard Purdie2018-08-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Periodically we'd see: NOTE: core-image-sato-1.0-r0 do_testsdk: ====================================================================== NOTE: core-image-sato-1.0-r0 do_testsdk: ERROR: broken-runner NOTE: core-image-sato-1.0-r0 do_testsdk: ---------------------------------------------------------------------- NOTE: core-image-sato-1.0-r0 do_testsdk: testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/lib/oeqa/core/utils/concurrencytest.py", line 122, in _run_test test.run(process_result) File "/usr/lib/python3.6/site-packages/subunit/__init__.py", line 1194, in run protocol = TestProtocolServer(result, self._passthrough, self._forward) File "/usr/lib/python3.6/site-packages/subunit/__init__.py", line 514, in __init__ stream = stream.buffer AttributeError: '_io.StringIO' object has no attribute 'buffer' which seems to occur if a result arrives before all the runner threads have started. The runner's result handling changes sys.stdout to a buffer temporarily which can be seen in other threads and it can sometimes fail. Since the tests are running in a separate process we don't need this buffer handling in the concurrent case so only set when not parallelising. The concurrent class handle setting buffer mode internally. (From OE-Core rev: e2c66aa0f74d19fbc7e56af1fb440ad6473d3a8e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/concurrencytest: Ensure subunit streams are flushed at exitRichard Purdie2018-08-231-0/+2
| | | | | | | | | | Without this, error output such as that in the teardown can be lost and processes may recieve signals they're not expecting causing other strange errors. (From OE-Core rev: 1e3f44737a15feb3128ba7fc0dbe896dd8782e07) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* assimp.py: fix AttributeError in tearDownClassChen Qi2018-08-211-5/+0
| | | | | | | | | | | | | | When running this test case, we will see the following error. AttributeError: type object 'BuildAssimp' has no attribute 'project' assimp.py test case does not make use of SDKBuildProject, so remove the import statement and the tearDownClass. (From OE-Core rev: ca0a40a852abed981d54503ef2d86708471c821e) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: restructure for out of tree (and on target) module buildsBruce Ashfield2018-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required. This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package. This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel. The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel. The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel. Along with the changes to the copying of the infrascture, we also have the following changes: - a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make modules_prepare" - The kernel source is installed into /lib/modules/<version>/build and a symlink created from /usr/src/kernel to the new location. This aligns with the standard location for module support code - There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update. (From OE-Core rev: 007ef1f468110b2698a27ea9a6d43fed5a0a9fc2) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>