Commit Graph

637 Commits

Author SHA1 Message Date
Mariano Lopez 44ae8284d0 selftest/runtime-test.py: Add test for testexport SDK feature
This adds test_testexport_sdk() to test the SDK feature
of testexport in the CI in order to avoid breaking it.

[YOCTO #9765]

(From OE-Core rev: badec3d10fcdd2d000450ab533caadcff1df5e13)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-04 15:22:22 +01:00
Aníbal Limón 1981ab0829 oeqa/utils/commands.py: Command class improve validations/decoding in output
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]

(From OE-Core rev: f2a04faf3c5d0a3cc562061b22e1c4873e1ca769)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-01 11:47:13 +01:00
Aníbal Limón 1648504198 oeqa/runtime/syslog: test_syslog_logger Don't try to use logread when 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

(From OE-Core rev: f49e4847ba00cdd072e5f072cb9ca69ef98af758)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-01 11:47:13 +01:00
Aníbal Limón b4ba36a9d7 oeqa/runtime/syslog.py: Improve test_syslog_logger
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

(From OE-Core rev: f3fe3590e887ee311f23723103eca41dcf58aa8b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-01 11:47:13 +01:00
Mariano Lopez f31683d5ba selftest/runtime-test.py: Add test for import test from other layers
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]

(From OE-Core rev: cffab2257dacfa741c64611dfdf361f77aff9460)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-01 11:47:12 +01:00
Paul Eggleton cc3c276852 oe-selftest: recipetool: add tests for git URL mangling
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.

(From OE-Core rev: d8d01f462ddbb79cff23b544fcd0ce251f05f8ce)

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-08-01 11:47:10 +01:00
Ross Burton 1b4dc787b8 oeqa/selftest/signing: check that we have GPG in setup
(From OE-Core rev: 6eb6fde2567a2692afccb7ee0546b2c992c168aa)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26 08:56:31 +01:00
Ross Burton 5218c24c8b oeqa/selftest/signing: use a temporary directory for GPG home
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.

(From OE-Core rev: d4a5b5d11c6d7d5aba5f2eb88db091c1b98ef87c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26 08:56:31 +01:00
Ross Burton 31cef0d518 lib/oeqa/decorators: handle broken links when creating new symlink
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.

(From OE-Core rev: ec24b6de2b8686e1f779fef3a963e66f70eeba74)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26 08:56:25 +01:00
Jose Perez Carranza 8da54b401d oeqa/controllers: Add test target for Systemd-boot
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.

(From OE-Core rev: d1fd3a7dbc363bdc02d810f796b3b810cb13f029)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-21 07:47:52 +01:00
Mariano Lopez cd78d8745d oetest.py: Fix problem when there is more than one json file for package 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]

(From OE-Core rev: 129c2b4589710aa24e23108f2728f1625b72cb06)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-21 07:47:52 +01:00
Mariano Lopez e1aa836bb9 lib/oeqa/utils/commands.py: Move updateEnv() from runexported.py
updateEnv() can be used in other places so move the
function to utils/commands.py

(From OE-Core rev: 380e5d80898cac4ffc9715b3f597d0b62a0643ff)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-21 07:47:52 +01:00
Ross Burton bb42984277 oeqa/recipetool: update recipe test to pass SHA
(From OE-Core rev: 71dd4c05c41e8b363dc1ecac1f5105d316ee82dc)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:53 +01:00
Ross Burton 738f47a2d9 oeqa/devtool: update recipe test as libmatchbox changed
(From OE-Core rev: b36712eef14c20007e0adb01cc7d4bce9e7926bb)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:53 +01:00
Jussi Kukkonen 096b4c639b libxsettings-client: Remove as unneeded
xsettings-client is not meant to be a shared library and the only
user in oe-core (libmatchbox) now has an in-tree copy.

(From OE-Core rev: ed5cbf977dca8f3d85c8d933071c6e49fb4bd95f)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:50 +01:00
Ed Bartosh 05084640e6 wic: oe-selftest: build bmap-tools-native
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.

(From OE-Core rev: dd11ab551f9bf1d8761d0430f19510a9caa53a12)

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-20 10:28:50 +01:00
Paul Eggleton d62fd7711d devtool: add finish subcommand
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].

(From OE-Core rev: fa550fcb9333d59b28fc0e4aebde888831410f5c)

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-20 10:28:49 +01:00
Aníbal Limón ad6aaae4bf utils/qemurunner.py: QemuRunner.start() add support for specify extra kernel cmdline
Add ability to specify extra_bootargs (kernel cmdline) in order to enable systemd
debug log in images that enables systemd init.

[YOCTO #9299]

(From OE-Core rev: 09d62551c289b5607341a4f9c46eecd6390ad774)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:47 +01:00
Ross Burton 38d2c59ab8 remove sukoku
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:44 +01:00
Ross Burton 9c4b143607 oeqa/sdk: remove buildsudoku test
This application needs GTK+ 2 which we're trying to move away from for Sato
images.

(From OE-Core rev: 5e52f208a17e7122209675fa96de6e7807c62feb)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:44 +01:00
Maxin B. John 78523811fb buildoptions.py: remove directfb image build test
removing this test since we move directfb out of oe-core

(From OE-Core rev: 2d8fda36ecfa1945f22b7139a2febd12ec59272b)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-10 14:12:17 +01:00
Paul Eggleton a14d30f7de oe-selftest: drop test_prepare_unexpected
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.

(From OE-Core rev: 7e792a22e62904ed2dafb1ea214911235e3f3efc)

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-08 10:29:44 +01:00
Richard Purdie 1bbd580a37 oeqa/selftest/bbtests: Fix failing test after progress changes
The progress patches change the output slightly, update the test to
deal with this.

(From OE-Core rev: 90dbd838fa97c89ace5cb147aa5cff39b94178b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:26 +01:00
Ross Burton c7147ceec8 oeqa/runtime/systemd: fix typo in skipUnlessPassed decorator
(From OE-Core rev: f0420d8c934154a94957cabcfdc993f0eae92cd7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:26 +01:00
Ross Burton 5c11e365e1 lib/oeqa: add Galculator to SDK and runtime tests
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 ]

(From OE-Core rev: 53fcfe4348a2ca727844f2b0bd3fca2902cbdda0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:48 +01:00
Ross Burton b305564028 oeqa/runtime/syslog: remove redundant skipUnlessPassed
The test test_syslog_help doesn't exist, so skipping unless it passed just
produced a warning.

(From OE-Core rev: 9856fe02bf30cd9e834a7d324e357070f4d7735f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:48 +01:00
Ross Burton 076a93eed7 oeqa/utils/commands: fix single-character variable matching in get_bb_vars()
(From OE-Core rev: 2f7e4d0636ce1647edf2d82c65b82be0eb2c1db1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:48 +01:00
Markus Lehtonen eb36f00002 oe-build-perf-test: implement --globalres-file option
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.

(From OE-Core rev: e9f18e63220e452f2b0c878998e57d944ae83980)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen 8c596369dd oeqa.buildperf: add git revision and branch to result data
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.

(From OE-Core rev: e6004582454d8c6a18f617c12e6e408ded5be8df)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen 964fffa514 oeqa.utils: add git module
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.

(From OE-Core rev: 4eaf434f885afbda03fe67ab6e9ff291c7a9c77e)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen 5599645d33 oeqa.buildperf: archive build/conf into test results
Have the build/conf directory as part of test results.

(From OE-Core rev: ea32a8a65f668450e0ec0e80483bd5e8c91b8a18)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen da3b9242fc oeqa.buildperf: add test Test4
Re-implement "test4" from build-perf-test.sh which measures eSDK metrics.

(From OE-Core rev: c449ca1b062426380a0572aed2da4ee4a83281f5)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen fe24b5a597 oeqa.buildperf: add test Test3
Re-implement "test3" from build-perf-test.sh which measures
bitbake parsing time.

(From OE-Core rev: 388c7160b90247df9c78d8803083821402c13af5)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen 0b2fae81fd oeqa.buildperf: add test Test2
Re-implement "test2" from build-perf-test.sh which measures
'bitbake core-image-sato -c rootfs'.

(From OE-Core rev: 8cb322d6a5be08f0bb2c9e5d3b73161b20d737a3)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen 1701a34f14 oeqa.buildperf: add test Test1P3
Re-implement "test1_p3" from build-perf-test.sh which measures
'bitbake core-image-sato' with rm_work enabled.

(From OE-Core rev: bfe48d343e8a281760da0b6744c08d47039f93e0)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen b5ca437714 oeqa.buildperf: add test Test1P2
Re-implement "test1_p2" from build-perf-test.sh which measures
'bitbake virtual/kernel'.

(From OE-Core rev: 5ff82c6e2b0ff41a9bfdd49c99e84a982cf6e467)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen 2c1b87482c oeqa.buildperf: add test Test1P1
Re-implement "test1_p1" from build-perf-test.sh which measures
'bitbake core-image-sato'.

(From OE-Core rev: 1ddd4a8ce4e2053def0e946d4e4b4b97bdc28e61)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:47 +01:00
Markus Lehtonen 1d88659ef6 oeqa.buildperf: implement BuildPerfTestRunner class
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.

(From OE-Core rev: bf90aecb7e150d6bfac7240286c797b79d26528b)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen 6512d6956b oeqa.buildperf: add method for saving buildstats
(From OE-Core rev: 15b44a484ce408b0a1acfb907e2b12ebc6cce296)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen 45c6a04a37 oeqa.buildperf: add method for measuring file disk usage
Add a new method to BuildPerfTest class for measuring the disk usage of
a file of directory.

(From OE-Core rev: 85cdc240e75d481e93238fbf75f8b8431da05f19)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen 1a0e20546e oeqa.buildperf: add method to log shell commands
Add new methods to BuildPerfTest class for running a shell
command and logging its output.

(From OE-Core rev: 8f0b11ba1266f9c650cf34d9b394d72009ee7207)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen 6e27b2ae0e oeqa.buildperf: method for measuring system resource usage
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.

(From OE-Core rev: ced156bfea4a6649d201f41275641a633f218322)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen 1b10ded015 oeqa.buildperf: add BuildPerfTest class
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.

(From OE-Core rev: 35cd7363759a286e80ddca0d028db3d2bf524b17)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen cee685ca0d oeqa.buildperf: functionality to drop kernel caches
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.

(From OE-Core rev: c9cb248429ced50c96d11ba5361c272d4c9b9323)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen 7d42ceae3a oe-build-perf-test: introduce oeqa.buildperf module
Wireframe of a new Python module for containing build performance tests
and utility functions.

(From OE-Core rev: b44af9051a9da8d2cddc7b071a896331967f15cc)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen ec8be2039e oeqa.utils.commands: runCmd: return stderr output, too
Useful if one wants to separate stdout and stderr.

(From OE-Core rev: de9744c91a997a5ab0e7a19dbe13d8def8d62800)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:46 +01:00
Markus Lehtonen cf4c8980d7 oeqa.utils.commands: use get_bb_vars() in get_bb_var()
Get rid of duplicate code.

(From OE-Core rev: cdd6b7386afd460337705d8117a4328d4993ecef)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:45 +01:00
Markus Lehtonen c9639e6523 oeqa.utils.commands: Introduce get_bb_vars()
A new function for getting values of multiple bitbake variables at the
same time.

(From OE-Core rev: fe3039322e2f846b336ac5af5177e9da27d79695)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:45 +01:00
Ross Burton 1960abc96c oeqa/targetbuild: use os.path.join instead of string concatenation
(From OE-Core rev: 1d40f6e3d85d0cd3be6dd784677686ed4dec89c4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23 14:26:16 +01:00
Ross Burton 40268fe27a oeqa/targetbuild: add extra_cmds argument to run_configure
Some upstreams need more than just gnu-configize ran before ./configure works,
such as ./autogen.sh or autoreconf.  Add extra_args (defaulting to
gnu-configize) so that this can be done in test cases.

(From OE-Core rev: 7096f2889f1623ce97a6696f6f4c7217f0efb972)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23 14:26:16 +01:00