aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
AgeCommit message (Collapse)Author
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-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/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-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-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-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-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-07-08oeqa/runtime/systemd: fix typo in skipUnlessPassed decoratorRoss Burton
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>
2016-07-01oeqa.utils: add git moduleMarkus Lehtonen
A new helper module for easier interaction with Git repositories. Provides GitRepo class that represents one local Git repository clone. The GitRepo class currently only has one method, run_cmd(), for running arbitrary git commands in the repository. More specialized methods for commonly used git operations can be added later. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: archive build/conf into test resultsMarkus Lehtonen
Have the build/conf directory as part of test results. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add test Test4Markus Lehtonen
Re-implement "test4" from build-perf-test.sh which measures eSDK metrics. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add test Test3Markus Lehtonen
Re-implement "test3" from build-perf-test.sh which measures bitbake parsing time. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add test Test2Markus Lehtonen
Re-implement "test2" from build-perf-test.sh which measures 'bitbake core-image-sato -c rootfs'. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add test Test1P3Markus Lehtonen
Re-implement "test1_p3" from build-perf-test.sh which measures 'bitbake core-image-sato' with rm_work enabled. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add test Test1P2Markus Lehtonen
Re-implement "test1_p2" from build-perf-test.sh which measures 'bitbake virtual/kernel'. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add test Test1P1Markus Lehtonen
Re-implement "test1_p1" from build-perf-test.sh which measures 'bitbake core-image-sato'. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: implement BuildPerfTestRunner classMarkus Lehtonen
The new class is responsible for actually running the tests and processing their results. This commit also adds a decorator function for adding new tests. No automatic test discovery, at least yet. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add method for saving buildstatsMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add method for measuring file disk usageMarkus Lehtonen
Add a new method to BuildPerfTest class for measuring the disk usage of a file of directory. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add method to log shell commandsMarkus Lehtonen
Add new methods to BuildPerfTest class for running a shell command and logging its output. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: method for measuring system resource usageMarkus Lehtonen
Extend BuildPerfTest class with a new method for measuring the system resource usage of a shell command to BuildPerfTest class. For now, easurement of the elapsed time is done with the Gnu time utility, similarly to the build-perf-test.sh shell script. And, it currently only records the elapsed (wall clock). The measured values (currently, only the elapsed time) is actually a dictionary, making it possible to extend it with additional resource values, e.g. cpu time or i/o usage, in the future. In addition to the actual values of the measurement each record contains a 'name' and 'legend' where name is supposed to function as a common key or id over test runs, making comparison and trending easier, for example. Legend is supposed to be a short human readable description. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: add BuildPerfTest classMarkus Lehtonen
The new class will be used as an abstract base class for build performance tests. This implementation contains some common functionality used in multiple tests, "copied" from the build-perf-test.sh shell script. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: functionality to drop kernel cachesMarkus Lehtonen
Add a new utility class for dropping Linux kernel caches. It uses sudo and tee to write to the drop_caches file. Checking if the user has the permissions to drop caches (without a password) is done by trying to writing an invalid value to the drop_caches file. This way, we will find if writing (with tee) is possible but not really dropping caches, yet. User can avoid giving the password by adding something like: <user> ALL = NOPASSWD: /usr/bin/tee /proc/sys/vm/drop_caches to the system sudoers file. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oe-build-perf-test: introduce oeqa.buildperf moduleMarkus Lehtonen
Wireframe of a new Python module for containing build performance tests and utility functions. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.utils.commands: runCmd: return stderr output, tooMarkus Lehtonen
Useful if one wants to separate stdout and stderr. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.utils.commands: use get_bb_vars() in get_bb_var()Markus Lehtonen
Get rid of duplicate code. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>