summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test
AgeCommit message (Collapse)Author
2022-03-04oeqa: selftest: overlayfs: add test for image with fstab entryStefan Herbrechtsmeier
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-01meta, meta-selftest: Replace more non-SPDX license identifiersPeter Kjellerstedt
In commit ceda3238 (meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers) all LICENSE variables were updated to only use SPDX license identifiers. This does the same for comments and other variables where it is appropriate to use the official SPDX license identifiers. There are still references to, e.g., "GPLv3", but they are then typically in descriptive text where they refer to the license in a generic sense. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25patch.py: Prevent git repo reinitializationPavel Zhukov
There were few bugs in the _isInitialized() function which might trigger git repo to be reinitialized and patches failing to apply. Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21oeqa/selftest/bblogging: Add logging tests for bb.build.exec_func with ↵Peter Kjellerstedt
shell/python code The situation regarding logging is different when a function called by bb.build.exec_func() fails compared to when the task code fails directly. There is a recent fix in bitbake to solve that and these tests will hopefully prevent regressions. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie
license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-17selftest/bbtests: Add tests for git floating tag resolutionRichard Purdie
This test ensures that where a floating tag is used for a git url, there aren't a number of different bugs such as inconsistent source revisions for the tag within a given build and that the recipe is reparsed at each run to ensure the tag is checked. A test is also added to ensure that the build fails if SRCPV (get_srcrev()) isn't used yet there is a floating tag. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11mdadm: update 4.1 -> 4.2Alexander Kanavin
Drop 0001-Compute-abs-diff-in-a-standard-compliant-way.patch (upstream refactored code) mdadm-fix-ptest-build-errors.patch (upstream fixed the issue) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30overlayfs: meta-selftest recipe fixVyacheslav Yurkov
Avoid strict assignment in the recipe to allow overrides in .inc file Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30meta: Add explict branch to git SRC_URIsRichard Purdie
There is uncertainty about the default branch name in git going forward. To try and cover the different possible outcomes, add branch names to all git:// and gitsm:// SRC_URI entries. This update was made with the script added to contrib in this patch which aims to help others convert other layers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-23oeqa/selftest: Add tests for bitbake shell/python task outputRichard Purdie
We've seen issues where shell/python tasks lose their log file entries or output and also where output is duplicated. Add some tests to attempt to spot regressions in this area in future. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-12overlayfs: meta-selftest recipeVyacheslav Yurkov
The recipe demonstrates example usage of overlayfs bbclass Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-12systemd-machine-units: add bbappend for meta-selftestVyacheslav Yurkov
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-15meta-selftest: Add HOMEPAGE / DESCRIPTIONDorinda Bassey
Added HOMEPAGE and DESCRIPTION for recipes with missing descriptions or homepage. Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10oeqa/selftest: add test to verify that poisoned sysroots are detectedRoss Burton
Add a recipe that explicitly searches /usr/include, and use that in oe-selftest to verify that host include paths are correctly causing build failures. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21selftest/incompatible_lic: Update the tests after the 'or-later' license ↵Richard Purdie
handling changes With the separate of the "-only" and "-or-later" licenses, we need to update the tests to match the messages now given in the output. Also use a mix of canonicalised and non-canonlised names in the reference recipes to help test those cases and ensure coverage. 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-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-15wic-image-minimal: only depend on syslinux on x86 targetsRoss Burton
Following other examples, only depend on syslinux when targetting x86. Signed-off-by: Ross Burton <ross.burton@arm.com> 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-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-06-06selftest-nopackages: New recipe in meta-selftestPaul Barker
This provides a test recipe which is known to inherit the nopackages bbclass. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-06selftest-ed: Support native buildsPaul Barker
This allows tests to switch to selftest-ed-native which has far fewer dependencies than selftest-ed. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-05selftest: git-submodule-test: New recipe for testing a gitsm SRC_URIPaul Barker
Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-03meta-selftest: add test for .patch file with long filename and without subjectMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-03meta-selftest: add test of .gitignore in tarballMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-21devtool: do not write md5sums into upgraded recipesAlexander Kanavin
This will drop them md5sums from recipes that still have them, and will not re-add them for recipes where they're already removed. [RP: Added fix for the test recipe] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26oeqa/selftest: Add test for conflicting sysroot providerRichard Purdie
sysroot-test depends on virtual/sysroot-test which we build for one machine, switch machine, switch provider of virtual/sysroot-test and check that the sysroot is correctly cleaned up. The files in the two providers overlap so can cause errors if the sysroot code doesn't function correctly. Yes, sysroot-test should be machine specific really to avoid this, however the sysroot cleanup should also work. This adds a test for bug: [YOCTO #13702] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26selftest/package: Add test to ensure ownership is preservedDaisuke Yamane
Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13806 Add test_preserve_ownership to selftest/package. This test creates a file, a directory and a symbolic link and changes ownership, then compares with them installed in rootfs to ensure ownership is preserved. [Test without a commit 'bitbake: lib/bb/utils.py: Preserve ownership of symlink'] | 2020-03-14 10:01:14,519 - oe-selftest - INFO - test_preserve_ownership (package.PackageTests) | 2020-03-14 10:56:44,612 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/file | 2020-03-14 10:56:44,770 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/dir | 2020-03-14 10:56:44,822 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/symlink | 2020-03-14 10:56:44,879 - oe-selftest - ERROR - Incrrect ownership /etc/selftest-chown/symlink [root:root] | 2020-03-14 10:56:45,884 - oe-selftest - INFO - ... FAIL [Test with a commit 'bitbake: lib/bb/utils.py: Preserve ownership of symlink'] | 2020-03-14 10:58:49,599 - oe-selftest - INFO - test_preserve_ownership (package.PackageTests) | 2020-03-14 11:51:39,947 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/file | 2020-03-14 11:51:40,013 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/dir | 2020-03-14 11:51:40,063 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/symlink | 2020-03-14 11:51:41,118 - oe-selftest - INFO - ... ok Signed-off-by: Daisuke Yamane <daisuke.yamane@cybertrust.co.jp> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16incompatible_lic.py: Add tests for incompatible licenses with wildcardsPeter Kjellerstedt
Suggested-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21selftest: check that 'devtool upgrade' correctly drops backported patchesAlexander Kanavin
There was a regression in this functionality that went unnoticed due to lack of tests. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-04recipeutils-test: use a small dependency in the dummy recipeRoss Burton
recipeutils-test has virtual/libx11 as a DEPENDS, but this will cause errors if the recipe is built in an environment without x11 in DISTRO_FEATURES. This dependency isn't actually used for anything so we could remove it, but to save updating the test cases too just swap virtual/libx11 for zlib. [ YOCTO #13611 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-10-19aspell: upgrade from 0.60.7 to 0.60.8Trevor Gamblin
New version fixes CVE-2019-17544 as well as various other bugs. CVE: CVE-2019-17544 RP: Added tweak to fix meta-selftest Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27oeqa: Test multiconfig parsingJoshua Watt
Add a test to verify that when multiconfig conf files changed, recipes are correctly reparsed. [YOCTO #13541] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-12aspell: update to 0.60.7Oleksandr Kravchuk
Removed patch was upstreamed. Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-31fortran-helloworld: neaten recipeRoss Burton
Use ${FC} instead of constructing the fortran name/arguments explictly, and clean up installation. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27fortran-helloworld: add a very dumb Fortran Hello World for testingRoss Burton
For future runtime testing something more complex is preferred but this is sufficient to exercise the cross compiler. Signed-off-by: Ross Burton <ross.burton@intel.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. Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-10multiconfig: Adapt to bitbake switch 'multiconfig' -> 'mc'Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-03selftest: Add multiconfig testRichard Purdie
Add a test for a multiconfig build which mixes tiny and musl builds along with using the mcextend class to combine and package multiple images into another image. This gives the multiconfig a decent test in a scenario users may use. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11selftest/distrodata: un-break the upstream version check testAlexander Kanavin
And fix the reported upstream check failures. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08recipeutils-test: Add missing LIC_FILES_CHKSUMKhem Raj
Fixes ERROR: QA Issue: recipeutils-test: Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM) [license-checksum] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03oe-selftest: add some tests for recipeutils modulePaul Eggleton
Add some tests for functions in meta/lib/oe/recipeutils.py, in particular for a few issues I've just fixed. I haven't added tests for all of the functions - some of them are already being tested via devtool in any case. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01meta-selftest/error: Cleanup large trailing whitespaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01oeqa/selftest/buildoptions: Ensure diskmon tests run consistentlyRichard Purdie
Heartbeat events default to once a second and we need to ensure we have enough time in the task to see them. Add a nostamp delay task 5s long so we can have a consistently timed task which doesn't need cleanup or have unneeded dependencies. This ensures we should deterministically see the disk moinitor events regardless of the state of the build. This is done in a way which doesn't corrupt build state or need cleanup and is efficient. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28selftest/package: Add package separated debug symbols hardlink testHongxu Jia
Tweak recipe selftest-hardlink - addition of libexecdir to simulate multiple directories - add gdb.sh to run gdb from script which is invoked at test time. - rename `hello' -> `hello1' to workaround name confliction with the one in lmbench Add test_gdb_hardlink_debug to selftest/package - run a qemu and invoke gdb.sh to gdb binaries of selftest-hardlink - check gdb to read symbols from separated debug hardlink file - check debug symbols works correctly [Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory'] 2018-08-26 01:27:30,195 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests) 2018-08-26 01:30:29,005 - oe-selftest - INFO - gdbtest /usr/bin/hello1 2018-08-26 01:30:36,539 - oe-selftest - INFO - gdbtest /usr/bin/hello2 2018-08-26 01:30:43,568 - oe-selftest - INFO - gdbtest /usr/libexec/hello3 2018-08-26 01:30:50,157 - oe-selftest - ERROR - No debugging symbols found. GDB result: Reading symbols from /usr/libexec/hello3...(no debugging symbols found)...done.^M (gdb) Function "main" not defined.^M Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]^M (gdb) Starting program: /usr/libexec/hello3 ^M Hello World!^M [Inferior 1 (process 320) exited normally]^M (gdb) The program is not being run.^M (gdb) 2018-08-26 01:30:51,180 - oe-selftest - INFO - ... FAIL 2018-08-26 01:30:51,181 - oe-selftest - INFO - Traceback (most recent call last): File "oe-core/meta/lib/oeqa/selftest/cases/package.py", line 148, in test_gdb_hardlink_debug self.fail('GDB %s failed' % binary) AssertionError: GDB /usr/libexec/hello3 failed [Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory'] [Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory'] 2018-08-26 12:40:30,976 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests) 2018-08-26 12:42:15,149 - oe-selftest - INFO - gdbtest /usr/bin/hello1 2018-08-26 12:42:24,064 - oe-selftest - INFO - gdbtest /usr/bin/hello2 2018-08-26 12:42:31,078 - oe-selftest - INFO - gdbtest /usr/libexec/hello3 2018-08-26 12:42:38,646 - oe-selftest - INFO - gdbtest /usr/libexec/hello4 2018-08-26 12:42:46,824 - oe-selftest - INFO - ... ok [Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory'] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15selftest/package: Add test to ensure sparse files are preservedRichard Purdie
Add a new element to the hardlink test to check we also preseve file sparseness during the packing process. This should ensure we don't regress this issue again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31oeqa/selftest: Add package hardlink testRichard Purdie
We keep breaking the preservation of hardlinks during the packaging process. Add a selftest which tests this to try and prevent this breaking again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18recipes: Enforce ARM ISA just for arm arches <= armv5Khem Raj
armv7+ used thumb2 ISA and it compiles fine with thumb2 issues are only when using thumb1 ISA Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-12oe-selftest: add a test for failing package post-installation scriptletsAlexander Kanavin
The test runs a scriptlet that has an intentionally failing command in the middle and checks for two things: 1) that bitbake does warn the user about the failure 2) that scriptlet execution stops at that point. The test is run for all three package types: rpm, deb, ipk. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>