summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases
AgeCommit message (Collapse)Author
2022-03-09meta/scripts: Improve internal variable namingSaul Wold
Update internal variable names to improve the terms used. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-04classes: rootfs-postcommands: include /etc/fstab in overlayfs_qa_checkStefan Herbrechtsmeier
The systemd init manager support mount point configuration via mount units and /etc/fstab. 'Mounts listed in /etc/fstab will be converted into native units dynamically at boot and when the configuration of the system manager is reloaded. In general, configuring mount points through /etc/fstab is the preferred approach.' [1] Read mount points from /etc/fstab to determine dynamic mount units. [1] https://www.freedesktop.org/software/systemd/man/systemd.mount.html Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02license: Rework INCOMPATIBLE_LICENSE wildcard handlingRichard Purdie
The current wildcard handling is badly documented and inconsistently used and understood. Forcing users to have to use "GPL-3.0-only GPL-3.0-or-later" whilst explict is not very user friendly. Equally, using the current wildcards is ambigious. This supports pre-defined expansions only and at least makes it clear what GPL-3.0* means (it doesn't include the exception licenses). This is hopefully an acceptable compromise between literal meaning and having something usable. Non-SPDX forms of license in this field have been dropped and errors are shown for unsupported expansions and unsupported old style license terms. Users need to carefully consider how to migrate to the new syntax but the meaning should be well defined and clear from here forward. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02base/license: Rework INCOMPATIBLE_LICENSE variable handlingSaul Wold
This re-writes the INCOMPATIBLE_LICENSE checking code to replace the WHITELIST_<lic> with INCOMPATIBLE_LICENSE_EXCEPTIONS = '<pkg>:<lic> <pkg>:<lic> ...' This initial change leaves most of the code structure in place, but the code in base.bbclass needs to be re-written to make the check more consistent around packages (PKGS) and not recipe names (PN). This also is taking into account the changes for SPDX licenses. The aim is to provide a mode consistent variable where the variable name is known and can easily be queried. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02recipetool/devtool: Further SPDX identifier cleanupsRichard Purdie
Some of these are hard to know what to do with since the original source files for the checksum aren't present. The safe option is to use "-only" as often the main license is ambiguous and the source files themselves determine the "or-later" possibility. The "-only" option therefore is realistically what we need to use in this code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02scripts: Various typo/grammar/punctuation fixesRobert P. J. Day
Among other things, fix misspellings of: - absolute - deprecated - suitable - handle and a bunch of other things. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-01recipetool: Use SPDX license identifiersPeter Kjellerstedt
There are still a couple of cases where the license may be set as, e.g., "GPL" or "GPL-2.0" since there is not enough information to decide the actual SPDX license. It is then assumed that the developer will have to correct the information. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-01selftest: recipetool: Correct the URI for socatPeter Kjellerstedt
The URI to the socat tarball used in the recipetool.RecipetoolCreateTests.test_recipetool_create_simple test has been moved to an "Archive" directory. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25selftest: drop distutils3 test from recipetoolTim Orling
The distutils*.bbclasses have been moved from oe-core to meta-python, so drop test_recipetool_create_python3_distutils test case. [YOCTO #14610] Signed-off-by: Tim Orling <tim.orling@konsulko.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-21meta: Rename LICENSE_FLAGS variableSaul Wold
Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21meta/scripts: Automated conversion of OE renamed variablesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21imagefeatures: selftest: Change variable to be more descriptiveSaul Wold
This changes a couple of variables to be more representive of their usage. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21local.conf/oeqa: Update BB_DISKMON_DIRS useScott Murray
Update the example BB_DISKMON_DIRS definitions in the sample local.conf files for the rename of the "ABORT" action to "HALT", and also update related error messages in one selftest to use the new action name. Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21oeqa/selftest/bblogging: Split the test cases up for ease of testingRichard Purdie
This makes it easier to see which of the tests are passing/failing for a given change which aids debugging. 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-20oeqa/selftest/bbtests: Update after license changesRichard Purdie
Update the test to match the renamed license in the recipe. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-17oeqa/selftest/bbtests: Update to match changed bitbake outputRichard Purdie
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-02-16selftest: wic: Disable graphic of qemu to support WSLStefan Herbrechtsmeier
Disable graphic support of qemu to support qemu tests in WSL. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-16selftest: wic: Add rawcopy plugin unpack testStefan Herbrechtsmeier
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-16selftest: wic: Remove requirement of syslinux from test_rawcopy_pluginStefan Herbrechtsmeier
Remove bootimg-pcbios from wks to eliminate requirement of syslinux from test_rawcopy_plugin to avoid the following error. ERROR: Couldn't find correct bootimg_dir, exiting Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-12oeqa/selftest: test that newlib can buildRoss Burton
Add a test to set TCLIBC=newlib and build newlib/libgloss. This is the absolute minimum test, but at least it exercises the build of this package. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-03sstatetests: Correct a typo in a commentPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11oeqa/sstate: Fix allarch samesigs testRichard Purdie
The allarch sstate sigs test is supposed to compare the allarch sigs but does not. Fix this. Also rename the common function to make it clear it isn't just used by the allarch test. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11sstatetests: Add OLDEST_KERNEL to allarch testsRichard Purdie
Some architectures vary OLDEST_KERNEL and this shouldn't change the allarch signatures but in current OE-Core can/does. Add differing values to the test configs to ensure we catch this in future (we want to keep a 32 and 64 bit machine here to test that as well). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11rust-llvm: apply the same reproducibility patch as for llvm properAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11ruby: disable rdoc due to non-reproducibilityAlexander Kanavin
The issue is reported upstream: https://bugs.ruby-lang.org/issues/18456 Otherwise I do not feel that further investigation of rdoc's parser to find out the source of non-determinism is worth the time. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-07selftest: reproducible: Set maximum report sizeJoshua Watt
Diffoscope can end up running for a very long time if there are a lot of changes. To put a limit on how long it can run, cap the maximum report size at 250 MB by default. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-07virgl: skip headless test on alma 8Alexander Kanavin
As a centos 8 spinoff, it lacks the same vgem kernel module. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-05selftest/reproducible: drop go items from exception listAlexander Kanavin
With this changeset, go becomes reproducible \0/ Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-20oeqa/selftest/bbtests: Use YP sources mirror instead of GNURichard Purdie
The gnu sources server has been known to disappear. Use the YP sources mirror instead. If that breaks, the autobuilder is broken anyway. This should reduce test failures from upstream network issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-20selftest: recipetool: Add test for handle_license_vars functionStefan Herbrechtsmeier
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-20selftest: recipetool: Add test for split_pkg_licenses functionStefan Herbrechtsmeier
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-20recipetool: Separate licenses with & operatorStefan Herbrechtsmeier
Separate licenses with & operator since it should be satisfied most use cases and it is a reasonable assumption that all the licenses apply. Furthermore flat, split and sort the licenses to minimize license string changes. Separate package licenses with & operator: -LICENSE:${PN} = "MIT ISC" +LICENSE:${PN} = "ISC & MIT" Respect | and brackets in LICENSE: -LICENSE = "BSD-3-Clause & (ISC & | & MIT)" +LICENSE = "BSD-3-Clause & (ISC | MIT)" Sort licenses: -LICENSE = "MIT & BSD-3-Clause & ISC" +LICENSE = "BSD-3-Clause & ISC & MIT" Remove duplicates: -LICENSE = "MIT & ISC & MIT" +LICENSE = "ISC & MIT" Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12sstatetests: add a test for moving oe-core around in the filesystemAlexander Kanavin
Doing that should not change the task signatures. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12oeqa/selftest: unit tests for overlayfs-etcVyacheslav Yurkov
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12oeqa/selftest: overlayfs helper functionVyacheslav Yurkov
Move helper functions out of class scope so they can be used in other tests Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-09selftest/recipetool: Add tests for branch parameter and srcbranch optionStefan Herbrechtsmeier
The recipetool support two ways to pass a branch and fallback to master if no branch is defined. Add tests for default branch, branch parameter and srcbranch option. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-09selftest: devtool: Separate common functions and devtool sstate setup into ↵Stefan Herbrechtsmeier
two classes The selftest recipetool base class reuse the selftest devtool base class. Thereby the selftest devtool base class setup its own devtool sstate and the selftest recipetool classes trigger the build of recipes. This leads to the problem that the build artifacts doesn't reach the persistent sstate cache and rebuild on every selftest run. Move the common selftest devtool functions into its own class and use the sstate cache in the recipetool tests. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-09selftest/recipetool: Split tests into separate test classesStefan Herbrechtsmeier
Split tests into separate test classes to speed up individual test runs by reducing the test setup to a minimum. The pkgdata generation is only needed for the append tests and slow down the other tests. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-09selftest/devtool: Check branch in git fetchStefan Herbrechtsmeier
The commit 'meta/scripts: Manual git url branch additions (dc53fe75cc)' forget the url branch= parameter in the devtool git fetch test. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-03patch.py: Initialize git repo before patchingPavel Zhukov
If PATCHTOOL="git" has been specified but workdir is not git repo bitbake fails to apply the patches with error message: Command Error: 'git rev-parse --show-toplevel' exited with 0 Output: fatal: not a git repository (or any of the parent directories): .git Fix this by initializing the repo before patching. This allows binary git patches to be applied. Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-23oeqa: fix warnings for append operators combined with +=Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30oeqa/selftest: extend overlayfs testVyacheslav Yurkov
Test that overlayfs.bbclass generates one systemd unit, that applications can set dependencies on, and that this unit mounts all required overlays Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30oeqa/selftest: refactor common functionsVyacheslav Yurkov
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30archiver: Default to xz compresison instead of gzRichard Purdie
We should default to xz or zstd instead of gz, pick xz for now as it is more tested. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30meta/scripts: Manual git url branch additionsRichard Purdie
Following the scripted conversion adding branches to git:// SRC_URI entries, add the remaining references, mainly in the selftests and recipetool. 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>