aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
AgeCommit message (Collapse)Author
2017-01-19oeqa/utils/qemurunner.py: Be sure to stop qemu-systemMariano Lopez
When runqemu fails, qemu-system process would keep running and won't be killed, setpgrp() was used when runqemu was a shell script but it seems it doesn't work always with python. This would kill qemu-system explicity and to avoid leaving it behind. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa/utils/qemurunner.py: Add missing sys moduleMariano Lopez
This adds the missing sys module used by the child process to exit. It seems the exception was cached in testimage and selftest. It seems nobody noticed this because the module is only used for sys.exit(). Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: include BB_NUMBER_THREADS and PARALLEL_MAKEMarkus Lehtonen
Inlude values of BB_NUMBER_THREADS and PARALLEL_MAKE in the metadata. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: allow storing any bitbake config variablesMarkus Lehtonen
Make it possible to store any bitbake config variables in the metadata. Config values will be stored under a new config element in the xml report: <config> <variable name="MACHINE">qemux86</variable> </config> The value of MACHINE is moved there instead of having a dedicated <machine> element. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: add bitbake revision informationMarkus Lehtonen
[YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: have layer name as an attribute in xmlMarkus Lehtonen
Have the layer name as an attribute instead of of the name of the element itself. That is, have <layer name="layer_name"/> instead of <layer_name/>. A bit better XML design. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: add commit count informationMarkus Lehtonen
Makes it easier to put the commits into a timeline. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: rename 'revision' to 'commit'Markus Lehtonen
Revision is a bit vague and could point to a tag, for example. Git commit objects are unambiguous and persistent so be explicit that the element should contain git commit hash. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: fix retrieval of git branch and revisionMarkus Lehtonen
Always return a valid branch name, or, '(nobranch)' if the current HEAD is detached. Also, always return the hash of the commit object that HEAD is pointing to. Previous code returned an incorrect branch name (or crashed) e.g. in the case of detached HEAD. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: drop 'unknown' git data elementsMarkus Lehtonen
It's better just to not have the xml elements than to have elements with faux data. One could have git branch named 'unknown', for example. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: re-organise distro informationMarkus Lehtonen
Use the same format, based on /etc/os-release, as for host distro information. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19oeqa.utils.metadata: re-organise host distro informationMarkus Lehtonen
Put all host distro data under one <host_distro> element. In addition take the data directly from /etc/os-release instead of the "lsb API". The /etc/os-release file is virtually ubiquitous, now, and using its field names and values provides a more standardized and extensible format. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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-16runtime: Add cleanup for logrotate testsJose Perez Carranza
Delete logrotate dir to avoid errors when test are executed more than 1 time on the same target. Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.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>
2017-01-09gummiboot: Remove/change gummiboot references with systemd-bootAlejandro Hernandez
After systemd-boot was introduced, its been tested for a while with no major issues being found until now, this patch completely replaces all gummiboot instances with systemd-boot ones, taking the next step into cleaning up systemd-boot/gummiboot. [YOCTO #10332] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-06meta/scripts: Various getVar/getVarFlag expansion parameter fixesRichard Purdie
There were a few straggling expansion parameter removals left for getVar/getVarFlag where the odd whitespace meant they were missed on previous passes. There were also some plain broken ussages such as: d.getVar('ALTERNATIVE_TARGET', old_name, True) path = d.getVar('PATH', d, True) d.getVar('IMAGE_ROOTFS', 'True') which I've corrected (they happend to work by luck). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-22oeqa/utils/commands.py: allow use of binaries from native sysrootMaciej Borzecki
Tests may need to run a native tool that is not available on the host filesystem, but can be built using one of the *-native recipes. In such case, the tool will be available in native sysroot, and running in from that location will require adjustments to PATH. runCmd() can now take a path to native sysroot as one of its arguments and setup PATH accordingly. Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.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-19oe-selftest: import git module only when neededEd Bartosh
git module is not included into standard Python library and therefore causes import errors on the systems where PythonGit is not installed. As git module only used in the code implementing --repository functionality it's better to import git only in the scope that requires it. [YOCTO #10821] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-14oeqa/utils/commands.py: Fix get_bb_vars() when called without argumentsMariano Lopez
Commit 9d55e9d489cd78be592fb9b4d6484f9060c62fdd broke calling get_bb_vars() when called without arguments. This fix this issue. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-selftest: use tinfoil.parse_recipe()Paul Eggleton
Use tinfoil.parse_recipe() in order to allow oe-selftest to be used in memres mode. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-14oe-selftest: make tinfoil quiet when using to start QEMUPaul Eggleton
We don't need to see the parsing/cache loading message in the oe-selftest output, so use the newly added quiet option to disable it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>