summaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2019-08-06sstatesig: Move unihash siggen code to bitbakeRichard Purdie
This code is closely tied with the hash server in bitbake and also means we can't relibably test the hashserv runqueue functionality without OE metadata. Moving this to bitbake as a MixIn class makes most sense and encourages code collaboration and reuse as well as enabling easier and more accurate testing of the APIs. (From OE-Core rev: a2a9c6092d4dde706ed071b08a972d1d87184295) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06classes/lib: Remove bb.build.FuncFailedRichard Purdie
Whilst seemingly a good idea, this exception doesn't really serve any purpose that bb.fatal() doesn't cover. Wrapping exceptions within exceptions isn't pythonic. Its not used in many places, lets clean up those and remove usage of it entirely. It may ultimately be dropped form bitbake entirely. (From OE-Core rev: efe87ce4b2154c6f1c591ed9d8f770c229b044ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26package: Improve determinismRichard Purdie
Its possible in cases with multiple shlib providers we were not being deterministic. Add in a couple of sorted() calls to fix the shlibs and pkgconfig cases with this potential issue. (From OE-Core rev: 5b9a4214ee17e1a39dd5a1742f2ac5ed25a11310) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26meta/lib/oeqa: Remove ext4 for bootimg-biosplusefiWilliam Bourque
Remove "ext4" IMAGE_FSTYPES when generating core-image-minimal for the bootimg-biosplusefi unittests; "wic" type is enough. (From OE-Core rev: 73f69585e9f30819d8fb484d458e3408a04c0433) Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-23meta/lib/oeqa: Test for bootimg-biosplusefi SourceWilliam Bourque
Add unittests for bootimg-biosplusefi SourcePlugin in wic module. First test check wic creation works correctly. Second test uses qemu to boot image and checks that it has both EFI and BIOS files in a single partition. (From OE-Core rev: e0c3436241afca93f107e325d1b9ffcdebf706cd) Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-22runtime_test.py: use track_for_cleanup for temp dirChen Qi
Use track_for_cleanup for temp dir to avoid such temp dir being not cleaned up when something goes wrong, e.g., building image failure. (From OE-Core rev: 7105c9bcceda3e4defbb6aa9fb3e8fd38c1e00a2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18package_manager: Ensure the base-feed directory existsAlistair Francis
Ensure that the /etc/opkg directory exists before we try to create a file there. (From OE-Core rev: 30ff50223cd0b79fd3b8aa393ea1e621282773ac) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18qemurunner.py: Be more verbose about problemsAlistair Francis
Instead of hiding problems in the debug log let's print them as warnings instead. (From OE-Core rev: 088f5d97001bd4b573f00cfca93b8d24e814fd64) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18oe/copy_buildsystem: move layer into layers directoryAndrej Valek
Layers could be located outside from poky but inside the build directory. This case should be covered in eSDK. meta-abc meta-def/meta-ghi meta-def/poky meta-def/meta-oe/meta-oe ... It should take all enabled layers and put them into 'layers' dir during build-time with respecting new relative path to poky. layers/meta-abc layers/meta-ghi layers/poky layers/meta-oe/meta-oe ... (From OE-Core rev: 55ecf6988d3e3c0935cb6324a6ad2c75f1191a1d) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-17wic: add support for kernel with initramfs bundledChee Yang Lee
when INITRAMFS_IMAGE_BUNDLE and INITRAMFS_IMAGE are set, wic should look for kernel with initramfs image bundled. Include required variable MACHINE, INITRAMFS_IMAGE_BUNDLE, INITRAMFS_IMAGE, INITRAMFS_LINK_NAME and KERNEL_IMAGETYPE in WICVARS. No longer require default value for variable kernel as KERNEL_IMAGETYPE is not optional variable and included in WICVARS. image_types_wic to inherit kernel-artifact-names to obtain default INITRAMFS_LINK_NAME when INITRAMFS_IMAGE_BUNDLE are set. update wic.Wic2.test_image_env test case to filter optional variable INITRAMFS_LINK_NAME, INITRAMFS_IMAGE and INITRAMFS_IMAGE_BUNDLE. (From OE-Core rev: bac984fbb2d5ad5d13ba3275c8a3e878d8753c58) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-15qemurunner.py: fix race condition at qemu startupChen Qi
When handling pid file, qemu would first create the file, stat it, lock it and then write actually contents to it. So it's possbile that when reading the pid file, the content is empty. [YOCTO #13390] (From OE-Core rev: 170e59b203a02f8438b9aeab3a45f6fcd6608b1f) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-15oeqa/runtime/rpm: Move test_rpm_query_nonroot test case to RpmBasicTestChen Qi
The test_rpm_query_nonroot test case was in RpmInstallRemoveTest. But it should logically belong to RpmBasicTest. So move it there. (From OE-Core rev: 506388a10a26613524602dcb4e630f216c6fee60) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-15oeqa/runtime/rpm: ensure no user process running before deleting userChen Qi
In case of systemd, `su -c 'xxx' test1' via ssh will create several processes owned by test1, e.g. /lib/system/systemd --user. These processes are actually managed by user@UID.service (e.g. user@1000.service). And such service is managed automatically by systemd. In other words, it will be cleaned up by systemd automatically. So we need to wait for systemd to clean it up before trying to use `userdel' to delete the user. (From OE-Core rev: 9d398be42a69d25277b929d760aaed1679f3cd54) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-11oeqa/recipetool: change the CMake test to use taglibRoss Burton
The current test builds Navit, which uses GTK+ 2. As GTK+ 2 is being removed from oe-core, change the test to build taglib instead. (From OE-Core rev: f627bce009dd275df807ffbc53b880c2490559ae) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-09oeqa/bbtests: Tweak test bitbake output pattern matchingRichard Purdie
The output from bitbake will change slightly soon due to runqueue changes, adpat the test now to account for both the old and new cases. (From OE-Core rev: 78fcea74517de4793cc0ecc97bce7f5c7dcd44c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-05buildhistory_analysis: ignore ownership for sysroot diffsRoss Burton
The sysroot isn't populated under pseudo, so ownership differences should be ignored. (From OE-Core rev: 01b816be4adff8f3992c1369810bdcf11a26fd6c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03devtool.py: track to clean devtool.conf in test_create_workspaceChen Qi
`devtool create-workspace' would create devtool.conf, so track to clean it up. Otherwise, this devtool.conf file would mess things up. e.g. oe-selftest -r devtool && oe-selftest -r devtool -j 2 AssertionError: '/PROJ_DIR/build-selftest-st-15753/workspace/conf/layer.conf' does not exist : Workspace directory not created This is because the devtool.conf is also copied to build-selftest-st-xxxx directory, resulting in devtool to create and use workspace specified in this file. (From OE-Core rev: a0a96db23686a38235fb0373e75e8b2951216c18) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03oeqa: Test bitbake --skip-setseceneJoshua Watt
Tests the bitbake --skip-setscene option to verify that it correctly reuses tasks previously restored from sstate, but doesn't execute new sstate tasks (From OE-Core rev: af10c620b1496bf5224d0628a92cb42e9cd362a8) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-30oeqa: Cleanup /usr/bin/env pythonRobert Yang
(From OE-Core rev: eb79217b8761816a21c8f7bed3c5379c1b9230ea) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-28buildhistory: report sysroot changesRoss Burton
Now that the sysroot is written into the build history, write it out. (From OE-Core rev: e9df98ba63e6d2baefee550170dbdd11ed2ad03a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27oeqa/runtime/syslog: Add delay to test to avoid failuresRichard Purdie
On a loaded builder we've seen the log message not make it to the log file before the ssh command completes. Add a short delay to try and ensure this does happen. There is unforunately no way to flush syslog in all cases we test. (From OE-Core rev: 66322b689e46520647e2d94d5e3f3ce282a41247) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27oeqa/runtime/oesyslog: systemd syslog restart doesn't change pidRichard Purdie
The systemd-journald process doesn't restart/change the way syslog does, don't test/error in this case. (From OE-Core rev: be48190dca0643df4881624d29c2eae453395919) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27oeqa/runtime/syslog: Improve test debug messagesRichard Purdie
Its useful to test whether the restart command returned an error code and exit early from the test if so. Also add different messages to tell if the syslog processes didn't die or didn't restart. (From OE-Core rev: f19e95b8571a0d8213c4dec0da056e3d243fbbd1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27oe_syslog.py: Handle syslogd/klogd restart raceJon Mason
syslogd and klogd can occasionally take too long to restart, which causes tests to fail by starting before the log daemons are ready. To work around this problem, poll for up to 30 seconds on the processes to verify the old ones are killed and the new ones are up and running. Similarly, add checks for rsyslogd and systemd-journald to possibly catch issues with those daemons. [YOCTO #13379] (From OE-Core rev: dc73872b828ea271678fa624c15199364a5cba9e) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27oeqa/buildoptions: check that Fortran code actually cross-compilesRoss Burton
Don't just test that we can build the cross-compiler, but test that it actually can cross-compile some Fortran. The quadmath dependency is now handled in gcc-runtime and isn't needed in this test (as per local.conf.sample.extended changes). There's also no need to build libgfortran explicitly, as fortran-helloworld depends on it. (From OE-Core rev: 4b43c655ed5ff8b9d2662730526811220b21ff8c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-21oeqa: avoid class setup method to run when skipping the whole classChen Qi
For now, even if we have specified to skip the whole module/class via command line, e.g., `oe-selftest -R gotoolchain', the class setup method is still run. This at least results in unnecessary builds, and at worst results in ERROR, if the setup method fails. So improve the skipping mechanism to avoid class setup method to run when specified to skip. (From OE-Core rev: b0b79bf65f5e5e65958090a4a88622b42df896bf) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-21context.py: avoid skipping tests by meaningless command argumentChen Qi
Currently `oe-selftest -R a' will skip 'archiver' tests. This is not expected. Fix it so that the '-R' should be followed by actual module/class/test names. (From OE-Core rev: de3b070fc2ddd0b63a324679ec5adbe30142fc22) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-20oeqa/logparser: ignore test failure commentaryRoss Burton
The output format for Python and GLib both can be of this form: FAIL: foobar (Segmentation fault) In this case the test is called foobar not foobar_segmentation_fault. (From OE-Core rev: 0219e9bd0273661b4b70df97e5762f77b3ac3e8c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19rootfs: Fix dependency for every dpkg runRicardo Ribalda Delgado
Avoid getting a warning on do_rootfs. Fixes: NOTE: Installing the following packages: libgdk-pixbuf-2.0-locale-en-gb glibc-locale-en-gb libatspi-locale-en-gb gstreamer1.0-locale-en-gb gtk+3-locale-en libatk-1.0-locale-en-gb gtk+3-locale-en-gb gstreamer1.0-plugins-good-locale-en-gb gstreamer1.0-plugins-base-locale-en-gb gstreamer1.0-plugins-bad-locale-en-gb libglib-2.0-locale-en-gb avahi-locale-en-gb vte-locale-en-gb xkeyboard-config-locale-en-gb WARNING: Unable to install packages. Command '/workdir/build/tmp/work/qt5122-poky-linux/bottlecam-image/1.0-r0/recipe-sysroot-native/usr/bin/apt-get install --force-yes --allow-unauthenticated libgdk-pixbuf-2.0-locale-en-gb glibc-locale-en-gb libatspi-locale-en-gb gstreamer1.0-locale-en-gb gtk+3-locale-en libatk-1.0-locale-en-gb gtk+3-locale-en-gb gstreamer1.0-plugins-good-locale-en-gb gstreamer1.0-plugins-base-locale-en-gb gstreamer1.0-plugins-bad-locale-en-gb libglib-2.0-locale-en-gb avahi-locale-en-gb vte-locale-en-gb xkeyboard-config-locale-en-gb' returned 100: Reading package lists... Building dependency tree... Reading state information... (From OE-Core rev: 4e315dd23c52b75fd64dca89e7bffe25a0b0e6f9) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19runtime/cases/logrotate: make test more reliableAnuj Mittal
By default logrotate uses 'dateext' in logrotate.conf which results in a date string being appended at the end of log name. In cases when a test that installs configuration in logrotate.d is executed first (dnf for example), it might result in errors when logrotate test is executed: error: destination /var/log/dnf.librepo.log-20190528 already exists, skipping rotation error: destination /var/log/dnf.rpm.log-20190528 already exists, skipping rotation error: destination /var/log/hawkey.log-20190528 already exists, skipping rotation Tweak the test to use it's own temporary configuration that doesn't enable dateext. Fixes [YOCTO #13363] (From OE-Core rev: d0a30c1c57edc9a724658e2ed312b34eed3af5a9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19manifest.py: fix test_SDK_manifest_entriesChen Qi
TOOLCHAIN_OUTPUTNAME could be overridden. So use this variable directly instead of its default value ${SDK_NAME}-toolchain-${SDK_VERSION}. (From OE-Core rev: 35a13468f551fff6305ba1ebbcb5dd28e99ec050) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-18context.py: fix skipping functionChen Qi
The current codes to skip test cases are logically correct, but they do not work correctly in reality. It does skip the tests as the command line argument specifies, but the related information is wrong. e.g. $ oe-selftest -R archiver bblayers runtime_test 2019-06-17 09:24:53,764 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it 2019-06-17 09:25:06,309 - oe-selftest - INFO - Adding layer libraries: 2019-06-17 09:25:06,310 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta/lib 2019-06-17 09:25:06,310 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib 2019-06-17 09:25:06,310 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-selftest/lib 2019-06-17 09:25:06,312 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable 2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf 2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf 2019-06-17 09:25:10,522 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver) 2019-06-17 09:25:10,522 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "runtime_test"' 2019-06-17 09:25:10,522 - oe-selftest - INFO - Skip by the command line argument "runtime_test" 2019-06-17 09:25:10,523 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver) 2019-06-17 09:25:10,523 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "runtime_test"' 2019-06-17 09:25:10,523 - oe-selftest - INFO - Skip by the command line argument "runtime_test" The archiver.Archiver.xxx tests should be skipped by 'archiver' command line argument, not 'runtime_test'. Change to use a function generator to achieve the desired effect. After the change, the effect is as follows. $ oe-selftest -R archiver bblayers runtime_test 2019-06-17 09:19:06,223 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it 2019-06-17 09:19:19,598 - oe-selftest - INFO - Adding layer libraries: 2019-06-17 09:19:19,599 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta/lib 2019-06-17 09:19:19,599 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib 2019-06-17 09:19:19,599 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-selftest/lib 2019-06-17 09:19:19,602 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable 2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf 2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf 2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver) 2019-06-17 09:19:24,369 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"' 2019-06-17 09:19:24,369 - oe-selftest - INFO - Skip by the command line argument "archiver" 2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver) 2019-06-17 09:19:24,370 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"' 2019-06-17 09:19:24,370 - oe-selftest - INFO - Skip by the command line argument "archiver" 2019-06-17 09:19:24,370 - oe-selftest - INFO - test_archiver_filters_by_type_and_name (archiver.Archiver) 2019-06-17 09:19:24,370 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"' 2019-06-17 09:19:24,371 - oe-selftest - INFO - Skip by the command line argument "archiver" 2019-06-17 09:19:24,371 - oe-selftest - INFO - test_archiver_srpm_mode (archiver.Archiver) 2019-06-17 09:19:24,371 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"' 2019-06-17 09:19:24,372 - oe-selftest - INFO - Skip by the command line argument "archiver" 2019-06-17 09:19:24,372 - oe-selftest - INFO - test_bitbakelayers_add_remove (bblayers.BitbakeLayers) 2019-06-17 09:19:24,373 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "bblayers"' 2019-06-17 09:19:24,373 - oe-selftest - INFO - Skip by the command line argument "bblayers" 2019-06-17 09:19:24,373 - oe-selftest - INFO - test_bitbakelayers_createlayer (bblayers.BitbakeLayers) 2019-06-17 09:19:24,373 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "bblayers"' 2019-06-17 09:19:24,374 - oe-selftest - INFO - Skip by the command line argument "bblayers" [snip] (From OE-Core rev: 50004f431a71c71af4acf0f25403fee5a8447eab) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-14selftest/devtool: fix URI to MarkupSafe packageOleksandr Kravchuk
PyPi packages are now hosted at files.pythonhosted.org. [YOCTO #13243] (From OE-Core rev: 384e2c3765c77c29527a43f2e0bffbc41170eeb6) Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-14oescripts.py: avoid error when cairo module is not availableChen Qi
When running 'oe-selftest -r oescripts', the following error appeared. cls.skipTest('Python module cairo is not present') TypeError: skipTest() missing 1 required positional argument: 'reason' This is because the host does not have the cairo python module installed. Fix this problem by using unittest's SkipTest exception. (From OE-Core rev: 785bb108ceb9dc137ec8d75d887b6a3869cbfb9c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-12selftests: add tests for INCOMPATIBLE_LICENSEQuentin Schulz
One bug went unnoticed without these selftests: an INCOMPATIBLE_LICENSE with a non-SPDX license for a package with that non-SPDX license wasn't enforcing the denial of build for said package. See 4b6ce4604cc15e289a48f8586d58a101b7a70b52 ("meta: license: fix non-SPDX license being removed from INCOMPATIBLE_LICENSE") While adding a test for that particular case, let's add a few more so that we cover a handful more use cases of INCOMPATIBLE_LICENSE. (From OE-Core rev: 6c2ca52218c196e7ccf6b3275bffc3e3a04193c6) Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-10recipetool: add python3 supportMaciej Pijanowski
Add support for generating python3 recipes using the recipetool / devtool. Drop python2 support at the same time. Tested with: oe-selftest -r recipetool.RecipetoolTest [YOCTO #13264] (From OE-Core rev: d8b2f58974482b3b1ccc65c5f93104d0d7ba87bc) Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-10multiconfig: Adapt to bitbake switch 'multiconfig' -> 'mc'Richard Purdie
(From OE-Core rev: 8a6f7c1e455156966f467008645fef14db679ccf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-10oeqa: Add reproducible build selftestJoshua Watt
Adds an initial test for reproducible builds to the OE selftest. This initial test builds core-image-minimal using sstate, then does a clean build without sstate in another build directory, and finally does a binary comparison of the resulting package files between the two builds. The test is currently always skipped since it doesn't pass yet, but it can easily be enabled locally (From OE-Core rev: 2e591bdf93ec9e59b900562263dfe8e72b163baa) Signed-off-by: Joshua Watt <JPEWHacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-08qemurunner: fix undefined variableAdrian Freihofer
While hacking on this I got an Exception. It's better to define variables also in python. Signe:-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> (From OE-Core rev: 1ea225a86cdee4ed932ede509d3351d5aecae497) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-08oeqa/runtime: add simple test for sconsTim Orling
This test simply compiles a hello world program using scons. (From OE-Core rev: bf6e3f0f3a7a134e8e3cb16366ef01b8c956e4c8) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-07gpg_sign/selftest: Fix secmem parameter handlingRichard Purdie
We keep seeing "cannot allocate memory" errors from rpm when signing packages on the autobuilder. The following were tried: * checking locked memory use (isn't hitting limits) * Restricting RPM_GPG_SIGN_CHUNK to 1 * Limiting to 10 parallel do_package_write_rpm tasks * Allowing unlimied memory overcommit * Disabling rpm parallel compression and the test still failed. Further invetigation showed that the --auto-expand-secmem wasn't being passed to gpg-agent which meant the secmem couldn't be expanded hence the errors when there was pressure on the agent. The reason this happens is that some of the early gpg commands can start the agent without the option and it sticks around in memory so a version with the correct option may or may not get started. We therefore add the option to all the key gpg calls. (From OE-Core rev: c7e131a76e522503df55e211dd261829feacfa28) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-07oeqa/utils/qemurunner: Set both the threadport&serverport with tcpserial ↵Kevin Hao
parameter After the commit ad522ea6a64e ("runqemu: Let qemuparams override default settings"), the order of the two "-serial" parameters when running the qemu have been switched. The effect of this is that the logging thread will use ttyS1 (of course can't capture the kernel boot message anymore), and the test command will run on the ttyS0. So the output of the test command may be mangled by the kernel message (such as call trace), and let the test command produce a fake timeout error message. We can't fix it by just adjusting the order of the threadport and serverport, since it will break some machines such as qemuarm64 which use the virtio serial. So using the tcpserial to setup both the threadport and serverport. [YOCTO Bug 13309] (From OE-Core rev: 9f2005dee41b1ef5a0d1f7b69bcd6c8352dac016) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-04resulttool: modify to be multi-machineJon Mason
Currently, the code will sum all of the different machine results into a single report of the tests results. This can lead to confusion as to which machine may be experiencing issues. Modify the code to store the results in a per machine basis and report them accordingly. (From OE-Core rev: 16d4031ea5df8a4ddfdb937d35464c09e1abd10e) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-04lib/oe/reciputils.py: support character `+' in git pvHongxu Jia
While pv contains char `+' (such as ncurses 6.1+20181013), it was incorrectly converted to `6.1' In this commit: - Convert [^\+]* to .*? Support pv to contain char `+' and not greedy match (Such as ncurses 6.1+20181013) - Add [^\+] to sfx match Support sfx contains extra chars between `+' and `git' (such as asciidoc "8.6.9+py3-gitAUTOINC+618f6e6f6b") - Make sfx and rev greedy match Run `devtool check-upgrade-status --all' in poky and compare results, only one difference on ncurses version: Without the commit: INFO: ncurses 6.1 6.1+20181013 Hongxu Jia <hongxu.jia@windriver.com> 7a97a7f937762ba342d5b2fd7cd090885a809835 With the commit: INFO: ncurses 6.1+20181013 MATCH Hongxu Jia <hongxu.jia@windriver.com> 7a97a7f937762ba342d5b2fd7cd090885a809835 (From OE-Core rev: 8049bd34b89e710f7bb20883813ba3f929d9e997) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-21gdb: Upgrade from 8.2.1 to 8.3Alistair Francis
Bump GDB and change the oeqa selftest expression to allow ptests to pass. (From OE-Core rev: f31986ed9f82c48834b2f25979c93697228acbf7) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15oeqa/targetcontrol.py: fix qemuparams not work in runqemu with launch_cmdHongxu Jia
As runqemu with launch_cmd means directly run the command, don't need set rootfs or env vars. Since commit [a847dd7202 runqemu: Let qemuparams override default settings] applied in oe-core, if launch_cmd contains "qemuparams='***'", it does not work, which is overridden by latter qemuparams="-serial tcp:127.0.0.1" in QemuRunner.launch(); So we set qemuparams as a parameter in runqemu, the fix makes it work (From OE-Core rev: 4f0a576fd5b9373cff4ca5ac92ec6af29499df89) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-13oeqa/target/ssh: Replace suggogatepass with ignoring errorsRichard Purdie
We continued to see encoding problems with ssh commands run in oeqa. After much research the conclusion was we should use ignore the errors since some occasional bad locale encoding is better than the unicode decoding issues we were seeing which crashed large parts of tests. (From OE-Core rev: b3bae8aba5b897c1afcc8bf4ad8929251812d2b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12oeqa/selftest: Automate manual pybootchart testsRichard Purdie
Automate the current manual pybootchart tests. This includes a check for the cairo dependency, skipping the test if appropriate. Based on original patch from Armin Kuster <akuster808@gmail.com> (From OE-Core rev: ff5370a381a4996b7da56aaaa7055f7a1786c823) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12oeqa/concurrenttest: Patch subunit module to handle classSetup failuresRichard Purdie
Currently setupClass errors were not being mapped back to the failing tests and they were hence being marked as UNKNOWN and the test statistics were inaccurate. This is because whilst the errors were being encoded into the test results stream, the decoder doesn't cope with an error outside a testStart event. We patch in an addError handler to the outsideTest parser so that this does get handled in a way similar to the non-concurrent case. It would be nice if we didn't have to do this but there doesn't seem to be any other way to fix this other than forking subunit. We also make a minor change so another of our changes can cope with tests without a start time. (From OE-Core rev: 8f7352ed9c1a3e82689b842b7f87e469ebf2e48f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12oeqa/runner: Fix subunit setupClass/setupModule failure handlingRichard Purdie
The string format for subunit setupClass/setupModule failures is slightly different, tweak the regex to correctly handle both cases. (From OE-Core rev: 425fbba9348420df72de5c6292f50acaf2023d0b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>