aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
AgeCommit message (Collapse)Author
2017-01-19oeqa/selftest/tinfoil: add test IDs to tinfoil test casesJose Perez Carranza
Testopia entrances were created and the IDs retrieved are added to their corresponding test case on tinfoil script. Signed-off-by: Jose Perez Carranza <jose.perez.carranza@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest: runtime-test: skip image-install test for poky-tinyLeonardo Sandoval
poky-tiny cannot build full-cmdline image, so skip this test in this case. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest: devtool: use distro agnostic recipes for devtool checksLeonardo Sandoval
The recipes being replaced are not compatible with all distros, so use mraa and virtual/make for some checks. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest/base: don't fetch DISTRO variable in constructorRoss Burton
Fetching the DISTRO variable in the base constructor means that we have to start bitbake for every test case instance, which adds minutes to the startup time. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest/bblayers: don't fetch a variable that is never usedRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest/archiver: don't build an image for a basic testRoss Burton
This test only exercises the include/exclude behaviour so it only needs to build the two recipes that it tests against, not an entire image. Part of #10874. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest/buildoptions.py: fix path assumption for DEPLOY_DIR_SRCChen Qi
Fix path assumption for DEPLOY_DIR_SRC, otherwise, the testcase may fail even if the functionality works well. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest/bbtests.py: fix path assumption for LICENSE_DIRECTORYChen Qi
Fix path assumption for LICENSE_DIRECTORY, otherwise, the test case may fail even if the functionality it tests works well. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16oe-selftest: devtool: Add test for externalsrc buildcleanOla x Nilsson
Test both for S == B and S != B. Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16selftest/eSDK.py: fix sstate dir not found errorChen Qi
Fix the error below when SSTATE_DIR is not "${BUILDDIR}/sstate-cache". FileNotFoundError: [Errno 2] No such file or directory: '/xxx/../sstate-cache' Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16image_typedep.py: Add a test that ensures conversion type deps get addedRandy Witt
Add a test that ensures if IMAGE_TYPEDEP_* contains a conversion type, that the corresponding CONVERSION_DEPENDS_ for that type gets added to the dependency tree for do_rootfs. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-09selftest/devtool: update test to work with new mtd-utilsRoss Burton
The new mtd-utils (version 2.0) has been autotooled so the test needs to touch Makefile.am instead of Makefile. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-09oe-selftest: devtool: Reverting a change should trigger rebuildOla x Nilsson
Add code to verify that not only does a change trigger a build, but so does reverting that change. Reverting a change in a devtool managed git repo may cause the current checksum to match the checksum of a previous build, which will cause bitbake to skip builds that are needed. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-09wic: Remove gummiboot testAlejandro Hernandez
Weve now migrated to systemd-boot, the gummiboot test on wic is no longer necessary Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-22selftest/wic: extending test coverage for WIC script optionsJair Gonzalez
The previous WIC script selftest didn't cover all of its command line options. Some option variants were included in existing test cases and the following tests were added to complete covering them: 1552 Test wic --version 1553 Test wic help create 1554 Test wic help list 1555 Test wic list images 1556 Test wic list source-plugins 1557 Test wic listed images help 1558 Test debug 1563 Test skip build check 1564 Test build rootfs 1559 Test image vars directory selection 1562 Test alternate output directory Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-22selftest/wic: reorganizing test methods by functionalityJair Gonzalez
Part of the test methods were rearranged to group them by functionality and identify more easily opportunities to extend coverage. Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-22selftest/wic: code cleanupJair Gonzalez
The following changes were added to improve the code readability: - Removed redundant backlashes between brackets - Aligned continuation lines according to PEP8 style - Refactored command execution in the next methods for enhanced legibility: - test_build_image_name(self) - test_gpt_image(self) - test_qemux86_directdisk(self) - test_rootfs_indirect_recipes(self) - test_iso_image(self) - test_mkgummidisk(self) - test_mkefidisk(self) - test_directdisk_bootloader_config(self) - test_qemu(self) - test_bmap(self) - test_systemd_bootdisk(self) - test_sdimage_bootpart(self) Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-22selftest/wic: adding Testopia ID numbers to test cases missing itJair Gonzalez
The following test cases were assigned an ID number on Testopia: 1496 Test generation of .bmap file 1560 Test creation of systemd-bootdisk image 1561 Test creation of sdimage-bootpart image Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-20Revert "selftest/wic: extending test coverage for WIC script options"Richard Purdie
This reverts commit 68cb3180c1b0dcee50812b21f98850d188d8621b as this wasn't ready for merge and there are new better versions.
2016-12-19selftest/wic: extending test coverage for WIC script optionsJair Gonzalez
The previous WIC script selftest didn't cover all of its command line options. The following test cases were added to complete covering them: 1552 Test wic --version 1553 Test wic help create 1554 Test wic help list 1555 Test wic list images 1556 Test wic list source-plugins 1557 Test wic listed images help 1558 Test wic debug, skip-build-check and build_rootfs 1559 Test image vars directory selection 1562 Test alternate output directory In addition, the following test cases were assigned an ID number on Testopia: 1560 Test creation of systemd-bootdisk image 1561 Test creation of sdimage-bootpart image Finally, part of the test methods were rearranged to group them by functionality, and some cleanup was made to improve the code's compliance with PEP8 style guide. Fixes [YOCTO 10594] (From OE-Core rev: 3d2ac67765020885a0996ebdd97a576ba37dbec0) Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@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-12-16oeqa: move lib/oe tests to oe-selftestRoss Burton
These tests don't get ran often (as demonstrated by the fact that some were not ported to Python 3), so move them to oeqa/selftest so they get executed frequently and can be extended easily. [ YOCTO #7376 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16selftest: buildoptions: skip read-only-image test depending on distroLeonardo Sandoval
Poky-tiny cannot build core-image-sato, so skip test (read-only-image) in this case. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16selftest: bblayers: remove linux kernel checks for show-recipes checkLeonardo Sandoval
Preferred kernel recipes depends on the distro, so remove the kernel checks to avoid failures on non-poky distros and make the test distro agnostic. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16selftest: bbtests: use minimal image so all distros can execute itLeonardo Sandoval
poky-tiny distro cannot build full-cmdline image, so use an image (core-image-minimal) that can be built in all distros. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16selftest: base: new object member to store the DISTRO valueLeonardo Sandoval
Instead of quering it multiple times, query once and use it on test method skip checks. Also, rename current distro sstate object member to a more meaninful name. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-14oe-selftest: add basic tinfoil testsPaul Eggleton
Add some tests to verify that the new tinfoil API is operating correctly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-14oe-selftest: devtool: improve test_devtool_modify slightlyPaul Eggleton
* Check that man .in file actually gets modified, since sed -i doesn't fail if it it doesn't * Use a variable for man file path Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-14oe-pkgdata-util: Make read-value handle override variablesOla x Nilsson
Some variables in pkgdata files have a package-name override. When the bare variable can not be found, try with the override-variant. PKGSIZE is one such variable, and already had special code to handle this. Test included. Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-13recipetool: selftest: Add test for recipetool plugin loadingOla x Nilsson
Test that recipetool plugins are loaded in a well defined order. Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-13devtool: selftest: add test for devtool plugin loadingOla x Nilsson
Test that devtool plugins are loaded in a well defined order. Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07selftest: wic: fix test_qemuEd Bartosh
Setting WKS_FILE variable in qemux86-64 made wic test to use wrong wks file to produce an image and resulted in test_qemu failure. Used conditional assignment in qemux86-64 and explicitly set WKS_FILE in wic testing suite to make the suite to use wic-image-minimal.wsk. This should fix test_qemu failure. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-30oe-selftest: toaster Remove redundant Toaster testMichael Wood
This test has been ported to be run as part of Toaster's own tests. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-23devtool: modify: support recipes with only local files as sourcePaul Eggleton
The hello-mod recipe is unusual in that it has only local files in SRC_URI and builds these out of ${WORKDIR}. When you use devtool modify on it, devtool puts all of those files in an "oe-local-files" subdirectory of the source tree, which is not ${S} (or ${B}) any more and thus building the recipe afterwards fails. It's a bit of a hack, but symlink the files in oe-local-files into the source tree (and commit the symlinks with an ignored commit so that the repo is clean) to work around the problem. We only do this at time of extraction, so any files added to or removed from oe-local-files after that won't be handled, but I think there's a limit to how far we should go to support these kinds of recipes - ultimately they are anomalies. I initially tried a hacky workaround where I set effectively set B = "${WORKDIR}" and that allowed it to build, but other things such as the LIC_FILES_CHKSUM checks still broke because they expected to find files in ${S}. Another hack where I set the sourcetree to point to the oe-local-files subdirectory works for hello-mod but not for makedevs since whilst that is similar, unlike hello-mod it does in fact have files in the source tree (since it has a patch that adds COPYING) and thus the same issue occurred. Also tweak one of the tests that tries devtool modify / update-recipe on the makedevs recipe to try building it since that would have caught this issue. Fixes [YOCTO #10616]. 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 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-11-07Revert "oeqa/selftest/kernel.py: Add new file destined for kernel related tests"Ross Burton
breaking on selftest NOTE: recipe core-image-minimal-1.0-r0: task do_rootfs: Started ERROR: core-image-minimal-1.0-r0 do_rootfs: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:license_create_manifest(d) 0003: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 48, function: license_create_manifest 0044: pkg_dic = {} 0045: for pkg in sorted(image_list_installed_packages(d)): 0046: pkg_info = os.path.join(d.getVar('PKGDATA_DIR', True), 0047: 'runtime-reverse', pkg) *** 0048: pkg_name = os.path.basename(os.readlink(pkg_info)) 0049: 0050: pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info) 0051: if not "LICENSE" in pkg_dic[pkg_name].keys(): 0052: pkg_lic_name = "LICENSE_" + pkg_name Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/sysroots/qemux86-64/pkgdata/runtime-reverse/kernel-4.8.3-yocto-standard' This reverts commit c3d2df883a9d6d5036277114339673656d89a728.
2016-11-07devtool: add "rename" subcommandPaul Eggleton
When you run devtool add on a source tree we attempt to figure out the correct name and version for the recipe. However, despite our best efforts, sometimes the name and/or version we come up with isn't correct, and the only way to remedy that up until now was to reset the recipe, delete the source tree and start again, specifying the name this time. To avoid this slightly painful procedure, add a "rename" subcommand that lets you rename the recipe and/or change the version. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-07oe-selftest: devtool: fix error message in _test_recipe_contents()Paul Eggleton
If a variable is being set in the recipe when we've explicitly passed None as the value to _test_recipe_contents() indicating that it shouldn't be set at all, then we should be printing out the variable name in the assertion message but it seems like I forgot to do a substitution. Also include the value for informational purposes. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-07recipetool: create: separate LICENSE items with & by defaultPaul Eggleton
recipetool sets the LICENSE value based on licenses detected from the source tree. If there are multiple licenses then they were being separated by spaces, but this isn't actually legal formatting and if you're using "devtool add" you get a warning printed when devtool parses the recipe internally. Earlier I had made a conscious decision to do it this way since it's up to the user to figure out whether the multiple licenses should all apply (in which case they'd be separated with &) or if there is a choice of license (in which case | is the correct separator). However, I've come to the conclusion that we can just default to & and then the ugly warning goes away, and it's the safest alternative of the two (and most likely to be correct, since it's more common to have a codebase which is made up of code with different licenses, i.e. all of them apply to the combined work). I've tweaked the comment that we add to the recipe to explicitly state that we've used & and that the user needs to change that if that's not accurate. Fixes [YOCTO #10413]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-01oeqa/selftest/kernel.py: Add new file destined for kernel related testsCostin Constantin
[YP#7202]: Test for linux-dummy The new kernel.py file is intended for kernel related test cases. The test for linux-dummy will ensure it is in good shape and can be used as a kernel replacement at build time. To do this, the test will first clean sstate for linux-dummy target, ensuring no file is present in the stamps directory. After, core-image-minimal is built, ensuring linux-dummy can be used as a kernel substitute. Signed-off-by: Costin Constantin <costin.c.constantin@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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-10-07wic: selftest: add test for sdimage-bootpartEd Bartosh
Test creation of sdimage-bootpart image Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07wic: selftest: add test for systemd-bootdiskEd Bartosh
Test creation of systemd-bootdisk image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05oeqa/selftest: Update test after fetcher error changesBenjamin Esquivel
The following poky commit: 4359ef08 base.bbclass: Use bb.fatal() instead of raising FuncFailed changed the way the fetcher error is reported. Previous reporting: ...Function failed: Fetcher failure for URL:... New reporting: ...Fetcher failure for URL:... Updating how the check is done fixes the test error and accurately confirms the tested scenario for test_invalid_recipe_src_uri. [YOCTO #10370] Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-01oeqa/sstatetests: Add test for multilib allarch checksumsRichard Purdie
Switching between multilib configurations should not change allarch recipe or nativesdk checksums. Add a new sstate test for this based on the standard allarch test. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28oeqa/sstatetests: Ensure we cover deb packaging backend for sstate testRichard Purdie
Currently we weren't testing the deb backaned for sstate correctness and there was a bug that had crept in. Ensure we cover all package backends with the test regardless of what the distro/conf sets. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>