summaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2020-11-24oeqa/commands: Fix compatibility with python 3.9Richard Purdie
Python 3.9 dropped isAlive() so use the preferred is_alive(). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24cases/bbtests.py: ensure PACKAGE_CLASSES is set to RPM for ↵Chris Laplante
bbtests.BitbakeTests.test_force_task_1 This is because the test expects to find "do_package_write_rpm" in the bitbake output. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-16meta: drop _PYTHON_SYSCONFIGDATA_NAME hacksAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-13systemtap: split runtime material in its own packageYann Dirson
Note the _class-target qualifier, here to prevent a funky dependency of systemtap-native on systemtap-native-runtime-native. This possibly hints to something deeper ? Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11oeqa/core/context: initialize _run_end_timeKonrad Weihmann
with _run_start_time as value. For partial results of interrupted runs, this info might be otherwise missing for at least one testcase Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11oeqa/core/context: expose results as variableKonrad Weihmann
register an unittest handler for testresults and expose it as variable result. With this even partial results from an interrupted test suite run can be made available Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11wayland-utils: introduce a recipeAlexander Kanavin
wayland-utils contains wayland-info utility which deprecates and replaces weston-info from weston. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11weston-init: correctly start under systemdAlexander Kanavin
Several issues are addressed: 1. weston requires pam when starting under systemd 2. systemd was attempting to launch weston twice (from sysvinit script and from systemd unit file) which caused confusion and errors. 3. runtime test should stop/start weston via systemd only if systemd actually controls system startup, not merely when systemd is present. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-03sstatesig: Remove workaround for bitbake taskhash bugRichard Purdie
When trying to lock an individual signature, we see the checksum calculations of dependent tasks failing. The fix is to remove a bad optimisation within bitbake but with the removed, we need to remove some bogus code with OE-Core's sstatesig code too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-31deb: export INTERCEPT_DIR for remove actionsRichard Leitner
During the do_populate_sdk task apt-get purge is called by deb's remove function. This fails with error messages similiar to the following one if any of the included packages uses intercepts as the INTERCEPT_DIR isn't exported: .../*.postinst: line 4: /postinst_intercept: No such file or directory Therefore fix it by exporting the INTERCEPT_DIR variable within the remove function. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-30scripts/buildhistory_analysis: Avoid tracebacks from file comparision codeRichard Purdie
We're seeing tracebacks from buildhistory analysing the python 3.8 -> 3.9 upgrade due to the significant file renames. Avoid these by checking before removal as they can happen multiple times. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-30deb: replace deprecated apt force-yes argumentRichard Leitner
apt-get deprecated --force-yes in favor of various options starting with --allow [1]. Replace it to avoid the following warning: W: --force-yes is deprecated, use one of the options starting with --allow instead. [1] https://salsa.debian.org/apt-team/apt/-/blob/master/debian/changelog Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-30sstatesig: Log timestamps for hashequiv in reprodubile builds for do_packageRichard Purdie
Currently if a task generates the same output with different timestamps, hasequiv won't detect it but reproducibile builds will fail tests due to the different timestamps. Add do_package timestamps to the hash when reproducibile builds are enabled to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-22imagefeatures: New test case, test_empty_image, addedKhairul Rohaizzat Jamaluddin
An empty image build file exists under the meta-selftest folder, test-empty-image.bb, which builds an image with no additional packages. However, there were no further selftest created to verify its emptiness This change consists of the selftest related to the said image to verify its emptiness and the 'import glob' moved as global import instead of local import. The expected outcome of the test should be TRUE or 1 if the .manifest file content is empty. [YOCTO #8455] Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20oeqa: Add sync call to command executionRichard Purdie
We previously put a sync call into devtool to try and combat the bitbake timeout issues on the autobuilder. It isn't enough as the timeouts occur mid test. They are also occurring on non-devtool tests. Add in sync calls around command execution instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20lib/oe/rootfs: introduce IMAGE_LOG_CHECK_EXCLUDESKonrad Weihmann
When using rpm as package manager and trying to install a file called '/usr/share/doc/What to when an Error occurs.txt' log_check falsely errors out on the build, because used regex match on 'DEBUG: Removing manifest: /path/usr/share/doc/What to when an Error occurs.txt'. To handle such cases introduce IMAGE_LOG_CHECK_EXCLUDES, to allow user to add custom exclude regex to log_check exclude list Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-13IMAGE_LOCALES_ARCHIVE: add option to prevent locale archive creationMichael Thalmeier
Under some circumstances it is not desirable to create a combined locale archive (/usr/lib/locale/locale-archive). The new variable IMAGE_LOCALES_ARCHIVE defaults to '1', so the default behaviour is not changed. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10oeqa/selftest/runtime_test: Exclude gpg directory from pseudo databaseRichard Purdie
Avoid pseudo abort()s like: path mismatch [1 link]: ino 6295376 db '/tmp/oeqa-feed-sign-2mw7z81v/S.gpg-agent.yocto-native' req '/tmp/jwkivmu6'. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10bitbake-bblayers/create: Make the example recipe print its messageYoann Congal
The example recipe is setup to print a message using bb.plain() in the "do_build" task but this task is "noexec" so the message never prints. This might be confusing. This moves the message printing into another "do_display_banner" task and add it to the do_build "before" list. Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-08selftest: add test for recipes with patches in overridesRoss Burton
devtool doesn't quite behave right when a recipe has patches applied in overrides, so add a test case to exercise that behaviour. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-08selftest: skip npm tests if nodejs-native isn't availableRoss Burton
The tests are actually skipped if meta-oe isn't present which isn't quite the same thing, but hopefully close enough. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07base/bitbake.conf: Enable pseudo path filteringRichard Purdie
This is a pretty big change to the way pseudo operates when used in OpenEmbedded. Normally, pseudo monitors and logs (adds to its database) any file created or modified whilst in a fakeroot environment. There are large numbers of files we simply don't care about the permissions of whilst in that fakeroot context, for example ${S}, ${B}, ${T}, ${SSTATE_DIR}, the central sstate control directories, This change uses new functionality in pseudo to ignore these directory trees, resulting in a cleaner database with less chance of "stray" mismatches if files are modified outside pseudo context. It also should reduce some overhead from pseudo as the interprocess round trip to the server is avoided. There is a possible complication where some existing recipe may break, for example, we found a recipe which was writing to "${B}/install" for "make install" in do_install and since we listed ${B} as not to be tracked, there were errors trying to chown root for files in this location. This patch fixes a few corner cases in OE-Core when used with this new ignore list: * The archiver directory matched a "${WORKDIR}/deploy*" pattern so was renamed to something else since that directory does need its root permissions * The ${S} and ${B} ignoring is conditional on them being different to ${WORKDIR} * package_write_* task output (the debs/rpms/ipks) are now owned by the build user so we don't want the file ownership information in the hashequiv outhash calculation even if they are built under pseudo. * The fontcache postinstall intercept is run under qemu outside of pseudo context so delete files it may delete up front where pseudo can see this. * SSTATE_DIR is in PSEUDO_PATHS_IGNORE, which is in FAKEROOTENV which is cached by bitbake. We therefore need to trigger reparsing if this changes, which means SSTATE_DIR can be in BB_HASHBASE_WHITELIST but not BB_HASHCONFIG_WHITELIST. Rework the variables to handle this. This otherwise breaks some of our sstate tests in oe-selftest. * Ignore the temp directory wic uses for rebuilding rootfs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30oeqa/selftest/devtool: Add sync call to test teardownRichard Purdie
Devtool tests are heavy on IO and if bitbake can't write out its caches, we see timeouts. Call "sync" around the tests to ensure the IO queue doesn't get too large, taking any IO hit here rather than in bitbake shutdown. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30testsdk.py: remove workspace/sources to avoid failure in case of multilibChen Qi
When multilib is enabled, there are multiple environment scripts, and the test cases for eSDK are executed for each environment script. And we will have the following problem when executing test cases for the second environment script. ERROR: Source tree path /.../workspace/sources/librdfa already exists and is not empty So after executing test cases for one environment, we clean up the sources diretory to avoid such failure. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30oeqa/selftest/cases/devtool.py: avoid .pyc raceTim Orling
In certain conditions, most likely under heavy load on the AutoBuilder, the prebuilt .pyc files are attempting to be executed before they have been completely copied. Avoid this by not copying the .pyc files (nor the __pycache__ directory). The impact of python3-native recreating the .pyc files should hopefully be negligible. YOCTO#13421 YOCTO#13803 Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30target/ssh.py: Add dump_target supportSaul Wold
This adds the dump_target support when the ssh command fails with a 'No route to host'. This is will provide additional data when a Qemu target fails to respond during autobuilder testing. This does not fix 14002 [0], but may help track down why qemu looses networking [0] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14002 Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30testimage: Add testimage_dump_target to kwargsSaul Wold
This passes the list of commands to run on the OEQemuTarget when the TargetDumper needs to run in a test context due to a failure on the target. This is added here as a kwargs because the 'd' dictionary is not available in the staticmethod getTarget in the OERuntimeTestContextExecutor class. The OEQemuTarget is different from the QemuTarget which already uses the list of commands from testimage_dump_target from 'd'. The create_dir() is needed to initialize the TargetDumper's dump_dir variable. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30utils: respect scheduler affinity in cpu_count()Ross Burton
cpu_count() returns multiprocessing.cpu_count() but that is simply returns os.cpu_count() so we could use that directly. However this returns the number of CPUs on the host, not the number of usable CPUs on the host. If the user is using scheduler affinity then the number of usable CPUs may be less, so when determining how many cores we can use check the affinity instead. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-28oeqa/runtime : add test for RTC(Real Time Clock)Teoh Jay Shen
This test is checking the functionality of the RTC(Real Time Clock). The Check_if_RTC_(Real_Time_Clock)_can_work_correctly manual test case from oeqa/manual/bsp-hw can be replace by this runtime test. Signed-off-by: Teoh Jay Shen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23oeqa/selftest/containerimage: Update to match assumptions in configurationRichard Purdie
Assumptions in the test mean it doesn't work with ssh-pregen-hostkeys. It also doesn't work with systemd. Update the configuration to make sure neither of these effect the test. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23oeqa/selftest/incompatible_lib: Fix append usageRichard Purdie
It's pure luck this has worked so far, add a missing space to the append. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-20oeqa/qemurunner: Increase serial timeoutRichard Purdie
Increase the serial login timeout from 60 to 120s. This seems like a long time, however for a qemumips image with systemd+PAM and openssh, (e.g. core-image-sato-sdk + DISTRO=poky-altcfg), the getty connects to systemd's pam module which waits on logind and 45s for all this to happen at the same time as things like ssh key generation happens is not unknown. Increase the timeout to match the longer times we know these things can take in the worst case scenarios since we're tired of intermittent issues related to the serial login affecting the autobuilder. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-14wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi ↵Khairul Rohaizzat Jamaluddin
and bootimg-partition Due to recent changes in bootimg-efi to include IMAGE_BOOT_FILES, when both bootimg-partition and bootimg-efi occur in a single .wks and IMAGE_BOOT_FILES are defined, files listed in IMAGE_BOOT_FILES will be duplicated in both partition. Since IMAGE_BOOT_FILES are crucial for bootimg-partition, but optional for bootimg-efi, hence allowing bootimg-efi to have the option to ignore it. The new variable, IMAGE_EFI_BOOT_FILES, was added to help handle this issue. Its basic usage is the same as IMAGE_BOOT_FILES. Usage example: ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \ This commit is also squashed with the updated testcase to cover for this change. [YOCTO #14011] Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-14oeqa/runtime: add test for matchbox-terminalTeohJayShen
This test is checking that the terminal application is able to run. The click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw can be replace by this runtime test. Signed-off-by: TeohJayShen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-14oeqa/weston: Fix tests to run with systemdKhem Raj
Currently, weston tests fail when using systemd, fix it by providing transient unit file and inject it via systemd-run, which generates a service file automatically and launches another weston instance to test if it can launch a nested instance. Use systemctl stop to end the service and cleanup, instead of brutal kill Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-08oeqa/concurrencytest: Improve builddir path manipulationsRichard Purdie
Its possible some patterns may cause problems with the current path manipulations, make a small tweak to try and avoid potential pathname overlap issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-08selftest/signing: Ensure build path relocation is safeRichard Purdie
Similarly to 04ee0e8b95cd8ed890374e0007f976684206b630, ensure only full build paths are replaced in the environment to avoid breaking buildtools. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-03package.bbclass: hash equivalency and pr serviceMark Hatle
When the PR service is enabled a number of small changes may happen to variables. In the do_package step a call to package_get_auto_pr will end up setting PRAUTO and modifying PKGV (if AUTOINC is there). PRAUTO is then used by EXTENDPRAUTO, which is then used to generate PKGR. Since this behavior typically happens BEFORE the BB_UNIHASH is calculated for do_package, we need a way to defer the expansion until after we have the unihash value. Writing out the pkgdata files w/o AUTOPR and PKGV (AUTOINC) expanded to placeholder values is the easiest way to deal with this. All other variables are expanded as expected. In the next task, typically do_packagedata, we will then use the UNIHASH from the do_package to get the PR (AUTOPR) as well as generate the AUTOINC replacement value (now PRSERV_PV_AUTOINC). The do_packagedata then translates the placeholders to the final values when copying the data from pkgdata to pkgdata-pdata-input. Also update the prservice test case. With unihash, just changing the do_package (via a _append) will not change the PR. So write the date to a specific file that is incorporated into the unihash to ensure it is always different for the test. Various assert messages were also updated to make it easier to figure out where/why a problem occured. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02selftest/prservice: Improve test failure messageRichard Purdie
When failing, give more information about why exactly a failure is happening such as the PR values in question. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02oeqa: reproducible: Fix test not producing diffsJoshua Watt
Diffoscope changed the --exclude-directory-metadata option to require an argument. Add a test to validate that diffoscope is functioning as expected to ensure that future upgrades do not unintentionally break the reproducibility tests. [YOCTO #14025] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02oeqa: sdk: Capture stderr outputJoshua Watt
Redirect stderr to stdout when running subcommands while doing the SDK tests. The tests will show stdout when CalledProcessError is raised, but any output to stderr was lost. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28oeqa/multilib: un-skip the connman testAlexander Kanavin
It was previously skipped as it was expecting plain connman to not be in the image, and for core-image-sato connman is always there. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28oeqa/multilib: rework to use readelf from the hostAlexander Kanavin
It is difficult and error-prone to ensure binutils gets installed into target images where this test may run; on the other hand readelf is always present on the host, as it is a part of HOSTTOOLS. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28oeqa/x32lib: rework to use readelf from the hostAlexander Kanavin
It is difficult and error-prone to ensure binutils gets installed into target images where this test may run; on the other hand readelf is always present on the host, as it is a part of HOSTTOOLS. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-27lib/oe/recipeutils.py: add support for BBFILES_DYNAMICNaveen Saini
Instead of relying on value of BBFILES from bitbake, devtool parses the layer.conf because the layer might not be in bblayers.conf. And it currently does not consider the value of BBFILES_DYNAMIC because of which recipes, in paths defined by BBFILES_DYNAMIC, upgraded using devtool end up in wrong location. Include the code from bitbake to append values to BBFILES based on what is in BBFILES_DYNAMIC too. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26oeqa/selftest: Apply patch to fix cpio build with -fno-commonRichard Purdie
Patch a combined effort from Khem/RP, need to add$CONFIGURE_FLAGS to ensure tests still work. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26selftest/recipetool: Drop globbing SRC_URI test, no longer supportedRichard Purdie
Globbing is a bad idea in SRC_URI, it breaks the task checksums and can't really be fixed. Since we're removing it, drop the test for its interaction with recipetool. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-25oeqa: runtime_tests: Extra GPG debuggingJoshua Watt
This patch enables extra debugging for gpg to try and get more debugging information when [YOCTO #14003] occurs Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-22wic: Add 512 Byte alignment to --offsetJoshua Watt
Allows the --offset argument to use the "s" or "S" suffix to specify that it is reporting the number of 512 byte sectors. This is required for some SoCs where the mask ROM looks for an item at a sector that isn't aligned to a 1KB boundary. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-20oeqa/manual/bsp-hw.json : remove X_server_can_start_up_with_runlevel_5_boot testTeohJayShen
remove the test as graphical mode is already being validated Signed-off-by: TeohJayShen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>