summaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2021-01-20oeqa/selftest: binutils-cross-x86_64 -> libgcc-initialrbt/oeqaRobert Yang
The binutils-cross-x86_64 is not avaliable for non x86-64 machines. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2021-01-20oeqa/selftest/imagefeatures: adding fitImage initramfs bundle testcaseAbdellatif El Khlifi
This commit provides a testcase for the initramfs bundle support implemented in kernel-fitimage.bbclass The testcase verifies the content of the initramfs bundle node in the FIT Image Tree Source (its). The testcase is self-contained and the configurations are set by the test case itself. To verify the initramfs bundle support, the testcase uses beaglebone-yocto machine. This testcase can be run through the following command: oe-selftest -r fitimage.FitImageTests.test_initramfs_bundle Change-Id: I8ab8abf2c150ea515fd439784eb20c6b092bfbc5 Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20ccache.bbclass: Use ccache-native and disable ccache for native recipesRobert Yang
Since host's ccache is not reliable, so disable ccache for native recipes and use ccache-native for other types of recipes. We need disable ccache for native recipes is because ccache-native now depends on cmake-native which causes circular dependencies, and it's not easy to break the circular. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20Revert "ccache.bbclass: use ccache from host distribution"Robert Yang
This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8. Will use ccache-native which is more reliable. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-17oeqa/ptest: print a warning if ptests failedAlexander Kanavin
This allows spotting ptest regressions without having hard ptest failures (for that full ptest stability should be achieved). Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16deb: do not insert feed uris if apt not installedHongxu Jia
- The dir /etc/apt was created in package apt, if package apt was not installed, there is no need to insert package feed. Otherwise, it will fail with no such dir - Output the result of apt install - Explicitly trust the deb package repository from build This could avoid apt install warning: ... WARNING: The following packages cannot be authenticated! ... - Also trust the inserted deb package repository from PACKAGE_FEED_URIS Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16rootfs: add option to allow delayed postinsts on read-only rootfsAnton Kachalov
Example use case in OpenBMC: rootfs is squashfs and the system has either overlayfs for whole rootfs or for some parts (e.g. /etc). This option will allow to create migration one-shot postinsts using "pkg_postinst_ontarget_${PN}" routines defined in recipes to fix files under upper workdir in overlayfs. Signed-off-by: Anton D. Kachalov <rnouse@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16lib/oe/utils: Return empty string in parallel_makeTomasz Dziendzielski
In cmake.bbclass we set CMAKE_BUILD_PARALLEL_LEVEL using parallel_make function and if PARALLEL_MAKE is set to empty string then this variable is exported as "None" causing cmake to fail with: "'CMAKE_BUILD_PARALLEL_LEVEL' environment variable invalid number 'None' given." Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13rootfs_ipk: allow do_populate_sdk in parallel to do_rootfsMichael Ho
Switch do_populate_sdk for the ipk package manager to use a separate target opkg config file and separate the lockfiles restricting do_rootfs and do_populate_sdk from running in parallel. This way if an image recipe includes a dependency to do_populate_sdk by default then it will run in parallel to do_rootfs saving time compared to the sequential execution. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-08selftest: Add argument to keep build dirPaul Barker
The oe-selftest code already keeps the selftest build directory in place if any tests failed. By default the build directory is deleted if all tests pass but there may be cases where it's desirable to keep this directory around, for example to compare intermediate files between passing and failing test runs. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-05oe-pkgdata-util: Added a test to verify oe-pkgdata-util without parametersMilan Shah
A test is implemented on poky/meta/lib/oeqa/selftest/pkgdata.py to test the scenario when oe-pkgdata-util is executed without parameters and help is displayed. See [YOCTO #10726] for detailed bug information. Signed-off-by: Milan Shah <mshah@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-31oeqa/suspend : add test for suspend stateTeoh Jay Shen
This test case is checking the command and LAN device behaviour before and after suspend state. The Test_if_LAN_device_works_well_after_resume_from_suspend_state and standby manual test cases 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-12-31ccache.bbclass: use ccache from host distributionAlexander Kanavin
ccache 4.x has hard dependencies on cmake-native (used as build system) and zstd, which means inserting ccache-native as DEPENDS into everything creates circular dependencies which are impossible to break. ccache 3.x did not have this problem as it used plain makefiles and an in-tree copy of zlib. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30selftest/reproducible: Add useradd-staticids to reproducible builds testsRichard Purdie
Its surprising we've made it this far without this, add in some specific uid/gid settings to ensure these don't cause false positives to the tests. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30selftest-chown: add test for fifosTrevor Woerner
Verify that fifos are properly handled by the build system. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-24oeqa/selftest/cases/devtool.py: fix typo in ignore_patterns callSteve Sakoman
Causes intermittent autobuilder errors: 2020-12-21 19:34:23,035 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/devtool.py", line 68, in setUpModule bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1460, in edit_bblayers_conf (updated, newlines) = edit_metadata(newlines, ['BBLAYERS'], handle_bblayers) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1290, in edit_metadata if handle_var_end(): File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1215, in handle_var_end (newvalue, newop, indent, minbreak) = varfunc(in_var, full_value, op, newlines) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1425, in handle_bblayers res = edit_cb(layer, canonicalise_path(layer)) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/devtool.py", line 60, in bblayers_edit_cb shutil.copytree(pth, destdir, ignore=ignore_patterns('*.pyc', '__pycache__')) NameError: name 'ignore_patterns' is not defined Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-21oeqa/terminal : improve the test caseTeoh Jay Shen
-Improve this test case to fulfill the requirements of replacing the click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw : 1) verify that the terminal window is working without problem 2) verify that there's only 1 terminal window is launched Signed-off-by: Teoh Jay Shen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-21oeqa/commands: Ensure sync can be found regardless of PATHRichard Purdie
Avoid command not found errors shown in selftest logs due to changes to PATH settings which also risks intermittent problems due to IO load. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20lib/oe/qa: handle the 'no specific instruction set' ELF e_machine valueRoss Burton
[RP: Update OEQA selftest to match change] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20oe-selftest: fitimage: add test for signing FIT imagesPaul Eggleton
Add a new test to verify signing FIT images. Also includes testing for the newly introduced FIT_SIGN_INDIVIDUAL, UBOOT_MKIMAGE, UBOOT_MKIMAGE_SIGN, and UBOOT_MKIMAGE_SIGN_ARGS variables. Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20oe-selftest: fitimage: Test for FIT_DESCPaul Eggleton
Add verification of FIT_DESC to the existing test for kernel-fitimage. Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20oe-selftest: move FIT image tests to their own modulePaul Eggleton
I'm about to add an additional test, and on the assumption that we might also add more in future it seems reasonable to have the tests in their own module. Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20bitbake.conf: Prevent pyc file generation in pseudo contextPaul Barker
This also effectively reverts commit b6d30c21b0: bitbake.conf: Extend PSEUDO_IGNORE_PATHS to ${COREBASE}/meta The contents of ${COREBASE}/meta were ignored as pyc files could be generated for the contents of the lib subdirectory if python modules were imported within a pseudo context. However this doesn't protect us from pyc files being generated in the lib directories for other layers. It's far better to tell python not to produce pyc files when running under pseudo (by setting the PYTHONDONTWRITEBYTECODE variable) as this will cover any location where pyc files could possibly be created. This variable is set in FAKEROOTBASEENV so that it applies to the bitbake-worker instance for fakeroot tasks, preventing pyc files from being generated for imports in python tasks themselves. Also add a test case to ensure that pyc files are not created in tasks which are executed under pseudo. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20lib/oe/path: Add canonicalize()Peter Kjellerstedt
oe.path.canonicalize() is used to canonicalize paths (i.e., remove symbolic links and "..", and make them absolute). It takes a string with paths separated by commas, and returns the canonicalized path in the same format. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15wic: Introduce empty plugin to create unformatted empty partitionsDiego Sueiro
The empty wic plugin is used to create unformatted empty partitions for wic images. To use it you must pass "empty" as argument for the "--source" parameter in the wks file. For example: part foo --source empty --ondisk sda --size="1024" --align 1024 Also adds a selftest for this plugin where the 'Fstype' column from 'wic ls' should be empty for the second partition as listed in test_empty_plugin.wks. Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15selftest/reproducible: add an exclusion list for items that are not yet ↵Alexander Kanavin
reproducible Hopefully over time this list will be reduced to an empty one. Non-reproducible excluded packages are not given to diffoscope and do not cause a failure, but still saved side-by-side with non-reproducible failing ones to make investigation easier. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15selftest/reproducible: enable world reproducibility testAlexander Kanavin
Add systemd and pam distro features, and commercial license flag to include more recipes into the world set. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-09meta/lib/oe/reproducible.py: gitsm:// works just as fine as git:// for ↵Alexander Kanavin
timestamps This in particular addresses vulkan-samples reproducibility which made me scratch my head for a while. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-06meta/lib/oeqa/manual/oe-core.json: Update test_bitbake_devshellsangeeta jain
Update command used for cross compilation to include ${CONFIGUREOPTS} to ensure right arguments are passed for cross compiling on any host. Signed-off-by: sangeeta jain <sangeeta.jain@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-06oeqa/selftest/containerimage: update for improved cleanupRoss Burton
ldconfig/aux-cache isn't generated anymore, and the opkg directories are correctly removed now. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-06package_manager/ipk: improve remove_packaging_dataRoss Burton
/var/cache/opkg wasn't being deleted, and /var/lib/opkg doesn't need to exist as there are no lockfiles that write into it after this step. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-03package_manager/ipk: neaten OPKGLIBDIR logicRoss Burton
oe.path.join handles path components starting with / for us. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-03oeqa/devtool: use Yocto mirror for pv-1.5.3 tarballRoss Burton
Some of the selftests failed over the weekend with "access denied" errors fetching this tarball. Instead of relying on upstream when fetching the tarball, use the Yocto source mirrors instead. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24uninative: Don't use single sstate for pseudo-nativeRichard Purdie
pseudo-native is a bit special. It conditionally compiles in support for xattr, statx and statvfs amongst other options. If a pseudo-native binary is used on a system where these functions are present but it wasn't compiled in we see hard to debug permissions problems. An example is the devtool.DevtoolExtractTests.test_devtool_deploy_target oe-selftest which shows a cryptic error: File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", line 1388, in test_devtool_deploy_target self.assertEqual(filelist1, filelist2) File "/usr/lib64/python3.9/unittest/case.py", line 831, in assertEqual assertion_func(first, second, msg=msg) File "/usr/lib64/python3.9/unittest/case.py", line 1037, in assertListEqual self.assertSequenceEqual(list1, list2, msg, seq_type=list) File "/usr/lib64/python3.9/unittest/case.py", line 1019, in assertSequenceEqual self.fail(msg) File "/usr/lib64/python3.9/unittest/case.py", line 670, in fail raise self.failureException(msg) AssertionError: Lists differ: ['-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] != ['-rwxr-xr-x root root /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] First differing element 0: '-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor' '-rwxr-xr-x root root /etc/init.d/mdmonitor' This is due to a version of pseudo without statx being used on a system where ls uses statx, hence the files are displayed as 6000.6000 instead of root.root. Avoid this by always building pseudo-native for the specific distro in question rather than using a universal sstate feed. This hopefully fixes one of the mysterious AB-INT issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24package management: Allow dynamic loading of PMFredrik Gustafsson
Dynamic loading of package managers will allow other layers to simply add their package manager code in package_manager/ and have bitbake find it according to the package manager configuration. This is useful for adding new (faster) package managers to Open Embedded while not increasing the test scope or require Open Embedded to support more package managers. How this is tested: * Build core-image-minimal with all three package managers * Build the sdk with all three package managers. dpkg fails, but it fails on master as well. * Run the complete test suite, all tests passed except 16 * Run those 16 tests on master and verify that they fail there as well * Fix errors making tests works on master but not with this patch. Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>