summaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2019-08-30qemu: switch to '-vga std' emulated hardware from vmware/cirrus for x86/mipsAlexander Kanavin
This is the qemu default since qemu 2.2, is generally supported better, and is recommended by upstream. It also has already been in use for arm/risc and ovmf. Additional information: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13466 https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ '-vga virtio' emulated hardware remains in use when virgl is enabled via a runqemu override. Also, adjust the error whitelist, as there is a number of new messages coming from the drivers that are not actual errors. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30oeqa: reproducible: Do two clean buildsJoshua Watt
Perform two clean builds without sstate instead of one partial rebuild with sstate and one clean build without. There are some classes of reproducibility issues that this solves, and while we would like to resolve them in the long term the direction to do so is not currently clear. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30oeqa: Enable reproducible build testJoshua Watt
[YOCTO #13323] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30oeqa: reproducible: Record packages in test resultsJoshua Watt
Records the results of the reproducibility analysis in the JSON test results file. This makes it easier to do post-test analysis on the packages. [YOCTO #13324] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30oeqa: Set LD_LIBRARY_PATH when executing native commandsJoshua Watt
Some commands like to look for libraries at runtime manually (e.g. Python's ctype.utils.find_library() function). For this to work properly, the libraries in the native sysroot must be findable. To accomplish this, set LD_LIBRARY_PATH to search library paths in the native sysroot. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30oeqa: reproducible: Use subTest for packagesJoshua Watt
Runs each package class reproducibility test in a separate sub-test. This allows the other sub tests to still run in the event that one fails. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30oeqa: reproducible: Cleanup reproducible buildJoshua Watt
Cleans up the output from the reproducible build before building to ensure consistent results. Note that the output put is purposely left after around after the build so that non-reproducible packages can be diffed. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-29Remove LSB supportAdrian Bunk
LSB as a standard isn't current and isn't well suited to embedded anyway. Its putting artifical constraints on the system and with modern layer technology, would now be better off as its own layer. As such its time to split it out. The only part with some (marginal) usage is lsb_release, which is split from the lsb package into an own lsb-release package. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28oeqa/utils/nfs: Add unfs_server function to setup a userspace NFS serverNathan Rossi
Add a nfs module into oeqa utils. This module provides unfs_server which allows a test case to build unfs3-native and setup the unfs server on a target directory of the host. This directory is then shared and can be mounted by the host or a target device attached to the host (e.g. qemu via tap or slirp). The nfs server is setup over UDP and automatically assigns user privileged ports. The function provides the UDP ports for the server as part of a returned python contextmanager which handles cleanup of the server process on completion or exception. Also add a 'udp' arg to get_free_port to get a free UDP port. Note: unfs3 still requires the host to have rpcbind or portmap running. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-27commands.py: fix typoChen Qi
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-27bbtests.py: remove recipe-depends.dotChen Qi
This file is giving misleading information. There's a patch for bitbake to remove the generation of this file. Remove it from OEQA as well. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-27oeqa/kerneldevelopment: Able to apply a single patch to the Linux kernel sourceMazliana
Purpose of kernel development is basically to customize our own recipes kernel by reused existing recipes.   This is an initiative of automating manual kernel development test cases. Applying a single patch to the Linux kernel source is one of the manual test cases of kernel development. Objective of this test is as a developer we can make changes of a file in kernel source and able to apply a single patch to the kernel source.   ref:https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases Signed-off-by: Mazliana <mazliana.mohamad@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13oeqa/parselogs: grep for exact errors list keywordsKhem Raj
Given grep expression looks for error strings regardless of the semantics and this ends up it flagging things like *********************** Log: /mnt/a/yoe/build/tmp/work/raspberrypi3_64-yoe-linux-musl/yoe-qt5-wayland-image/1.0-r0/target_logs/weston.log ----------------------- Central error: EGL_KHR_create_context_no_error EGL_KHR_fence_sync *********************** here EGL_KHR_create_context_no_error is an API, therefore the check should be tightened a bit so explicitly look for error words so such false positives don't show up This helps in fixing wrong matches e.g. on rpi3 dmesg have strings like above Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13oeqa/buildgalculator.py: Add dependency on gtk+3Khem Raj
This helps in skipping this test on images which are not using gtk and as per the gcalculator website it needs gtk+3 or gtk+2 and libglade as the build first looks for gtk+3 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13lib/oeqa/utils/qemurunner.py: add runqemuparams after ↵Alexander Kanavin
kvm/nographic/snapshot/slirp Previously, 'nographic' was set first, and was overriding anything set via runqemuparams. Particularly, egl-headless from the virgl headless selftest was overriden, which broke the test in non-X environments. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-08sstatesig: Fix leftover splitting issue from siggen changeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06sstatesig: Updates to match bitbake siggen changesRichard Purdie
Update the metadata to correspond to the bitbake siggen task specification format change. This standardises on "<fn>:<task>" everywhere rather than the "." delimiter that was being used in some places. This is an API breaking change but means we now have a consistent format being used throughout the codebase without compatibility APIs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06sstate/sstatesig: Update to new form of BB_HASHCHECK_FUNCTIONRichard Purdie
Bitbake has updated to a cleaned up form of BB_HASHCHECK_FUNCTION, adapt to this cleanup. This is an API breaking change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06sstatesig: Update to handle BB_HASHSERVERichard Purdie
Update the code to handle BB_HASHSERV, an autostarted bitbake internal hash equivalency server suited to local developer usage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06sstatesig: Adpat to recent bitbake hash equiv runqueue changesRichard Purdie
Upstream bitbake now hanes preserving the unihash data itself, drop this usage of persist_data which was extremely problematic due to concurrent task access issues, particulary on loaded systems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06sstatesig: Add debug for incorrect hash server settingsRichard Purdie
If the hash server settings are incorrect, show the user useful error messages instead of tracebacks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03classes/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. 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. 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. 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. Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-20runtime_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. 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. 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. 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 ... 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. 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] 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. 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. 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. 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. 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. 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. 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 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-28oeqa: Cleanup /usr/bin/env pythonRobert Yang
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. 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. 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. 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. 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] 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. 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. 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. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19oeqa/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. 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... Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>