aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2016-08-04oeqa/utils/sshcontrol.py: Allows to copy symlinks to targetMariano Lopez
Currently when copying a symlink to the target it will fail throwing an exception. This will recreate symlinks from the system performing the tests to the device under tests. [YOCTO #9932] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-04oeqa/oetest.py: Allow to export packages using symlinksMariano Lopez
Currently packages that contains symlinks can't be extracted and exported. This allows to export extracted such packages. A nice side effect is improved readability. [YOCTO #9932] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-04oetest.py: Remove check for __init__.pyMariano Lopez
When using "auto" in TEST_SUITES there is a check for __init__.py in the <layer>/lib/oeqa/runtime/ directory in all the layers in BBLAYERS. This check was needed because the way that python 2 import the modules, now that bitbake uses python 3 there is no need these __init__.py files, moreover these files won't allow to import tests from other layers. This patch removes the check. [YOCTO #9996] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-04oetest.py: Add command line parameter support for tag in testexportMariano Lopez
This allows to use a command line argument to change the tag used to filter test instead of rebuilding the tests. [YOCTO #8532] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> 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-01oeqa/utils/commands.py: Command class improve validations/decoding in outputAníbal Limón
When run a command sometimes the output isn't provided so validate before trying to encode to utf-8, also some output like BIOS/EFI contains characters that can't be codified into utf-8 for this reason set errors='replace'. [YOCTO #10019] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-01oeqa/runtime/syslog: test_syslog_logger Don't try to use logread when ↵Aníbal Limón
systemd is enabled Busybox logread uses shmmem circular buffer to retrive [1] syslog messages when systemd is enabled this shmem circular buffer isn't enabled because systemd journald doesn't provide it. [1] https://git.busybox.net/busybox/tree/sysklogd/logread.c?id=accd9eeb719916da974584b33b1aeced5f3bb346#n121 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-01oeqa/runtime/syslog.py: Improve test_syslog_loggerAníbal Limón
Instead of make all the testing in a shell one liner, divide the test into 3 operations to be able to know in what part is failing. Parts, - Log message to syslog - Review if message exist in /var/log/messages - Review if message exist using logread Signed-off-by: Aníbal Limón <anibal.limon@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-25lib/oe/recipeutils: fix patch_recipe*() with empty inputPaul Eggleton
If you supplied an empty file to patch_recipe() (or an empty list to patch_recipe_lines()) then the result was IndexError because the code checking to see if it needed to add an extra line of padding didn't check to see if there were in fact any lines before trying to access the last line. Fixes [YOCTO #9972]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-25classes/populate_sdk_ext: filter sstate within the extensible SDKPaul Eggleton
Use the new oe-check-sstate to filter the sstate artifacts shipped with the extensible SDK by effectively running bitbake within the produced eSDK and and getting it to tell us which tasks it will restore from sstate. This has several benefits: 1) We drop the *-initial artifacts from the minimal + toolchain eSDK. This still leaves us with a reasonably large SDK for this configuration, however it does pave the way for future reductions since we are actually filtering by what will be expected to be there on install rather than hoping that whatever cuts we make will match. 2) We verify bitbake's basic operation within the eSDK, i.e. that we haven't messed up the configuration 3) We verify that the sstate artifacts we expect to be present are present (at least in the sstate cache for the build producing the eSDK). Outside deletion of sstate artifacts has been a problem up to now, and this should at least catch that earlier i.e. during the build rather than when someone tries to install the eSDK. This does add a couple of minutes to the do_populate_sdk_ext time, but it seems like the most appropriate way to handle this. Should mostly address [YOCTO #9083] and [YOCTO #9626]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-25classes/populate_sdk_ext: allow including toolchain in eSDK on installPaul Eggleton
If we're to completely replace the standard SDK with the extensible SDK, we need to be able to provide the standard toolchain on install without doing anything other than installing it, so that you can install the SDK and then point your IDE at it. This is particularly applicable to the minimal SDK which normally installs nothing by default. NOTE: enabling this option currently adds ~280MB to the size of the minimal eSDK installer. If we need to reduce this further we would have to look at adjusting the dependencies and/or the sstate_depvalid() function in sstate.bbclass which eliminates dependencies, or look at reducing the size of the artifacts themselves. Implements [YOCTO #9751]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-25lib/oe/path: Fix tar invocation with --no-recursionClemens Lang
tar's --no-recursion flag only applies to files mentioned after the flag, which made it a no-op in this invocation of tar, because it was at the end of the command line. This is simple to verify with GNU tar 1.29: | $ mkdir foo | $ mkdir foo/dir | $ touch foo/dir/file | $ tar -cf - foo --no-recursion | tar t | foo/ | foo/dir/ | foo/dir/file | $ tar -cf - --no-recursion foo | tar t | foo/ Modify the code so that it actually does what the comment says by moving the flag in front of the --files-from argument. Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-25lib/oe/gpg_sign: fix output in error pathsRoss Burton
oe.utils.getstatusoutput() is a wrapper for subprocess.getstatusoutput() which uses Universal Newlines, so the output is a str() not bytes(). Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-25lib/oeqa/decorators: handle broken links when creating new symlinkRoss Burton
When checking if a link exists before creating it, use os.path.lexists() as otherwise os.path.exists() on a broken link will return False. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-21package_manager.py: Avoid installing an empty package listMark Hatle
It is possible in an attempt only install, that everything listed is not available to be installed. This will have the effect of clearing the package list. However, we only check for an empty package list at the beginning of the function. We need to also check before running the install, otherwise we can fail due to 'error: no package(s) given". Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-21buildhistory-diff: reduce PKGR noiseEd Bartosh
When using PR service the buildhistory-diff output contains a lot of PKGR changes: In practice the mass of PKGR updates hide other important changes as they often account for 80% of all changes. Skipped incremental and decremental changes of PKGR versions to reduce amount of the script output. All changes are still included in the output if script is run with -a/--report-all command line option. [YOCTO #9755] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20oeqa/controllers: Add test target for Systemd-bootJose Perez Carranza
A new test target is neede to test Systemd-boot similar to gummiboot. Created a copy of GummibootTarget class and named as SystemdbootTarget, at this point the gummibootTarget will remain until documentation is updated with new systed information. Signed-off-by: Jose Perez Carranza <jose.perez.carranza@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20oetest.py: Fix problem when there is more than one json file for package ↵Mariano Lopez
extraction This allow to have more than one test to have json file in order to install packages in the DUT without using a package manager. [YOCTO #9926] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20lib/oeqa/utils/commands.py: Move updateEnv() from runexported.pyMariano Lopez
updateEnv() can be used in other places so move the function to utils/commands.py Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> 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-20image: add do_image_qa task to run QA checks on the constructed imageJoshua Lock
This task runs all functions in IMAGE_QA_COMMANDS after the image construction has completed in order to validate the resulting image. Image sanity checks should either be Python functions which raise bb.build.FuncFailed on failure or shell functions with return a non-zero exit code. Python functions may instead raise an oe.utils.ImageQAFailed Exception which takes an extra argument, a description of the failure. python image_check_python_ok () { if True: raise bb.build.FuncFailed('This check always fails') else: bb.note("Nothing to see here") } image_check_shell_ok () { if true exit 1 else exit 0 fi } [YOCTO #9448] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> 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-20devtool: upgrade: record original recipe filesPaul Eggleton
This provides us with the information we need to remove the original version recipe and associated files when running "devtool finish" after "devtool upgrade". Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20lib/oe/recipeutils: fix a few issues in find_layerdir()Paul Eggleton
* Allow the function to be called with the base layer path (in which case it will just return the same path) * Ensure that the function doesn't recurse indefinitely if it's called on a file that's not inside a layer * Correct the doc comment for accuracy Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20oe/lib/package: handle shlibs files disappearingRoss Burton
During a parallel build it's possible for unrelated shlib files to be removed if the recipe they came from is about to be rebuilt. They can't be involved in the dependency chains as otherwise they wouldn't be removed, so just silently handle files disappearing. [ YOCTO #8555 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20utils/qemurunner.py: QemuRunner.start() add support for specify extra kernel ↵Aníbal Limón
cmdline Add ability to specify extra_bootargs (kernel cmdline) in order to enable systemd debug log in images that enables systemd init. [YOCTO #9299] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20remove sukokuRoss Burton
2016-07-20oeqa/sdk: remove buildsudoku testRoss Burton
This application needs GTK+ 2 which we're trying to move away from for Sato images. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-12lib/oe/patch: handle encoding differences in patch filesPaul Eggleton
With Python 3, the encoding of a file is significant; several recipes in OE-Core have patches which are not fully utf-8 decodable e.g. man, lrzsz, and gstreamer1.0-libav, leading to errors when using devtool's modify, upgrade or extract subcommands on these recipes. To work around this, try reading the patch file as utf-8 first and if that fails try latin-1 before giving up. 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-08terminal: Drop gnome-terminal --disable-factory workaroundsRichard Purdie
With the new pid monitoring code we have for recent versions of gnome-terminal we can just drop the --disable-factory code now since the other solution handles this case as well. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08terminal: Fix gnome-terminal to work with recent versionsRichard Purdie
Currently gnome-terminal just returns straight away, opening a terminal in a new separate process we have no insight into. For patch resolution, this leads to spawning many different terminal windows, for pydevshell, it just flashes a window up and then closes. We need to block until the command completes but gnome-terminal gives us no way to do this. We therefore write the pid to a file using a "phonehome" wrapper script, then monitor the pid until it exits. [YOCTO #7254] (also fixing do_devpyshell) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-07-08oeqa/runtime/systemd: fix typo in skipUnlessPassed decoratorRoss Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08lib/oe/path: remove oe.path.check_outputRoss Burton
This was a copy-and-paste of subprocess.check_output() from when we supported Python <2.7, so simply delete it and use subprocess.check_output() instead. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-07lib/oe/sstatesig: print locked sigs file message only when explicitly calledPaul Eggleton
If we're building the extensible SDK we don't need to see the "Writing locked sigs" message; it's only necessary when the user explicitly runs bitbake -S none <target>. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-07classes/image: implement progress support for do_rootfsPaul Eggleton
Use the new task progress functionality to report progress during do_rootfs. This is a little coarse and ideally we would have some progress within the installation section, but it's better than nothing. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01lib/oeqa: add Galculator to SDK and runtime testsRoss Burton
This is a GTK+3 application, so we don't need to ship GTK+ 2 in Sato just for the SDK test suite. [ YOCTO #9780 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa/runtime/syslog: remove redundant skipUnlessPassedRoss Burton
The test test_syslog_help doesn't exist, so skipping unless it passed just produced a warning. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa/utils/commands: fix single-character variable matching in get_bb_vars()Ross Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oe-build-perf-test: implement --globalres-file optionMarkus Lehtonen
Using this option the script appends test results into a 'global results file'. A CSV-formatted output of the results. This option is to provide compatibility with the old build-perf-test.sh. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add git revision and branch to result dataMarkus Lehtonen
BuildPerfTestRunner determines these from the Git repository under which it is being run (i.e. where the build directory exists). The branch and revision may be defined/overridden with OE_BUILDPERFTEST_GIT_BRANCH and OE_BUILDPERFTEST_GIT_BRANCH environment variables, if needed. This makes it possible to run the build performance test script even if the top directory is not a git repository clone, for example. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>