aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
AgeCommit message (Collapse)Author
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>
2016-09-23oeqa/selftest/base: backup and restore local configuration filesJose Lamego
Selftests' cleanup method during test setup is not capable of restoring local configuration files that remain modified after aborting a test through a keyboard interruption. This change creates backups for local.conf and bblayers.conf at test setup, restore them when found, and deletes them at cleanup. [YOCTO #9390] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-20oeqa/selftest/lic-checksum: don't report the expected failure to errors.ypRoss Burton
This test has a bitbake invocation that is expected to fail, so inhibit report-error running. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-06selftest/liboe: add a test for copyhardlinktree()Joshua Lock
Add a simple test to validate that the number of files in the destination matches the number of files in the source after the copyhardlinktree() has been performed. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-04image: Deploy images to IMGDEPLOYDIREd Bartosh
Changed deployment directory from DEPLOY_DIR_IMAGE to IMGDEPLOYDIR to make sstate machinery to do final deployment and generate manifest. Renamed variable deploy_dir to deploy_dir_image in selftest code to avoid confusion with DEPLOYDIR variable. Updated the code of rootfs.py:Rootfs class to use IMGDEPLOYDIR variable as it's now used as a new deployment destination. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03oeqa/selftest Adds eSDK test cases to devtool verification.Francisco Pedraza
The covered functions are, install libraries headers and image generation binary feeds. Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03oe-selftest: devtool: fix test after recent changePaul Eggleton
OE-Core commit d3057cba0b01484712fcee3c52373c143608a436 fixed handling of wildcard bbappends, which means that this test's expectations about the bbappend file name are no longer met. devtool finish is meant to use wildcard bbappends so fix the test accordingly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03oeqa.selftest.liboe: add test for xattr in copytreeJoshua Lock
Add a test to ensure that oe.path.copytree() preserves extended attributes on files. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03oeqa.selftest: add a test for oe.path.copytree()Joshua Lock
One motivation for the use of cpio in oe.path.copytree() was to ensure that files with spaces in their names were copied. Add a new unittest module to test the OE module with a test case for copytree with a spaces in a filename. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17lib/oeqa/selftest/bbtests: don't report expected failuresRoss Burton
Another instance where expected failures need to be not reported to the error reporting service. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-10oeqa/selftest: disable report-error class when builds are expected to failRoss Burton
Some invocations of bitbake are expected to fail, so we don't want to report the errors to errors.yoctoproject.org. Also rewrite the messages in test_invalid_patch so they reflect reality. [ YOCTO #10052 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-04selftest/runtime-test.py: Add test for testexport SDK featureMariano Lopez
This adds test_testexport_sdk() to test the SDK feature of testexport in the CI in order to avoid breaking it. [YOCTO #9765] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-01selftest/runtime-test.py: Add test for import test from other layersMariano Lopez
There are some features in testimage/testexport that are not tested; this might lead to break some of these features without notice. This adds a new test in order to test two features of testimage: - Import test from other layers. - Install/Unistall in the DUT without a package manager. [YOCTO #9764] [YOCTO #9766] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-28oe-selftest: recipetool: add tests for git URL manglingPaul Eggleton
Add three tests to verify that the git URL mangling is working the way it's supposed to. This should prevent us regressing on this again in future. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-25oeqa/selftest/signing: check that we have GPG in setupRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-25oeqa/selftest/signing: use a temporary directory for GPG homeRoss Burton
Instead of using a directory in the layer as the GPG home and carefully deleting the right files from it, use tempfile to create a temporary directory which will be cleaned up for us. Also change the public/secret key variables to be absolute paths as they're always used as absolute paths. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20oeqa/recipetool: update recipe test to pass SHARoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20oeqa/devtool: update recipe test as libmatchbox changedRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20libxsettings-client: Remove as unneededJussi Kukkonen
xsettings-client is not meant to be a shared library and the only user in oe-core (libmatchbox) now has an in-tree copy. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20wic: oe-selftest: build bmap-tools-nativeEd Bartosh
bmap-tools-native is required to generate .bmap file. Without it wic fails with this error when run with --bmap option: Error: A native program bmaptool required to build the image was not found Added bmap-tools-native to the list of requirements to build in Wic.setUpLocal method. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20devtool: add finish subcommandPaul Eggleton
Add a subcommand which will "finish" the work on a recipe. This is effectively the same as update-recipe followed by reset, except that the destination layer is required and it will do the right thing depending on the situation - if the recipe file itself is in the workspace (e.g. as a result of devtool add), the recipe file and any associated files will be moved to the destination layer; or if the destination layer is the one containing the original recipe, the recipe will be overwritten; otherwise a bbappend will be created to apply the changes. In all cases the layer path can be loosely specified - it could be a layer name, or a partial path into a recipe. In the case of upgrades, devtool finish will also take care of deleting the old recipe. This avoids the user having to figure out the correct actions when they're done - they just do "devtool finish recipename layername" and it saves their work and then removes the recipe from the workspace. Addresses [YOCTO #8594]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-10buildoptions.py: remove directfb image build testMaxin B. John
removing this test since we move directfb out of oe-core Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-08oe-selftest: drop test_prepare_unexpectedPaul Eggleton
This test refers to a function that no longer exists after the eSDK install double execution of bitbake has been removed, and since test_prepare_unexpected is the only test in this module, drop the entire module. We can easily resurrect it if we have unit tests to add in the future. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08oeqa/selftest/bbtests: Fix failing test after progress changesRichard Purdie
The progress patches change the output slightly, update the test to deal with this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-06selftest/testexport.py: Add test test_testexport_basicMariano Lopez
Exported tests is not been tested right now and it get broken very easily with import errors from bitbake. This adds a new test in order to verify in the CI if the testexport gets broken. [YOCTO #8384] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02oeqa/selftest/recipetool.py: Tweak matching of warning lineLeonardo Sandoval
We are observing cases (see below) where the 'WARNING:' prefix is not at the beginning of a line, so instead of expecting it in the beginning, match it within the string. ====================================================================== FAIL: test_recipetool_appendfile_patch (oeqa.selftest.recipetool.RecipetoolTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/recipetool.py", line 285, in test_recipetool_appendfile_patch self.fail('Patch warning not found in output:\n%s' % output) AssertionError: Patch warning not found in output: Parsing recipes..WARNING: File /etc/selftest-replaceme-patched is added by the patch /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta-selftest/recipes-test/recipetool/files/add-file.patch - you may need to remove or replace this patch in order to replace the file. NOTE: Writing append file /tmp/recipetoolqaug0kdb4x/recipes-test/recipetool/selftest-recipetool-appendfile.bbappend NOTE: Copying /tmp/recipetoolqagci9tita/testfile to /tmp/recipetoolqaug0kdb4x/recipes-test/recipetool/selftest-recipetool-appendfile/testfile done. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02devtool.py: Fix parsing of bitbake-layers' outputLeonardo Sandoval
Current parsing was picking wrong targets, leading to the following problem: AssertionError: Command 'bitbake Parsing recipes..done. -e' returned non-zero exit status 1: Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02selftest/devtool: Compare sets instead of arrays on AssertEqualLeonardo Sandoval
Sets are safer when comparing internal elements and positions are not important. This commit avoid errors observed on python3 builds as reported on the below bugzilla entry. [YOCTO #9661] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to explictly create lists where neededRichard Purdie
Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to match python3 iter requirementsRichard Purdie
python3 standardises its use of iteration operations. Update the code to match the for python3 requires. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30recipetool / devtool: set a fixed SRCREV by default when fetching from gitPaul Eggleton
If fetching source from a git repository, typically within OpenEmbedded we encourage setting SRCREV to a fixed revision, so change to do that by default and add a -a/--autorev option to use "${AUTOREV}" instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21meta/selftest/scripts: Use print function for python3 compatibilityRichard Purdie
Used print function instead of print statement to make the code work in python 3. [Changes from both Ed and Richard] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19oe-selftest: wic: add test_bmap test caseEd Bartosh
Tested generation of .bmap file using wic --bmap command line option. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-16oeqa: Print function python3 fixesRichard Purdie
Use print functions for comptibility with python3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14selftest: add bmap testEd Bartosh
Added test_bmap to imagefeatures tests. It tests if bmap file is generated for the images and if the image is sparse. [YOCTO #9414] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11oeqa/lic-checksum: Update after recent LIC_FILES_CHKSUM changesRichard Purdie
The check now runs at populate_lic time so change this from configure. We also need to set a SRC_URI so that the check triggers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06oeqa/selftest/buildoptions: remove buildhistory signature testRoss Burton
This test is a subset of the new sstate_noop_samesigs test, and less helpful when it breaks, so remove it. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-29oeqa/sstatetests: remove temporary DL_DIRs in noop_samesigsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-29oeqa/sstatetests: add http_proxy to no-op hash testRoss Burton
Add two values for http_proxy to verify that changing it doesn't change any unexpected tasks. As this causes uninative to fail to fetch, ensure that uninative is always disabled. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-18lib/oeqa/selftest/base.py: Correct a reference to meta/lib/oeqa/selftestPeter Kjellerstedt
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-18ext-sdk-prepare.py: exclude do_rm_work from unexpected output; create unit testBill Randle
When installing the esdk with INHERIT += "rm_work", the script complains about do_rm_work as unexpected output from the bitbake run. This patch ignores any output lines with do_rm_work and further refactors the output comparison into its own function creates a new unit test to verify the fix. The unit test can be run direct from the command line or via oe-selftest. [YOCTO #9019] Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-15oeqa/selftest/sstatetests: fix no-op sstate testRoss Burton
The test to verify that certain classes when inherited were no-ops only passed if the build already inherited buildhistory. To ensure that the test works as expected, use INHERITS_remove to ensure that the classes are not inherited in the base run. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13Revert "oeqa/selftest/wic: add test case for sparse images"Ross Burton
This reverts commit 43150ab7ec63d804e8a998ecee9d00295b8b2bc7. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>