Commit Graph

267 Commits

Author SHA1 Message Date
Jacob Kroon 3de579c28d meta/lib/oe/terminal.py: Don't pass non-supported '--disable-factory' flag to gnome-terminal
By default, all GNOME terminals share a single process,
reducing memory usage.  This can be disabled by starting gnome-terminal
with the --disable-factory option

However, gnome-terminal in Fedora 20 does no longer support the
'--disable-factory' flag, so remove it. As the support for 'mate' terminals was
added as a copy of the gnome code in 8cc078a9c679845464c59028f584d7aba098cc1f,
remove the flag here aswell.

(From OE-Core rev: e8dca725ed8211a874472300a3ed50e494039ab9)

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 12:56:29 +00:00
Richard Purdie 3ada51f7aa sstate/sstatesig: Add populate_lic to list of arch invariant sstate tasks
Like fetch, unpack and patch, populate_lic doesn't vary between different
archs so we should mark it as such. This means better sstate cache reuse
with fewer duplicate files as well as less confusing sstate debugging.

sstatesig also needs to account for the fact BPN is used for sstate files
in these cases.

(From OE-Core rev: 3d59d0bed756f64d0092caa3892239c779c4a341)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:32 +00:00
Stefan Stanacar b24f2172a5 lib/oeqa/runtime: rewrite the systemd test module
They are basically the same tests but:
- they look cleaner, using one single method / assert
- output from unittest will be cleaner (and includes a verbose status when needed)
- they are better grouped and use a real, active, enabled service
  (machineid will be dropped and hostnamed was a static service)

(From OE-Core rev: 0aa5b97f9e0d8941ce342e9f162dd3b19d4b49bb)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:29 +00:00
Corneliu Stoicescu 7c1c3d1c6e oe-selftest: added buildhistory buildtime tests in module buildoptions.py
(From OE-Core rev: 0e462295d9db0201fb1ba2b6247ecb05fa7fcee1)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:29 +00:00
Corneliu Stoicescu 6fe6a91db5 oe-selftest: New test module for OE scripts.
Added a new module meta/lib/oeqa/selftest/oescripts.py containing tests
for scripts from ${COREBASE}/scripts

(From OE-Core rev: 685879739017317f234824689cbd89388d236816)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:29 +00:00
Corneliu Stoicescu 8379990a4c oe-selftest: New BuildhistoryBase object for buildhistory testing.
(From OE-Core rev: 8c77911b0924dfb5b966bc40a541a02a29568603)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:28 +00:00
Richard Purdie bd3fed53ac sstatesig: Correctly handle matches spanning stamps and sstatedir
By resetting filesdates at this point, we lose matches from stamps which
may not have been in sstatedir. When we don't have hashes specicifed,
its better to return all matches and have the caller decide which are
relavent and which are not since this function has no ability to
decide. There will almost always be one match from stamps we need
to keep and refer to.

(From OE-Core rev: f4c1c9ad2c7e944d4926d0629611da97f9df6a9a)

(From OE-Core rev: 8629844640a5a4c6a9d9375e7b637bcbf3451c4c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:27 +00:00
Richard Purdie c61fe390bc sstatesig: Update for the removal of sstate-name
We've dropped sstate-name so we can remove this code. The fallback was
incorrect since we use taskname without the do_ prefix so this patch
updates to account for that too.

(From OE-Core rev: 72ff58124081333d46d37f31f2d1bf40d715e3bd)

(From OE-Core rev: dbc1426ee75bcf2f6d8b18312522a9b823e23173)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:27 +00:00
Richard Purdie b6b6d923a6 sstatesig: Ensure we return all matches for find_sigdata
When the hashes to find isn't specified we need to return matches from both
the sstate cache and the local stamps directory regardless of how many we've
found so far. If we don't do this, we can miss stamps and the comparison is
less accurate/incorrect.

(From OE-Core rev: 08a074e11e2d517b81ca71fd9bda65297bb015a7)

(From OE-Core rev: 04fc682af7c1657b1c9f37b66a78c4ffc8066e24)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:26 +00:00
Ross Burton 599eed2f3b lib/oeqa/runtime: systemd failure case improvements
If the hostnamed service can't be started or stopped, show the output from
systemctl status to assist debugging.

(From OE-Core rev: 024cc1cee3a9954272ecbbff1ba7153725c56dce)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:11:19 +00:00
Corneliu Stoicescu 6bc2df55a5 oe-selftest: Add track_for_cleanup method to be used in cleanup tasks
Added a track_for_cleanup(path) method that removes the given path in the
tearDown method. This mechanism can be used to make sure a file or directory
we created will be removed at the end of a test, regardless of what happens.

(From OE-Core rev: 358415cf604089cc2dab547e231d062b9dc068ee)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:11:17 +00:00
Corneliu Stoicescu 90fa0fd4a7 oe-selftest: implement add_command_to_tearDown method
Add a new method that can be used by the tester to add a command to the
executed in the tearDown stage of the test. This mechanism can be used to
make sure certain test-specific cleanup tasks are done in the case of a
test failure.

(From OE-Core rev: b59466ec341e6596b7ade7f1813b25e454b11a32)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:11:17 +00:00
Ross Burton 8dee33872b lib/oeqa/runtime: output more logging from systemd when services have failed
If some services have failed to start, get the status of them and some of their
log to help debug the problem.

(From OE-Core rev: e371765431be25b81dbdb385233e3db5851e59d0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:30 +00:00
Ross Burton 5c58ba9fca lib/oeqa/runtime: print connman status if connman failed to start
If connman isn't running and we're running under systemd, use systemctl to get
the state according to systemd and the end of the connman log.

(From OE-Core rev: e77bcc8e4baf11701b105d071a979a21a2a303d5)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:30 +00:00
Corneliu Stoicescu a67654e06e lib/oeqa/selftest: add tests for PR service
(From OE-Core rev: 162cfffb32d909f9cac88b4f872173d21524d8ed)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:24:43 +00:00
Stefan Stanacar 347cc15ebd lib/oeqa/selftest: buildoptions: small fixes for some tests
While harmless, we should overwrite the config not append to it,
and use m4 as target, otherwise the WARN check will
build an entire image and we are not interested in that.
Also add an output check for the WARN_QA test.

(From OE-Core rev: 83b0a9231691aba9a7753350d131b0ab9196815e)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:24:43 +00:00
Stefan Stanacar f17a6937ab lib/oeqa/selftest/base, scripts/oe-selftest: fix wrong remove path and do a complete cleanup at the end
The script should clean-up all the .inc files that might
have been created by tests regardless of the outcome or if
the script is interrupted. (currently the
last test will leave a conf/selftest.inc around, even
if it's not included anywhere)
Also fix delete_recipeinc to actually delete what's supposed to.

(From OE-Core rev: 6008745c56800e0f5f01a756be0701cebd9de4ae)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:24:43 +00:00
Stefan Stanacar 17e3dc2cb5 lib/oeqa: targetcontrol.py: add abstraction for running tests on different targets
Add a new module which abstracts the target object used by testimage.bbclass

The purpose of this module is to move the deployment of a target from testimage.bbclass,
basically abstracting different implementations of how we setup a target and how it runs commands.
It allows to select one implementation or another by setting TEST_TARGET (currently to: "qemu" and "simpleremote").

QemuTarget is used to start a qemu instance (as it's currently done in testimage.bbclass)
SimpleRemoteTarget is meant for a remote machine (by setting TEST_TARGET_IP) that's already up and running
with network and ssh.
Simply put, it opens the door for running the tests on different types of targets by adding new classes
(maybe qemu-nfsroot or remote-special etc.). One could also override BaseTarget which currently uses
the existing SSHControl module and add a serial implementation.

[ YOCTO #5554 ]

(From OE-Core rev: c1bfd4017f6f6502a68ceb3edf7d2027d02a309d)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:52 +00:00
Stefan Stanacar b4d9b4208b testimage: use the new targetcontrol.py module for running tests
This patch makes the necessary changes for using the targetcontrol.py module
so that one can run the same tests on a qemu instance or a remote machine
based on the value of TEST_TARGET variable: "qemu" or "simpleremote".
The default value is "qemu" which starts a qemu instance and it's the
with what we currently have.

With "simpleremote", the remote machine must be up with network and ssh
and you need to set TEST_TARGET_IP with the IP address of the remote machine
(it can still be a qemu instance that was manually started).

Basically testimage.bbclass now does something along the lines of:
 - load tests -> deploy (prepare) / start target -> run tests.
There were a couple of changes necessary for tests and
also some cleanups/renames that were needed to adjust this change. (use
ip everywhere when refering to target and server_ip when refering to host/build machine)
Also two unnecessary and unsed methods were dropped from sshcontrol.

[ YOCTO #5554 ]

(From OE-Core rev: a7820350fa3271d78ed7476e02f4aef593be1125)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:51 +00:00
Stefan Stanacar d4398d41be lib/oeqa: use the new manifest file for determining if a package is installed
Use the new manifest file instead of ${WORKDIR}/installed_pkgs.txt for determining
if an image has a certain package, because installed_pkgs.txt goes away with rm_work
enabled.
We can't use the IMAGE_MANIFEST var for the file path because that relies on IMAGE_NAME which
changes at every run (because of date), so we use the link which points to the last
one built.

[ YOCTO #5072 ]

(From OE-Core rev: f57c83fc33583c140f668946f3f3e79b960aa9ee)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:51 +00:00
Corneliu Stoicescu 1611b474b6 lib/oeqa/selftest: add test modules for expected bitbake output and bitbake-layers
Tests for bitbake-layers and expected output for some bitbake options.

(From OE-Core rev: 8408a7700cd9cab4559ddae0bbe57f0d7fae5c37)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:51 +00:00
Alexandru Palalau f8ee10865d lib/oeqa/selftest: buildoptions.py: add simple image build tests
Build images and tests different build options like RM_OLD_IMAGE
and for WARN_QA/ERROR_QA behaviour.

(From OE-Core rev: 75d2a1a37a18a22b0da7ab5b30cf005c78bc313f)

Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:51 +00:00
Stefan Stanacar 645dd61cd2 scripts/oe-selftest: script to run builds as unittest against bitbake or various scripts
The purpose of oe-selftest is to run unittest modules added from meta/lib/oeqa/selftest,
which are tests against bitbake tools.

Right now the script it's useful for simple tests like:
  - "bitbake --someoption, change some metadata, bitbake X, check something" type scenarios (PR service, error output, etc)
  - or "bitbake-layers <...>" type scripts and yocto-bsp tools.

This commit also adds some helper modules that the tests will use and a base class.
Also, most of the tests will have a dependency on a meta-selftest layer
which contains specially modified recipes/bbappends/include files for the purpose of the tests.
The tests themselves will usually write to ".inc" files from the layer or in conf/selftest.inc
(which is added as an include in local.conf at the start and removed at the end)

It's a simple matter or sourcing the enviroment, adding the meta-selftest layer to bblayers.conf
and running: oe-selftest to get some results. It would finish faster if at least a core-image-minimal
was built before.

[ YOCTO #4740 ]

(From OE-Core rev: 41a4f8fb005328d3a631a9036ceb6dcf75754410)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton 0cb38ee34a classes/buildhistory: add additional variables to image information
Add PACKAGE_EXCLUDE and NO_RECOMMENDATIONS to the info we track for
images, since these can change what ends up in the image.

(From OE-Core rev: a10189366f180b87f5be20b66834b7e7a9bb8c12)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Richard Purdie 80d522a5bc sstatesig.py: Fix image regeneration issue
With the "ABI safe" recipes, we've been excluding those from signatures. This
is fine in the general case but in the specific case of image recipes it breaks.

A good test case is the interfaces file. Editting this causes init-ifupdown
to rebuild but not an image containing it (e.g. core-image-minimal).

We need to ensure the checksums are added to the image recipes and this change
does that.

(From OE-Core rev: fd085f15e7cd093953f974f69277e130174d551d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 10:49:25 +00:00
Ross Burton afe82ef3c4 oeqa/connman: disable unique test
The connman unique test starts another instance of connmand and then does a ps to
verify that there's only one of these running, on the assumption that the new
one has quit because there's already one running (started by init).

However, connmand is forking into the background straight away so there's a race
between running ps and the second connmand discovering the first and exiting.
This race can be seen because the test displays the output of ps, and by the
time that second ps has been executed the new connmand has exited.

This is a classic race condition and on a heavily loaded autobuilder inserting
an arbitrary sleep isn't wise.  In the scheme of things this test isn't very
useful, so delete it.

(From OE-Core rev: 80ef721140c79e29430d0a5692a5c176db0061e6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22 12:03:02 +00:00
Paul Eggleton 36255d4c23 buildhistory_analysis: fix error when comparing image contents
OE-Core commit b7de1eaac9eed559b2d68058f5de67de74a6cb58 added an extra
argument to the compare_dict_blobs() function but missed adding the
argument to one call to compare two versions of the image-info.txt file.

(From OE-Core rev: 24a45d752c3e3d0d8b59c040355e4fe7de22b041)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:04 +00:00
Richard Purdie c393536210 lib/oe/path: Fixup handling of .* files in top level paths for copyhardlinktree()
Files named .* in the top level of directories handled by this function
were getting lost after the directory copying command was fixed. Rather
than complicate the function further, use cpio instead.

(From OE-Core rev: 59612905e9bb865762667aa7b3cb06e53c3a4071)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 10:34:09 +00:00
Richard Purdie 8a07a176d7 lib/oe/path: Fix performance issue got copyhardlinktree()
With the directory copy was added to avoid race issues, it wasn't noticed that
tar was recursing the directories and copying files too. This is completely
crazy when we hardlink those files in the next command.

Resolve the issue by telling tar not to recurse. This gives a significant
performance boost to various parts of the system (do_package for linux-yocto
256s -> 178s for example).

(From OE-Core rev: 8b90ed084d59b4e07aa547255d327b25cfb2ee2b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 10:34:09 +00:00
Stefan Stanacar 1e16634af6 lib/oeqa/utils: sshcontrol: make timeout depend on output
Instead of running the commands with a fixed timeout,
we should kill the command if there is no output
for timeout seconds.
Also changed some strings/comments.

(From OE-Core rev: beea86fa9637fd629719980e14beea758847b8f3)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-08 17:25:36 +00:00
Richard Purdie 26559c5816 lib/oe/sstatesig: Ensure packagegroups don't continually rebuild
packagegroups are allarch and shouldn't change depending on the target
or machine selected. In general they should have good stable namespaces
for their dependencies. As such we can exclude them from rebuilding when
dependency checksums change.

(From OE-Core rev: 80b065ff46322ec0cad039dfd9eb2d010168dba6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-08 17:25:35 +00:00
Stefan Stanacar 19aeca1cac lib/oeqa: add oeTest superclass
Add oeTest superclass, make oeRuntimeTest inherit that and
make the necesarry adjustments. Tests in lib/oeqa/runtime don't
change, they still inherit oeRuntimeTest.
We should do this because oetest.py in the future can be a base module
for more stuff than oeRuntimeTest.

(From OE-Core rev: cd4ed41a070bd52c446ac3df8337f17ab9421145)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-05 22:04:28 +00:00
Paul Eggleton f995febd2e buildhistory-diff: add ability to report version changes
Add a -v/--report-ver option to report changes in PKGE/PKGV/PKGR even
if the value is the same as the default from PE/PV/PR.

Also add a -a/--report-all option to report all changes instead of just
the default significant ones.

Addresses [YOCTO #5263].

(From OE-Core rev: b7de1eaac9eed559b2d68058f5de67de74a6cb58)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-26 15:59:13 +01:00
Stefan Stanacar d3cb369365 lib/oeqa/runtime: build kernel module on target test
Builds a simple Hello World module on target.
Added to the defaults for core-image-sato-sdk.

(From OE-Core rev: c61c3dee162aa1f5bf31b2a09d8b916dc1712056)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 15:58:16 +01:00
Richard Purdie bf19a8617d lib/oe/path: Fix copytree functions for tar 1.27
tar version 1.27 returns:

tar: --same-order option cannot be used with -c

with the commandlines we have been using. We can remove the -s option (which
is --same-order) to remove the error.

(From OE-Core rev: 69c26e795c117aabfaf313abbfd10e70ede633d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:21 +01:00
Stefan Stanacar 41f88ee1db lib/oeqa/runtime: ping: wait for 5 echo replies
Instead of considering that ping test passed after 1 reply,
wait for at least 5 consecutive replies in 60 seconds (which should
be enough time for connman to reconfigure the interface in systemd
images and help with the fake ssh/tests fails.)

(From OE-Core rev: 6fd19a9df0ad25b2822f12e2c3a97f1b71068d4e)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26 16:37:55 +01:00
Stefan Stanacar ad77d10386 lib/oeqa/runtime: cleanup and improve output readability for some tests
- move everything in the same test. setUp/tearDown aren't quite
the right thing here, everything it's part of the same test. (and
it get's confusing when ssh fails)

ldd:
   - change test name and add output to error message

vnc:
   - remove unnecessary check as there is no point in doing
both ps and netstat. Also improve error output a bit.

(From OE-Core rev: 2f91bb438cfcdd0a40daed5902b6e98fc0aee67f)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:33 +01:00
Stefan Stanacar f3ab2fc731 lib/oeqa/utils: sshcontrol: log how long the last command take
It might be useful for debugging to have in the ssh log
the number of seconds a command has run.

(From OE-Core rev: 48b9e45b9716130b015ae2ab7398d6aa243933dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:33 +01:00
Ross Burton 4a224d31c8 qemurunner: disable grabs in automated testing
Use the new QEMU_DONT_GRAB environment variable to disable grabs,
finally/hopefully solving the random hangs that the autobuilder has been hitting
for a while.

[ YOCTO #5131 ]

(From OE-Core rev: 32f9575a565f350649264c11eceba8311584b0fd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18 17:52:04 +01:00
Saul Wold 14fee32867 oeqa/runtime/smart: Increase timeout to 1500 test
(From OE-Core rev: a99edb5552839fd50326dd3aa4ee2f36f6026882)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17 19:34:55 +01:00
Stefan Stanacar 214bb6828e lib/oeqa/runtime: timeout increases
Increase the timeout for smart commands as under load for qemumips
it's still to small. Also give ping more time fixing a potential
timeout for sato systemd.

(From OE-Core rev: daa3ad5807f6fc0d15b9310937d07a16edac6d22)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00
Richard Purdie 8ebe7be3d9 bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory
Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.

This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.

With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.

The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.

It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.

(From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00
Paul Eggleton 6670be71f7 bitbake.conf: include machine name in DEPLOY_DIR_IMAGE
This allows a clean seperation between image outputs from different
machines, and makes it possible to have convenience symlinks to make
the output ready to deploy.

This did require some surgery in runqemu; if explicit paths to the image
and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined
from bitbake or set in the environment. However the script does try to
avoid requiring it unless it really is needed. Corresponding changes
were made in the automated testing code as well.

Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net>

(From OE-Core rev: 7e90261aec61f79680b5eaeaf5b18c7b795412a4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00
Stefan Stanacar 01135ee6f2 lib/oeqa/runtime: smart: limit channel add to useful ones
Don't add inappropiate channels on the target.
This happens when building two different machines in the
same dir and then running the tests for each machine.

(From OE-Core rev: 9e4e475b598f6b9bd2b653c72a1c1d5bd5c0b8c9)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11 23:31:00 +01:00
Richard Purdie 9b84fc7cc2 lib/oeqa/qemurunner: Use a timeout in select() call
A 0 value to select.select() immediately returns with no timeout. This was
pegging the cpu at 100% for the python process which was bad and may be
contributing to some of the timeout problems.

Profile from -P of a core-image-minimal before:

    97526792 function calls (97525652 primitive calls) in 45.189 seconds

and after:

       50204 function calls (49064 primitive calls) in 17.318 seconds

Saving 97.5 million function calls has to be good :)

(From OE-Core rev: c0551436974d179df23418567f18a082830380f6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 23:04:51 +01:00
Stefan Stanacar 41d1c2d630 lib/oeqa/runtime: add basic scanelf test
This uses scanelf from the pax-utils package and scans the binaries in PATH
for TEXTREL and RPATH information. For a sato image with pax-utils installed
it shows no output (which is good).

(From OE-Core rev: 629099ad66f5fa2814e5f7908b426149e8978e43)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 23:04:50 +01:00
Mihai Lindner faed110e66 oeqa/runtime/scp: replace dd call
Use a file object to generate a our test file instead of calling `dd`;
removes dd's output from testimage.log, keeps unittest output clean.
Also remove unused imports.

(From OE-Core rev: 6ac48ffbab29a37b0eada533191878aeae3c91f0)

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 23:03:23 +01:00
Mihai Lindner fbb3e5e11f oeqa/utils/sshcontrol: tweak ssh options
Add ssh_options to be used, the same, by ssh and scp:
Decrease LogLevel to ERROR, to suppress warnings (e.g. ssh host
verifications, two warnings in case of having openssh with hpn patches);
We no longer presume that the first line is a warning.

(From OE-Core rev: 1f18d04eec03e586134b6d77ca1c6151c22353dd)

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 23:03:23 +01:00
Mihai Lindner f6fed84380 oeqa/oetest: oeRuntimeTest: enable long messages
Set longMessage to True for all tests derived from oeRuntimeTest, in
order to have somewhat info on assertions with cryptic or no messages.

(From OE-Core rev: e5196ebd6c652431a3b80cdc9f60b752401314f4)

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 23:03:23 +01:00
Stefan Stanacar e3bc93c2eb lib/oeqa/runtime: smart: serve repo on host ip only and increase timeout
Don't start the http server on 0.0.0.0, listen on host ip (end of tap interface) only.
Also use the timeout option (default is 300s for ssh commands) for all the commands
run in this module (mostly because smart update timeouts on mips).

(From OE-Core rev: 8c272641ef3e8410f331ca4133d28dea8f36e4f4)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-03 19:57:38 +01:00