summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test
AgeCommit message (Collapse)Author
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>
2018-02-24oe-selftest: fix tests to reflect man->man-db transitionAlexander Kanavin
Rather than apply a patch twice, an incorrect patch is applied (as the new man-db recipe does not have any patches yet). Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-24devtool: fix upstream version check for devtool-test-local recipeAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-29package.bbclass: add support for pkg_postinst_ontarget()Alexander Kanavin
This function is a convenient and more readable shortcut for situations when the postinst code always needs to run on target. All commands that cannot be executed during cross-install and can only be run on target should go into this function. They will only be executed on first boot (if package was cross-installed) or immediately during package installation on target. Plain pkg_postinst() works as before: it is run during cross-install time, it can contain a request to defer to first boot, and it is also run during package installation on target. Also fix the oeqa test for this functionality to use the new function where appropriate. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-02selftest-ed: add a RECIPE_NO_UPDATE_REASONAlexander Kanavin
This will avoid AUH looking at it, among other things. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-18meta-selftest: wic: Add test for --use-uuid / --fsuuidTom Rini
- Mount a '/media' partition to wic-image-minimal.wks with a known UUID. - In test_qemu, sort our output from checking the output of 'mount' as it may not be stable. Also, do not check the exit code as passing any output to cut ensures a 0 exit code. - Check for a 'UUID=' line in /etc/fstab with out expected output. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-10oe-selftest: devtool: fix test for changes in lzo recipePaul Eggleton
acinclude.m4 is about to be removed from the lzo recipe which breaks test_devtool_update_recipe_local_files_2. Create a synthetic recipe in meta-selftest with some local files and use that instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-02meta-selftest: fix upstream version checks for devtool test recipesAlexander Kanavin
So that they're reported correctly when checking 'universe' for latest upstream versions. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-02postinst: fix and simplify the postinst test recipeRoss Burton
Reduce the number of packages, and fix some syntax and logic errors in the scripts. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-12wic-image-minimal: stop using core-image-minimalEd Bartosh
Removed dependency to core-image-minimal rootfs from the recipe and .wks file. This was a bad idea as recipes are not allowed to use other recipe's rootfs or anything else from workdir. This should also fix test_qemu test case when rm_work is enabled. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11wic-image-minimal.wks: vda -> sdaRobert Yang
Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and would use vda if no grep result, now we have set QB_DRIVE_TYPE to "/dev/sd" by default, and the device will be /dev/sda, so use sda to replace vda in the test case. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13run-postinsts: simplify the logic of whether to install it to imagesAlexander Kanavin
The logic is scattered all over the place, but amounts to "install, unless the rootfs is read only". Let's express that directly. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-10meta-selftest: add selftest-ed recipesJoshua Lock
The oe-selftest oescripts.TestScripts.test_cleanup_workdir was using gzip and the GPLv2 variant to test cleanup of the workdir. This broke with the removal of GPLv2 recipes from OE-Core. Instead of relying on recipes in OE-Core remaining static we should ensure that meta-selftest provides recipes required for the tests to pass. To that end we take a copy of the current GPLv2 and GPLv3 variants of ed and include them in meta-selftest as new recipes. We chose ed over gzip as gzip has dependencies which would require additional GPLv2 recipes to be included in meta-selftest. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04wic: add WKS_FILE_DEPENDS variableEd Bartosh
This variable should be used to specify dependencies that will be added to DEPENDS only if wic image build is 'active' i.e. when 'wic' is in IMAGE_FSTYPES. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-02-19selftest/containerimage.py: Add container IMAGE_FSTYPES testRandy Witt
This test checks to make sure only the files expected exist in a container image. Currently only ROOTFS_BOOTSTRAP_INSTALL, gets added to all images without the user specifying it. But this test should help if a developer in the future ever silently adds more than just ROOTFS_BOOTSTRAP_INSTALL, and that the developer can make sure it also gets removed from a container image. [YOCTO #9502] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15m4: use wildcard for selftest bbappendRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16recipes-test: exclude recipes from world targetLeonardo Sandoval
These recipes should be excluded from target 'world' because these are just intended to be used internally by oe-selftest (devtool, recipetool, etc.) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16postinst: Add a test case to verify postinst scripts behaviorJose Perez Carranza
Add test case that verify behavior of postinst scripts at roofts time and when is delayed to the first boot directly on the target. Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16selftest: Test needed to verify postinst orderFrancisco Pedraza
It verifies the following: 1. Compile a minimal image. 2. The compiled image will add the layer with the recipe postinst, previously created at: "meta-selftest/recipes-test" 3. Run QEMU. 4. Validate the task execution order. [YOCTO #5319] Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-23oe-selftest: devtool: test that updating a file with subdir= worksPaul Eggleton
If you have a file:// entry in SRC_URI with a subdir= parameter that makes it extract into the source tree, then when you update that file in oe-local-files and run devtool update-recipe then you want the original file to be updated. This was made to work by OE-Core commit 9069fef5dad5a873c8a8f720f7bcbc7625556309 together with 31f1bbad248c36a8c86dde4ff57ce42efc664082, however until now there was no oe-selftest test to verify it. Note that in order to succeed this test also requires the fix "lib/oe/recipeutils: ignore archives by default in get_recipe_local_files()" since the test recipe uses a local tarball. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-23devtool: update-recipe: fix handling of compressed local patchesPaul Eggleton
It is possible to use gzip or bzip2 to compress patches and still refer to them in compressed form in the SRC_URI value within a recipe. If you run "devtool modify" on such a recipe, make changes to the commit for the patch and then run devtool update-recipe, we need to correctly associate the commit back to the compressed patch file and re-compress the patch, neither of which we were doing previously. Additionally, add an oe-selftest test to ensure this doesn't regress in future. Fixes [YOCTO #8278]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-23oe-selftest: devtool: test update-recipe with only local filesPaul Eggleton
Add a test to ensure devtool update-recipe works properly on recipes that contain only local files (since the other tests we have didn't test that). Relates to [YOCTO #10563]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-28Remove LIC_FILES_CHKSUM from recipes without SRC_URIOlaf Mandel
LICENSE and LIC_FILES_CHKSUM apply to the sources specified by SRC_URI, not to the recipe itself. As such a license declaration for a source-less recipe makes little sense. The LICENSE declaration is mandatory, but LIC_FILES_CHKSUM can be removed in such cases. Remove the LIC_FILES_CHKSUM declarations from all recipes that do not need it. CC: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-15Remove RM_OLD_IMAGE, it's no longer usefulJoshua Lock
Since the move to put image deployment under sstate control in d54339d4b1a7e884de636f6325ca60409ebd95ff old images are automatically removed before a new image is deployed (the default behaviour of the sstate logic). RM_OLD_IMAGE is therefore no longer required to provide this behaviour, remove the variable and its users. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-20image_types: add parted-native to do_image_wic dependsEd Bartosh
As parted is always used by wic it makes sense to make do_image_wic dependent on parted-native:do_populate_sysroot. This should help to avoid adding it to all wic image recipes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-05-11Drop unneeded LIC_FILES_CHKSUM valuesPaul Eggleton
With the changes to insane.bbclass we don't need LIC_FILES_CHKSUM to be set for recipes that don't actually pull in any source. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06test-empty-image: Fix LIC_FILES_CHKSUM typoRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06meta-selftest/images: Add LIC_FILES_CHKSUM to images using image.bbclassRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28image.bbclass: run wicenv task only for wic imagesEd Bartosh
Currently do_wicenv task is run for all images. However, its result is used only to produce wic image. It's better to run this task only for wic images. If another rootfs is required to produce wic image, dependency to its do_wicenv must be added to the wic image recipy. Stopped running do_wicenv for all images. Added explicit dependency to this task in wic-image-minimal recipe. [YOCTO #9095] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09xcursor-transparent-theme: use a version glob in the selftest bbappendRoss Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28oe-selftest: devtool: add an additional test for devtool upgradePaul Eggleton
Add a test for devtool upgrade with a recipe pointing to a git repository, since this uses several different code paths. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28oe-selftest: devtool: rework devtool upgrade testPaul Eggleton
* Use a more real-world test of a recipe pointing to a remote file * The cleanup tracking / teardown commands need to be added towards the top, or they won't have the desired effect of cleaning up if the test fails. * Check that a versioned subdirectory gets renamed to match the new version * Ensure the recipe contents gets changed as we expect it to * Check that the recipe directory is deleted by devtool reset at the end Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-15wic-image-minimal: use uuid for root partitionEd Bartosh
Used --uuid option to generate PARTUUID for root partion and gpt partition type. As this image is used in runtime testing under qemu it makes sense to ensure that this way of specifying root partition works. Added dependency to gptfdisk-native to wic-image-minimal recipe to be able to create gpt partition table. (From OE-Core rev: ba82867bfda54e86e1de5dc4a6ad7246254cf5c3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15wic-image-minimal: update .wks to boot by qemuEd Bartosh
With below list of changes wic-image-minimal can be boot by qemu: - Changed device name sda -> vda. - Added root=/dev/vda2 to the kernel command line. - Changed mount point for core partition to /mnt to have it mounted on boot time. (From OE-Core rev: f085274711f561f97a2c89f40bb0e89094973054) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15wic-image-minimal: change IMAGE_FSTYPESEd Bartosh
Replaced wic.bz2 -> wic in the recipe. Replaced wic.bz2 -> wic in oe-selftest test case. wic-image-minimal is going to be booted in qemu and tested. As runqemu doesn't support compressed images this recipe needs to produce raw wic image. (From OE-Core rev: 3ce91db94f4b921566dce0dc6f91a422009be06b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-22emptytest: exclude from world buildsRoss Burton
This recipe is for testing purposes and shouldn't be built in world builds, as it produces errors without being built in the selftest. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-19image: Fix wic environment issuesRichard Purdie
The wic environment function needs to run after the rootfs size is setup. We move this code to a specific task, and depend on that task from the wic images and other places its needed. This fixes: ====================================================================== FAIL: test_image_env (oeqa.selftest.wic.Wic) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 106, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 218, in test_image_env self.assertTrue(var in content, "%s is not in .env file" % var) AssertionError: False is not true : ROOTFS_SIZE is not in .env file Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-19test-empty-image: rename from core-image-emptyAlex Franco
As the empty image isn't a "core" image, and it's meant for testing Additionally, don't set LICENSE as it is inherited from image [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-28Empty image: core-image-empty recipeAlex Franco
Added core-image-empty recipe in meta-selftest/recipes-test/images [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-24meta-selftest: add error recipe and error-imagebrian avery
* The error recipe throws an error during compile * The error-image includes the error recipe * Initial target is toaster selenium testing Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>