Commit Graph

1714 Commits

Author SHA1 Message Date
Ed Bartosh d2e0209866 oe-selftest: test wic rawcopy plugin
Added test_rawcopy_plugin_qemu test case and wks template.

This test builds ext4 rootfs image, copies it to the root
partition of the wic image using rawcopy plugin and
boots wic image in qemu.

[YOCTO #10618]

(From OE-Core rev: db1f511228e26aaeeff452427637942747bbf42b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Richard Purdie 52d7d2c06b oeqa/selftest/devtool: Enable missing cleanup
Not sure why this cleanup is disabled but it clearly should be running
so enable it.

(From OE-Core rev: 83867079182d8b9e981935da2b254947a89097bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 19090446da wic: selftest: add tests for --fixed-size partition flags
wic has a new flag for setting a fixed parition size --fixed-size. Add
tests that verify if partition is indeed sized properly and that errors
are signaled when there is not enough space to fit partition data.

(From OE-Core rev: 84c2184546779ece3eb23c5628e4c9d177568043)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 17fe3eb453 wic: selftest: do not assume bzImage kernel image
Instead of assuming that bzImage is available, query bitbake enviroment
for KERNEL_IMAGETYPE.

(From OE-Core rev: d3e1d25a06dd4cb3ec80ea63352de24e50552481)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 00ed0d4aec wic: selftest: avoid COMPATIBLE_HOST issues
Wic tests will unconditionally attempt to build images that may require
dependencies that are incompatible with current target.

Resolve this by consulting HOST_ARCH first (which defaults to TARGET_ARCH)
before proceeding to build images that may be incompatible.

A convenience decorator only_for_arch() can be used to skip test cases for
specific architectures.

(From OE-Core rev: ff46125082f08eb93cc549bbe1d79c3b8f9cba64)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 4453c21d68 selftest: wic: replace directdisk with wictestdisk where possible
Use wictestdisk instead of directdisk thus allowing more tests to be run on
non-x86 compatible machines.

(From OE-Core rev: 071785b01cdaa0d35808fa0b7308162cfebf54f1)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Ross Burton b799e4a033 oeqa/selftest: remove test_sanity_unsafe_binary_references
This test was attempting to exercise a broken test, for some reason this broke
with patches under review but investigation revealed that the test itself is
broken.  The test has been removed, so there's no need to test it.

(From OE-Core rev: 4f5f552cd6601ba244ef4efc782616bc477e1340)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Paul Eggleton 258f98a27c oe-selftest: tinfoil: add tests for recently enabled datastore operations
A recent patch to bitbake fixes these datastore operations so that they
actually affect the server end, so we should test that they work.

(For full disclosure, some of these tests would probably pass without
those fixes, since the operation would be done on the client side
instead - but we are at least exercising the code paths.)

(From OE-Core rev: 4eb3c705b9cadccacdb191ae89f5242a00f397f3)

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>
2017-03-22 11:35:21 +00:00
brian avery c0970e0af9 meta/lib/oeqa: change sdk test from cvs to cpio
We currently fetch,configure,build, and install cvs as our test for the
sdk.  cvs unfortunately, requires a default editor in order to run.  The
change in 94790a8254 that checks to see if you have something like vi
installed is fragile since you may have a different default editor. This
patch switches from using cvs as a test to using cpio. cpio also uses
autotools so the functionality tested is equivalent.

(From OE-Core rev: 233d36b0382a8b2e430c3377e50885d1a0c3ba21)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Jose Perez Carranza b641052961 selftest/devtool: Add test to verify "modify virtual/kernel"
The purpose of this test case is to verify that
devtool modify works correctly when building
the kernel.

[YOCTO #10817]

(From OE-Core rev: 0fa3d331df7d5a5fbd8431febc75efe6bcc6f96b)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:19 +00:00
Joshua Lock cc2744267f meta: replace uses of bb.data.expand(VARNAME, d) with d.expand(VARNAME)
bb.data.expand(x, d) is deprecated API.

[YOCTO #10678]

(From OE-Core rev: a361babe443da635aed83be46679067457fd6a58)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:19 +00:00
Ed Bartosh 0e4ccf1734 qemurunner: configure guest networking
Configured guest network interface through serial connection
when kernel is not run by qemu.

This should make it possible to test wic images with testimage.

[YOCTO #10833]

(From OE-Core rev: 2032d9be26b539bf867622c0090fb4696209eba9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:19 +00:00
Ed Bartosh 62dc9d964f qemurunner: get network params from runqemu output
Parsed runqemu output to get guest network configuration
if it's not present in runqemu command line.

[YOCTO #10833]

(From OE-Core rev: d4d7ed48c1cff1351ddc2f60bcfa153c373a8ab8)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:19 +00:00
Robert Yang 08dfb89301 oe/path.py: fix for "Argument list too long"
Issue: LIN9-1648

Fixed when len(TMPDIR) = 410:
$ bitbake core-image-sato-sdk
[snip]
Subprocess output:
/bin/sh: /bin/cp: Argument list too long

ERROR: core-image-sato-sdk-1.0-r0 do_rootfs: Function failed: do_rootfs
[snip]

This is because "copyhardlinktree(src, dst)" does "cp -afl src/* dst",
while src/* is expanded to "src/file1 src/file2, src/file3..." which
causes the "Argument list too long", use ./* as src and change cwd in
subprocess.check_output() to fix the problem.

(From OE-Core rev: a3dc93eb25fba32109edd1db6e8766074fb52e4b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:05 +00:00
Paul Gortmaker 52d2faad9f package_manager: fix "exlcude" vs. "exclude" typo
Which results in:

 --------------------------------
      0557:        package_exclude = self.d.getVar('PACKAGE_EXCLUDE')
  *** 0558:        exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exlcude.split() if package_exclude else [])
      0559:
      0560:        output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) +
      0561:                         (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) +
      0562:                         (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == 1 else []) +
 Exception: NameError: name 'package_exlcude' is not defined
 ERROR: cube-builder-initramfs-1.0-r0 do_rootfs: Function failed: do_rootfs
 ---------------------------------

Cc: Alexander Kanavin <alexander.kanavin@linux.intel.com>
(From OE-Core rev: cee1bdc09f4bbfedcd7cac06b48ba9d195c29e62)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:04 +00:00
Alexander Kanavin aa66e8782e dnf: add /usr/bin/dnf symlink that points to /usr/bin/dnf-2
All documentation refers to dnf binary as 'dnf' yet make install
does not create one - it's done by Fedora's spec file when building
the rpm. Let's replicate this behavior.

(From OE-Core rev: 456c4a8ffc9a292d7a3e036d92baf4a8f14d1f45)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:04 +00:00
Alexander Kanavin fd04d16568 selftest/signing.py: verify that images can be created from signed packages
(From OE-Core rev: e53b93181ea1723ddeeb75c4195e9412e64721c0)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:04 +00:00
Markus Lehtonen 9a548edb0f lib/oe/package_manager: import rpm signing key to rpmdb
Import the gpg key used in rpm signing into rpmdb. This makes it
possible again to create images when rpm signing is enabled.

Also, instruct dnf to enforce signature check if rpm signing is enabled.

(From OE-Core rev: f30c1653cc5ef9daf594cbd3faad329b9fa08ab7)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:04 +00:00
Alexander Kanavin 2b77735c72 rpm: add support for remote package feeds via PACKAGE_FEED_URIS variable
I've used a previous patch (which was never merged) by
Humberto Ibarra <humberto.ibarra.lopez@intel.com> as a model
for how to do runtime testing of this feature (e.g. we need to boot
an image, run dnf on it, and check that it is indeed able to
access the remote repo over http). Here's his original commit message:

=====
Testing that feeds specified with PACKAGE_FEED_URIS var are set
correctly has two parts. First a build with this var set is required,
and then smart update needs to be issued in the running taget.

The previous is not a common selftest practice because this is a
simple test, but requires building and running a specific image,
which takes a lot of time. testimage is not a good fit either,
since the images tested there do not have the PACKAGE_FEED_URIS
var set.

For this test, the runtime-test module is being used, which is a
selftest module but runs a testimage command. The var and test
environment were set in runtime-perf.py and the actual test is
done in a new testcase added to meta-selftest layer.
=====

[YOCTO #10872]

(From OE-Core rev: 3a9e2fdef9316e24b52ce99ac355fc2b09786c72)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:04 +00:00
Richard Purdie 3fa7239679 selftest: Disable SSTATE_MIRRORS for sstate signing test
Building ed into an sstate mirror, then leaving it enabled for
oe-selftest -r signing.Signing.test_signing_sstate_archive results in:

NOTE: recipe ed-1.14.1-r0: task do_populate_lic_setscene: Started
WARNING: ed-1.14.1-r0 do_populate_lic_setscene: Failed to fetch URL file://29/sstate:ed::1.14.1:r0::3:290bbc39f3b25cc27028dafce4b5aa48_populate_lic.tgz.sig;downloadfilename=29/sstate:ed::1.14.1:r0::3:290bbc39f3b25cc27028dafce4b5aa48_populate_lic.tgz.sig, attempting MIRRORS if available
ERROR: ed-1.14.1-r0 do_populate_lic_setscene: Fetcher failure: Unable to find file file://29/sstate:ed::1.14.1:r0::3:290bbc39f3b25cc27028dafce4b5aa48_populate_lic.tgz.sig;downloadfilename=29/sstate:ed::1.14.1:r0::3:290bbc39f3b25cc27028dafce4b5aa48_populate_lic.tgz.sig anywhere. The paths that were searched were:
    /media/build1/poky/build/test-sstate
    /media/build1/poky/build/test-sstate
WARNING: ed-1.14.1-r0 do_populate_lic_setscene: Cannot verify signature on sstate package /media/build1/poky/build/test-sstate/29/sstate:ed::1.14.1:r0::3:290bbc39f3b25cc27028dafce4b5aa48_populate_lic.tgz
NOTE: recipe ed-1.14.1-r0: task do_populate_lic_setscene: Succeeded

so we need to disable SSTATE_MIRRORS for this test.

(From OE-Core rev: 2ce9962851fe58c099599679340fd87e90f426ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:31 +00:00
Maciej Borzecki 6e20b31d5d wic: selftest: account for occasional newline in debugfs file names
Debugfs output may contain a newline in file names in 'ls -p' output. Make sure
that output is correctly split into lines by matching '/\n' and newlines are
removed from file names.

Fixes the following error appearing in AB tests:

   Traceback (most recent call last):
     File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 388, in test_exclude_path
       files = [line.split('/')[5] for line in res.output.split('\n')]
     File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 388, in <listcomp>
       files = [line.split('/')[5] for line in res.output.split('\n')]
   IndexError: list index out of range

(From OE-Core rev: 477805b913a6c4b4b630e42f08cd9e59f1e4e254)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:18 +00:00
Richard Purdie c90246caeb package: Fix various rpmdeps relocation issues
There are several issues with rpmdeps after the rpm v5 -> v4 transition:
 * _rpmfc_magic_path  is an invalid option for rpm4
 * --rpmpopt is an invalid option for rpm4
 * we need to use the path to rpmrc since otherwise it poitns at the
   original build path
 * we need to set MAGIC in the environment so libmagic can find its
   files.

This patch addresses those and ensures rpmdeps works in relocated builds
from sstate (or with rm_work).

(From OE-Core rev: 806e37264d7102ae982867350ad8363ed3e5f475)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:18 +00:00
Alexander Kanavin 529244ee21 run-postinsts: simplify the logic of whether to install it to images
The logic is scattered all over the place, but amounts to
"install, unless the rootfs is read only". Let's express that directly.

(From OE-Core rev: 697804229a172125ce7d3bfc9b343812d6fe3240)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 55928d1237 oe-selftest: no need to parse gpg output to determine the name of the signing key
The parsing fails on my machine, and we use a key with a hardcoded name,
and so can provide it directly.

(From OE-Core rev: b69bad2c4e51a24868422f39619a0598fd2a0533)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 5a3e1290cb gpg_sign.py: fix signing of rpm files using gpg
This means
a) calling rpmkeys and rpmsign instead of rpm
b) instructing gpg to run non-interactively; otherwise on my machine
it pops up windows requesting a key passphrase

(From OE-Core rev: f82f270df2da59702026721612563aea57cd77eb)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin f72bc777fa selftest: update output checks in incremental image test to match what dnf prints
(From OE-Core rev: 6c434a711c0d281ecc9aeff488b63b80a338b229)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 648a5d6c49 selftest: do not perform a full build in test_continue
This was fetching and building the toolchain and everything else
against empty download dir and sstate cache, and so was enormously slow.
The test does not need that, it only checks that one fetch task fails and
another succeeds when using bitbake's -k option.

(From OE-Core rev: 19cdac1a625189eb4a41ce5a7a204b08729c1b92)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin ea4bac7e45 testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
(From OE-Core rev: 749a496d273f9fd378588e309cf976294584ca5f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 67615e0175 rootfs_rpm.bbclass: migrate image creation to dnf
To properly look at this patch, you probably need a side-by-side diff viewing tool.

(From OE-Core rev: 65581c68d130fa74d703f6c3c92560e053857ac7)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin b9c550dd6e package_manager.py: improve the API for insert_feed_uris()
No need to store the configuration as class members,
just pass it directly into the method.

(From OE-Core rev: a5cc38481be3c5e6ccbecf951f9fdc049e5101d5)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Joshua Lock e0a94a9ade lib/oeqa/selftest/bbtests: update test_non_gplv3 to use selftest-ed
GPLv2 recipes have been moved to a new layer (meta-gplv2), instead of
readline perform this test on the selftest-ed recipe in meta-selftest
which has gplv2 and gplv3 variants.

Tested with oe-selftest -r bbtests.BitbakeTests.test_non_gplv3

(From OE-Core rev: 35b244b292cddb3ded31c2766fb1313511343f06)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:10 +00:00
Joshua Lock e663c6145a lib/oeqa/selftest/oescripts: make test_cleanup_workdir use selftest-ed
Use a recipe which is bundled in the meta-selftest layer for this test,
rather than relying on OE-Core remaining static (or updating the tests
when OE-Core changes recipes).

Tested with oe-selftest -r oescripts.TestScripts.test_cleanup_workdir

(From OE-Core rev: f8aabeb1a755f3312782a7b64fe863c155510b33)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:10 +00:00
Ed Bartosh 5738f86f99 selftest: remove extra backslashes from debug output
Remove unneeded backslashes from the format strings that
caused debug output to look confusing:

2017-03-06 16:52:42,428 - selftest.base - DEBUG - Removing from: ...
\IMAGE_FSTYPES = "wic"
WKS_FILE = "mkefidisk.wks"

(From OE-Core rev: 6b7f8f81307720b0a6c1ef4af5200dec9b8ef789)

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>
2017-03-08 11:52:56 +00:00
Ed Bartosh ac462e464f qemurunner.py: ignore decode errors
qemu output can contain control characters. This cause qemurunner
API to crash when decoding the output to utf-8:

Traceback (most recent call last):
  File "/usr/lib64/python3.4/threading.py", line 911, in _bootstrap_inner
    self.run()
  File "meta/lib/oeqa/utils/qemurunner.py", line 472, in run
    threading.Thread.run(self)
  File "/usr/lib64/python3.4/threading.py", line 859, in run
    self._target(*self._args, **self._kwargs)
  File "meta/lib/oeqa/utils/qemurunner.py", line 465, in threadtarget
    self.eventloop()
  File "meta/lib/oeqa/utils/qemurunner.py", line 526, in eventloop
    self.logfunc(data)
  File "meta/lib/oeqa/utils/qemurunner.py", line 77, in log
    msg = msg.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 0:
unexpected end of data

Added errors='ignore' to decode call to fix this.

(From OE-Core rev: 4a46dd5190d97fdcb6297a0c1d8c824d425c4c51)

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>
2017-03-08 11:52:56 +00:00
Ed Bartosh 55fc115d93 selftest: test wic efi image in qemu
Added test_qemu_efi test case to wic test suite.

It uses ovmf qemu extention to test mkefidisk image.

(From OE-Core rev: 770b87d903644641da41594193ee61b564dd99e9)

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>
2017-03-08 11:52:56 +00:00
Ed Bartosh 27badf83ec targetcontrol: add image_fstype argument to commands.runqemu
qemu runner picks up first fsimage type from the hard-coded
list of supported types. This makes it impossible to test
particular image type unless it's not ext4(first type in
the hardcoded list of types).

Added image_fstypes argument to commands.runqemu and QemuTarget
__init__ to specify type of the image to run qemu with.

This will be used to pass wic image type to test efi wic images.

(From OE-Core rev: f1f224a2d4d3f2a760632c2254e91a8f94c8814f)

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>
2017-03-08 11:52:56 +00:00
Ed Bartosh 383cd20828 qemurunner: add runqemuparams argument to commands.runqemu
Added possibility to pass additional runqemu parameters
down the stack of APIs:
 commands.runqemu -> QemuTarget.start -> QemuRunner.start

This will be used to pass ovmf parameter in testing of
efi wic images under qemu.

(From OE-Core rev: 5aa4b5a10fb8191cd3453d09701c8beeff9a952f)

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>
2017-03-08 11:52:56 +00:00
Anders Darander 2db1227fa2 lib/oe/package.py: remove @ from package name
@ isn't allowed in package names. Angular2 packages often have
@ in their names.

(From OE-Core rev: 3c4291bc58bcc5c66ef539eed29b7c37ac968a06)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Richard Purdie d3cdea0cc9 oeqa/sdkext/devtool: Ensure dependencies for test_extend_autotools_recipe_creation are present
test_extend_autotools_recipe_creation needs libxml2 so ensure this is
installed/present as it may not be in the minimal eSDK case.

(From OE-Core rev: fb274c7fe588c556936a0df1ae583907875c2a76)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03 11:16:12 +00:00
Ross Burton fffb6086db oeqa/sdkext: don't skip tests if there isn't a toolchain
Skipping the tests if a toolchain wasn't installed out of the box (for example,
a minimal eSDK) doesn't make sense as the first thing the tests should do is
install a toolchain.

(From OE-Core rev: 1e776c1a7f4827f5a14c00dbffae0bdfb027e21e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Ross Burton 88c1fb2f0c oeqa/sdkext/devtool: use finally instead of repeating cleanup
Use the finally: block to always to cleanup.

Now that the test harness in testsdk.bbclass has monkey-patched
CalledProcessException to display the output we don't need to do that in the
test case.

(From OE-Core rev: 9f0f6326083ee76b72b431fbfcbe12c1ab2793b2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Ross Burton 726832895d oeqa: add output to subprocess exceptions
Out of the box subprocess.CalledProcessError.__str__() just displays the command
and exit code, which isn't very useful for debugging.

Add a function to oeqa.utils.subprocesstweak to monkey-patch __str__() so that
it can also display the value of stdout and stderr.

(From OE-Core rev: c55401ba1646202fa36e4973b05dbacaa146cb16)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Ross Burton 30ad362417 oeqa/esdk/devtool: clean setUpClass/tearDownClass
These methods are class not instance methods, so the argument should be cls not
self.

Also don't put variables into cls that we don't need there.

(From OE-Core rev: 6ecd671fb09486b5852c47f06b5db372a2eb082b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Richard Purdie 842bc0ff5a oeqa/selftest: Drop http sstate sharing
Using httpServer from python for sharing sstate is known to be buggy, it can't
cope with the number/type of requests coming from bitbake and quietly fails
to share files.

This causes intermittent build failures which are hard to debug. We can
use a file:// url for the sstate mirror instead, removing the need for
the http server.

The sdk-update test is simply dropped since the SDK is never published
to this location and hence it would never have any update. Its equiavalent
to pointing at an empty web server. There is a better eSDK update test in
testsdk so rather than improve this one, lets drop it and concentrate on
the one there.

(From OE-Core rev: 7606f05e48ad2e31650e3a56bfcd04b4fbfad1e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Richard Purdie 6ed096e5ed oeqa/sdkext/context: Work around broken dependency checks to get sdk tests running
This is admitted a bit of a hack but it does allow a number of significant sdk
tests to run successfully and hence improves testing of eSDK which is good.

I'm therefore proposing we do this until we come up with a better solution
since the current lack of testing is worrying and would have caught other issues
had it been present.

(From OE-Core rev: 633b95ea32bbccf59b341a9d37b0b11027b48a63)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Richard Purdie 23137a9897 oeqs/sdk*/case: Use universal_newlines for subprocess calls
This removes the need for some of the ugly decode calls with hardcoded
locales.

(From OE-Core rev: a14dddc77e553d2fa90d12576503dd3fc2e52bbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Richard Purdie 78195a23b0 oeqa/sdkext: Ensure we run a deterministic set of tests
The directory list of sdk tests to run can vary so this code effectively selects
a random set of SDK tests to run in the eSDK. We want to attemp all the SDK tests
so remove the element selection.

(From OE-Core rev: 11365d869c03cb0e476ea43e75ce27090a33dfa7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Ross Burton f3b54c86b5 oeqa/sdkext/devtool: rename recipe name to match upstream
Call the generated recipe librdfa instead of bb-example to make it clearer what
is happening.

(From OE-Core rev: c59b82ec151618bb4bcb1953b8ca7d23255d3357)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Humberto Ibarra df55b06ceb oelib/buildhistory.py: Add unittest for buildhistory_analysis
The buildhistory_analysis module (in which buildhistory-diff is
based) was lacking unittest for its functions. Created selftest
module for this and a few testcases to cover basic cases.

[YOCTO #10727]

(From OE-Core rev: d868816ecb470d59216eecc97ef5d42261625cc1)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:10 +00:00
Mariano Lopez 661c73b716 oeqa/core/loader.py: Avoid importing tests with built-ins name
If importing a test with the same name as a built-in module,
it will silently import the built-in and check for tests in
built-in module. This happened with syslog module in debian
based machines, so add a raise to avoid this behavior.

[YOCTO #10978]

(From OE-Core rev: d9548f981448307b042807373e469f0d0b110bfe)

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>
2017-03-01 23:27:10 +00:00
Mariano Lopez 9f8748c59f oeqa/core/loader.py: Give meaningful error when failed to load classes
With this we get the class that is actually having the problem,
not just a TypeError with an unknown class causing the error.

(From OE-Core rev: d6ff4891376417504018af27e8e729a412feeeea)

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>
2017-03-01 23:27:10 +00:00
Mariano Lopez 19d23814e4 selftest: Optimize get_bb_var use
get_bb_var calls bitbake every time it is used and every call
would take about 7 seconds. There are tests that calls get_bb_var
several times when they can use get_bb_vars. Also there are tests
that calls it to fetch the same variable over and over again.

This will optimize the use of get_bb_var and get_bb_vars for a
little speed up in the tests.

[YOCTO #11037]

(From OE-Core rev: e53f86ba8aeb6d2e9eb259329001d27d62401072)

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>
2017-03-01 23:27:10 +00:00
Mariano Lopez 9365e5f7a9 selftest: Avoid sstate corruption by calling cleansstate
Currently selftest doesn't use sstates because some tests
clean sstate cache; using sstates would give a performance
boost instead of building everything from scratch.

With this sstates are not corrupted using different methods
depending on tests:

devtool: These tests needed to delete the cache so SSTATE_DIR
as SSTATE_MIRRORS and set a temporal SSTATE_DIR.

sstatetests: This module already used a temporal SSTATE_DIR, so
just set up the SSTATE_MIRRORS.

Rest: Removed cleansstate, some of them required to force a
certain task, others were just removed or changed for another
task.

[YOCTO #10929]

(From OE-Core rev: 62c61087a10cc3b26fbff32c9e2efd1704a39724)

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>
2017-03-01 23:27:08 +00:00
Markus Lehtonen 70b428f16a lib/oe/gpg_sign: fix rpm signing with gpg > 2.1
We need to check the gpg version and alter its command line options
accordingly.

[YOCTO #11054]

(From OE-Core rev: 44a44b7e582a5a654baf21829d168568481c13d9)

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>
2017-03-01 23:27:08 +00:00
Markus Lehtonen 7f4278d472 lib/oe/gpg_sign: make gpg version a property of the signer
(From OE-Core rev: a00a362e3dc18ba04230cbbd6f91264e5d76f40d)

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>
2017-03-01 23:27:08 +00:00
Markus Lehtonen ba5f3143a7 lib/oe/gpg_sign: sign rpm packages in chunks of 100
Split the file list into chunks in order to avoid
"OSError: [Errno 7] Argument list too long"

This would happend when a package has huge amount of subpackages, e.g.
glibc-locale.

[YOCTO #11069]

(From OE-Core rev: 874f5016fd4dc76bc867b68470297fe59e78a9e6)

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>
2017-03-01 23:27:07 +00:00
Mike Crowe 0b8d85a094 kernel, license, sstate, rootfs.py: Remove deploy directory README
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
file in the deploy directory warrants the complexity it brings elsewhere.
Let's just remove it entirely.

In particular, if two do_image_complete tasks run in parallel they risk
both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time.
Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
file. In theory this should be safe because "cp -alf" will just cause one
to overwrite the other. Unfortunately, coreutils cp also has a race[1]
which means that if one copy creates the file at just the wrong point the
other will fail with:

 cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to
+‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680

(From OE-Core rev: 71e9e88847d7000781642ea6187ebd8f40dfdcfe)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:45 +00:00
Mariano Lopez 01be63828c selftest/eSDK.py: Cleanup when there is an error in setUpClass
Lately autobuilders are experiencing hangs with selftest,
it seems it is cause if an error happens in setUpClass
method of oeSDKExtSelfTest class because HTTP server
keeps running in background.

This patch will ensure tearDownClass will be run if there
is an error in setUpClass.

(From OE-Core rev: eb1383949f76c6eb36f86c051057f761a71016a3)

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>
2017-02-23 12:49:52 -08:00
Dominic Sacré 73e811190b lib/oe/patch: Support xz-compressed patches
Add .xz to the list of extensions recognized by patch_path(), so that
compressed patches ending in .patch.xz or .diff.xz are automatically
applied.

(From OE-Core rev: f1a2c45765d14d3ca09657ad1f6b526554af2bb6)

(From OE-Core rev: f50fd7f247d5bb05bc7d1109c574a682067688da)

Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:48 -08:00
Mariano Lopez cf0b92f893 oeqa/runtime/context.py: Fix use of getTarget() with testexport
The idea on getTarget is to use kwargs to send custom variables
to different targets, instead of this, a new variable was added
(just used for custom targets) and this broke testexport. So
in order to fix it, just add the custom variable to kwargs.

This fixes the use of getTarget() in testexport class that was
introduced in 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf.

(From OE-Core rev: cf138029a1f18f991fc7a28c81d85884942e9d56)

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>
2017-02-23 12:49:48 -08:00
Humberto Ibarra 5ff7db946c oeqa: fix typo
The word 'uninstall' was spelled incorrectly in various parts of
oeqa files.

(From OE-Core rev: af365e025030436f83b233fa51ecc9c58c58ce3c)

(From OE-Core rev: 9d25188e873645b849584b51a77b86588a51d4ba)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:48 -08:00
Randy Witt 23bd7e100a selftest/containerimage.py: Add container IMAGE_FSTYPES test
This test checks to make sure only the files expected exist in a
container image. Currently only ROOTFS_BOOTSTRAP_INSTALL, gets added to
all images without the user specifying it.

But this test should help if a developer in the future ever silently
adds more than just ROOTFS_BOOTSTRAP_INSTALL, and that the developer can
make sure it also gets removed from a container image.

[YOCTO #9502]

(From OE-Core rev: 4f5e5321fafe491f91d78a35d11afc0dc0527d4b)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-19 06:49:00 -08:00
Richard Purdie b57e93c5c8 oeqa/selftest/bbtests: Update after changes to dependency graph file generation
(From OE-Core rev: 36a7470cacfe56931948ee865bd9ef46a7303ced)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-19 06:47:06 -08:00
Patrick Ohly bcb24c013d rootfspostcommands: remove shadow backup files instead of trying to sort
Backup are files sometimes are inconsistent and then cannot be
sorted (YOCTO #11043), and more importantly, are not needed in
the initial rootfs, so they get deleted.

Fixes: [YOCTO #11007]

(From OE-Core rev: e5628c80a52f3caeea9d9dc7f67d1b8a61222aef)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-19 06:16:58 -08:00
Kristian Amlie 47ee6c2153 selftest/wic: Add tests for --exclude-dir option.
Based partially on an earlier patch by Maciej Borzecki.

Note that because tools now reside in recipe specific sysroots, we
need to import the path from bitbake and apply it during the test.

(From OE-Core rev: c826233ad08ee5a4b9943a05d4e73f3fb3281588)

Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:44 -08:00
Benjamin Esquivel 4766960304 selftest: remove result file log awkward checking
because of the way that the test cases are looked in the results,
the file logger is incompatible with extended implementations of the
unittest runner.

as the xml runner extends the unittest runner, it shares the id()
method which returns the full name of the test, not only the test
function name. With that, a single check of the full name reviews at
the same time the class name as well as the function name.

[YOCTO#11012]

(From OE-Core rev: 19b025333846018fd3e4ee4ca5cc18d375fa6213)

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:41 -08:00
Markus Lehtonen e3f06659c2 oeqa.utils.git: support bare repos
[YOCTO #10582]

(From OE-Core rev: a223b4d26c8834485cbec1f10defca42301550f7)

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>
2017-02-15 20:06:41 -08:00
Markus Lehtonen 5c907bde11 oeqa.utils.git: add git_dir property
[YOCTO #10582]

(From OE-Core rev: 5fce33644a58b55d0af6c1775e8f65b426eb4dcb)

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>
2017-02-15 20:06:41 -08:00
Markus Lehtonen fcd28fd50f oeqa/buildperf: don't archive stdout/stderr of commands
Stop capturing output of the shell commands into <test>/commands.log.
Redirecting output into a file prevented the unittest framework from
capturing it, causing useless errors (with empty output) like:
oeqa.utils.CommandError: Command '['bitbake', 'core-image-sato']'
returned non-zero exit status 1 with output:

In general, the console output of commands is only interesting when
something fails. Also, dropping the commands.log file is a huge saving
in disk space, and thus, repository size when results are archived in
Git.

(From OE-Core rev: e004664287ec03e7367a7bf553d9a3038444e82e)

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>
2017-02-15 20:06:41 -08:00
Juro Bystricky b1f99066bd testimage: Implement custom target loading
This patch implements custom target loading for testimage, currently
missing due to major changes to the test framework.
Custom targets can be defined in various meta-layers, so we
need an extra path information in order to find them.
Any other additional info is retrieved as usual via the variables
TEST_TARGET and TEST_SUITES

(From OE-Core rev: 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Juro Bystricky 124f689569 oeqa/loader.py: Avoid error in TypeError exception
Without this an exception would occur

(From OE-Core rev: d1bda068d4bc0ad3ff81ab1f104dc12cedd20b3f)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Juro Bystricky ae98051014 qemu.py: add 'elf' as supported fstype
Add 'elf' as also supported by OEQemuTarget.

(From OE-Core rev: c1ec42ee9beb1603012db5cf990cdbf1596b2a3d)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Aníbal Limón 430eb6fec3 oeqa/core/runner.py: OEStreamLogger fix logging
Change conditional to avoid losing stack traces when log
into the logger. The logic only needs to don't log empty lines.

(From OE-Core rev: 545dd180cc27a69732f2332565038bd06d01c014)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Richard Purdie bfd0a39bdf classes: Drop now unneeded update_data calls
Now that the datastore works dynamically we don't need the update_data calls
so we can just remove them. They're not actually done anything at all for
a while.

(From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Richard Purdie eac8f9b986 lib/oe/path: Add replace_absolute_symlinks function
We need a function to walk a directory and replace absolute symlinks with
relative ones. Add such a function to the path module of lib/oe.

It does this relative to the directory being walked for files.

(From OE-Core rev: 15376e5ff35367c1b40941d10e7b19302058a53e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-09 10:52:03 +00:00
Ross Burton a624cf7f95 oeqa/selftest/pkgdata: use m4 instead of bash
The pkgdata test broke due to oe-core cf0fd8b which added alternatives support
to bash, so the binary is now /bin/bash.bash.

Instead of fixing the test case for this new name, use the m4 recipe instead as
it has less build dependencies.

(From OE-Core rev: 68da6c98841f4450736ae170e443aa744c8b77eb)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07 14:50:10 +00:00
Markus Lehtonen 297c168660 oeqa.buildperf: reword test descriptions
In an attempt to make them more compact and coherent.

(From OE-Core rev: 7e7252108d5e3503888efe0e603b3883fdc793e8)

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>
2017-02-05 09:22:18 +00:00
Francisco Pedraza 45cbf0f4f8 sdkext/cases oeqa/selftest: Updates decorators
Updates decorators for eSDK in test cases at:
sdkext/cases/devtool.py and oeqa/selftest/eSDK.py

(From OE-Core rev: 36783b17085e73bbf47242e87bbf054352ae0a9d)

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:18 +00:00
Ed Bartosh 675bb9ddb8 selftest: wic: stop using iso image type
Removed 'IMAGE_FSTYPES = "iso" as this functionality depends on
do_bootimg, which is going to be obsoleted soon.

As wic doesn't depend on bootimg it's safe to remove this.

(From OE-Core rev: a08e2019223d7c04916967d8fd42279e8e1e186f)

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>
2017-02-05 09:22:18 +00:00
Ed Bartosh 23237b46dc selftest: wic: use wic-tools recipe to get STAGING_DIR
STAGING_DIR variable is used to get path to a boot dir.
It's better to use wic-tools recipe to it as it contains
all bootloader artifacts.

Modified test_build_artifacts and test_rootfs_artifacts to
use wic-tools target to get STAGING_DIR.

(From OE-Core rev: eb648ac5566fbcc679e8544fd8403a730ce71058)

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>
2017-02-05 09:22:18 +00:00
Richard Purdie 08858ff213 oeqa/buildproject: Run gnu-configize by default
The runtime oeqa tests were failing in the on-target case, only for
aarch64. This was because an old config.sub was being used.

Similar to the SDK testing, call gnu-configize in the on-target
case too to resolve the failing tests.

(From OE-Core rev: 7918fe08d8e48f46cf2402afa66d35063eb72545)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:17 +00:00
Richard Purdie 6840618f1a oeqa/runtime: Improve failure log output
Printing a message which says "configure failed" without the log output
is effectively useless. If a command fails, print the output by default
and simplify the calling code which makes debugging any of these failures
much easier.

(From OE-Core rev: b6352ff001c29f0bff10c18879b92c5618ec645c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:17 +00:00
Jose Perez Carranza 383fc7df31 selftest/runtime-tests: Modify positins test to reduce execution time
Currently test_postinst_roofs_and_boot is building a full-cmdline image
this is taking a lot of time to execute the test, so a minimal image
will be build instead.

(From OE-Core rev: 3a6b0b9f94b7097a825edf3fe258a2f86b73edd6)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:45 +00:00
Leonardo Sandoval d3c6c10de4 selftest/bbtests: use write_config instead of local.conf file
Extra configuration data should be write using the write_config
method instead of manually appending to the local.conf file

(From OE-Core rev: 65c26d51eedc687c92e8ade262d24dc53ca71cec)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:43 +00:00
Ed Bartosh 3bc5724ec7 selftest: wic: stop using hddimg in FSTYPES
Removed hddimg from FSTYPES in wic test suite as
wic doesn't depend on hddimg anymore.

[YOCTO #10835]

(From OE-Core rev: a332d9618c2d0f46b6c0c8fdeee8bec4cc73f2cf)

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>
2017-02-02 17:37:43 +00:00
Aníbal Limón bfead495de oeqa/core/context.py: Add validation for run-tests option
The run-tests option is optional so if isn't specified set
to None instead of crash on split().

(From OE-Core rev: 877732406cad2ee4bf11293dc8ccddc2998ffbaf)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 23:27:47 +00:00
Aníbal Limón 90b4e075f4 oeqa/runtime/cases: Rename syslog module to oe_syslog
Debian based distros has a builtin syslog module so when
try to load tests using unittest it references the builtin
module instead of runtime/cases.

[YOCTO #10964]

(From OE-Core rev: 9923e3cdb58c2b3c54ec5fe99b2cec4cdc9fff92)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 23:27:47 +00:00
Mariano Lopez 5582b67f6d runtime/cases: Fix case numbers, missing cases and unused classes
gcc: Removed unneded lines.

multilib: fixed case number.

syslog: added a missing test.

[YOCTO #10964]

(From OE-Core rev: 3f1c57191802309e58a7b3b42e8ec812e83bd8ed)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 23:27:47 +00:00
Ming Liu 3c89b61533 meta: remove remaining True option to getVarFlag calls
This is a complementary fix to commit 2dea9e49:
[ meta: remove True option to getVarFlag calls ]

it intended to remove all True option to getVarFlag calls, but there are
still some remaining.

Search made with the following regex: getVarFlag ?\((.*), True\)

(From OE-Core rev: 5b53b34dcb64dc65ee651cbf78cbbd9105dc4f4c)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:02 +00:00
Ming Liu e2280b9e12 meta: remove remaining True option to getVar calls
This is a complementary fix to commit 7c552996:
[ meta: remove True option to getVar calls ]

it intended to remove all True option to getVar calls, but there are
still some remaining.

Search made with the following regex: getVar ?\((.*), True\)

(From OE-Core rev: 87d03ffe03d6f01e360bfd51714be96e62506e0a)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:02 +00:00
Mariano Lopez 1e88c8fce4 testimage.bbclass: Allow to run tests on autobuilder's images
With the change to the new framework data store dependecy was
removed, instead a new file is generated and used in testimage.
When testing builds from the autobuilders the test data values
are from the autobuilder, including the paths.

Some tests require paths to current environment in order to run,
this commit will update such paths and fix the error of running
images donwloaded from autobuilders.

[YOCTO #10964]

(From OE-Core rev: 26ad5105fc2ce03b7ee8ecc6911fd40a52bd573a)

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>
2017-01-31 14:43:01 +00:00
Mariano Lopez e8935e20d6 runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of PACKAGE_CLASSES
smart test requires to build the image using rpm packages, this check was
included, but it checked for PACKAGE_CLASSES=='package_rpm', and this is
not true when building packages for rpm and deb/ipk. So this would check
IMAGE_PKGTYPE instead.

[YOCTO #10964]

(From OE-Core rev: 570f50b30072a10c5eadfbbfea2647339ee85176)

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>
2017-01-31 14:43:01 +00:00
Mariano Lopez 45ef4ef2c4 runtime/cases/connman.py: Stop using oeRuntimeTest
oeRuntimeTest class is not used anymore as part of runtime
migration, this particular case was missed, so fix it.

[YOCTO #10964]

(From OE-Core rev: d928e5166d8812e7e20bc95c0a8b5cb5439ec497)

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>
2017-01-31 14:43:01 +00:00
Francisco Pedraza aca3afcb59 oeqa/sdk: Updates sanity tests for minimal eSDK
Updates sanity tests to cope with minimal eSDK installer
1. Skips the validation of sanity if packagegroup-cross-canadian is in
host package.
2. Skips if SDK does not include toolchain at cases/devtool.py

This should fix [YOCTO #10794]

(From OE-Core rev: 59a99cd8661af594ee0c33e086578d29d50a6268)

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:01 +00:00
Ed Bartosh 3e833c681a selftest: wic: fix test_iso_image test case
Added "iso" to IMAGE_FSTYPES to build iso artifacts required
to fix test of isoimage-isohybrid wic plugin.

(From OE-Core rev: 055d6814f6de2e54ae27c5fa2e0c40e3e531590e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh 18c0af5214 selftest: stop using hddimg in the wic test suite
Removed hddimg from IMAGE_FEATURES as wic code doesn't
use hddimg anymore.

[YOCTO #10835]

(From OE-Core rev: 885a5beae86a55cc228fb2aa998a8b1135371eb4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Tom Zanussi 66d08e0fda wic: Look for image artifacts in a common location
Rather than have each image type look for artifacts in image-specific
locations, move towards having them look for artifacts in a common
location, in this case DEPLOY_DIR_IMAGE

Use the existing deploy.bbclass to have the bootloaders put their binaries
in DEPLOY_DIR_IMAGE and then wic will find them and place them in the image

(From OE-Core rev: 1c8acea91e775b1b6f8b25e774aaba3e790fc59b)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh 62310b3726 image-wic: remove HDDDIR from WICVARS
Removed HDDDIR as it's not used by wic anymore.
Stopped usage of HDDDIR in wic test suite.

(From OE-Core rev: b3ed3a79852f85651c8fa192a8118f9904e88ef8)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh a508cb384c wic: use INITRD_LIVE in isoimage-isohybrid
INITRD variable is not set if hddimg is disabled.
isoimage-isohybrid can't get correct name for initrd if INITRD
variable is not set.

Added INITRD_LIVE to WICVARS and used it in isoimage-isohybrid
code to get initrd artifact name. Used INITRD if INITRD_LIVE is not set.

(From OE-Core rev: c672753be60550b15d5d593c251b61776d5b104d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh de23b7bb2f selftest: check results in test_image_vars_dir*
Tested that result images are produced in test_image_vars_dir_long
and test_image_vars_dir_short test cases.

(From OE-Core rev: 9ed399b99e40ec9ec76df1fbdedfb8104a463acc)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh 8c51ca5cd6 selftest: split wic tests cases
Split tests to run wic only once per test case.
This should fix failures caused by result images left
from the previous wic run.

(From OE-Core rev: 71e3c631bac859d00cef05bbf7bd901a96bac520)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh c01cc6ff24 wic: change location of .env files
Current location of .env files $STAGING_DIR/imagedata. It doesn't
depend on machine and be rewritten by the builds for different
machines.

Changed location to $STAGING_DIR/$MACHINE/imagedata to avoid .env
files to be rewritten.

(From OE-Core rev: 94245144f5cef344d90bc2a7b3267cdae9d192e4)

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>
2017-01-31 14:38:32 +00:00
Ed Bartosh 3d585a518c selftest: wic: test default output directory
As tests now explicitly specify output directory we don't
need test_alternate_output_dir test case. However, we need
to test wic output to default output location.

Removed test_alternate_output_dir test case.
Added test_default_output_dir test case.

(From OE-Core rev: c1be1161cf555727aa56ee2109ee77f420f67c9f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh 3f21101e72 selftest: wic: explicitly specify output directory
wic started to use current directory as a default output dir.
Specified output directory in wic command line to make tests
more predictable and easier to maintain.

(From OE-Core rev: 0f205aed90edd90fcba0a565a6cadfe96339b410)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh e330cf4a38 selftest: wic: split test_debug test case
Splitted to test_debug_short and test_debug_long to make each
of the test cases to run wic once. This is consistent with the
rest of the test cases and ensures that test cases are set up
properly.

This also fixes the following test failure caused by the image
left from the first wic run:

FAIL: test_debug (oeqa.selftest.wic.Wic)
Test debug
----------------------------------------------------------------------
Traceback (most recent call last):
  File "meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
    return func(*args, **kwargs)
  File "meta/lib/oeqa/selftest/wic.py", line 270, in test_debug
    self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
AssertionError: 1 != 2

(From OE-Core rev: a453009821d7d7cb1dd8a7ae05c0d32227b4753b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-28 23:32:16 +00:00
Leonardo Sandoval 70a30d9770 selftest: sstatetests: skip glibc-initial tests in case of non-glibc distro
Some distros uses non-glibc so skip those tests requiring glibc-initial as target

(From OE-Core rev: 41f02cb7307faec32b13733e41f78a0ebdc1b52b)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26 10:44:27 +00:00
Leonardo Sandoval 6702c7b089 selftest/imagefeatures: skip weston test if required features are not present
Also, remove hard-coded features because the image already contains them.

(From OE-Core rev: 899680840d497343095d0e7d7264e3e278ba4602)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26 10:44:27 +00:00
Richard Purdie 6ab4c5033a classes/oeqa: Replace subprocess.check_call() with check_output()
If you use subprocess.check_output() the traceback will contain the output
when the command fails which is very useful for debugging. There is no
good reason not to use this everywhere.

(From OE-Core rev: ad750dd1cc9d789abe723daddd098ce41d8547f5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 23:30:57 +00:00
Francisco Pedraza 51b6df76f2 oeqa/selftest: Adds test case for sdk-update eSDK
1. Test case adds perl recipe before build eSDK.
2. After this added recipe, the script verifies the update:

    ${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh
    oe-publish-sdk [esdk] [path-to-http]
    CORE_IMAGE_EXTRA_INSTALL = "perl"
    bitbake -c populate-sdk-ext [some-image]
    devtool sdk-update

This should fix [YOCTO #9369]

(From OE-Core rev: 21bd406bf89e9ceafe1a807877406be817cacca6)

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Chen Qi 2a64701acf package_manager: default to have scriptlet output captured in log
We need to have scriptlet output captured in log. If we don't do so,
some useful information from scriptlets (especially postinstall script)
would be missing. In case a script has a warning message but it does not
necessarily have to fail, the message should be captured.

Opkg has already done that. Change for rpm and dpkg so that scriptlet
output is captured and no warning message is missing.

(From OE-Core rev: 0e52e0c619e02327602d83999a61d978d3a9240e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Markus Lehtonen f4c96ea829 oeqa.buildperf: store measurements as a dict (object) in the JSON report
Store measurements as a dict, instead of an array, in the JSON report.
This change makes traversing of the report much easier. The change also
disallows identically named measurements under one test, as a sanity
check for the test cases.

[YOCTO #10590]

(From OE-Core rev: 81065092f38c9631dcf5917d70a25809a21de5f4)

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>
2017-01-23 12:05:22 +00:00
Markus Lehtonen 7171710acd oeqa.buildperf: change sorting in json report
Use OrderedDict() instead of sort_keys=True (of json.dump()). Makes for
more logical sorting of the values in the report.

[YOCTO #10590]

(From OE-Core rev: 75e8aec0e0d81888be47b35c3c84df73edb91868)

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>
2017-01-23 12:05:22 +00:00
Markus Lehtonen 8e01802c9f oe-build-perf-test: remove unused imports and fix indent
[YOCTO #10590]

(From OE-Core rev: 0b1892fa9165407a156609ff7cb3708e21bacd8c)

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>
2017-01-23 12:05:22 +00:00
Markus Lehtonen 0981bcb098 oe-build-perf-test: save test metadata in a separate file
The patch introduces a new metadata (.json or .xml) file in the output
directory. All test meta data, e.g. git revision information and tester
host information is now stored there. The JSON report format is slightly
changed as the metadata is not present in results.json anymore.

[YOCTO #10590]

(From OE-Core rev: 2036c646019660e32f1bc277fdec0cdbff0afdd4)

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>
2017-01-23 12:05:22 +00:00
Markus Lehtonen 0e2d84728b oeqa.buildperf: report results in chronological order
Write results in the report file in chronological order, instead of
random order dependent on test statuses.

[YOCTO #10590]

(From OE-Core rev: 91ba6ea9fe2eb82f992a6516d7971b435e1cfd32)

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>
2017-01-23 12:05:22 +00:00
Markus Lehtonen fa4742f585 oeqa.buildperf: extend xml report format with test description
Add test description as an attribute to the <testcase> element.

[YOCTO #10590]

(From OE-Core rev: 7c23ddfeb4a46ee519cafdbd83ad1880621fba4d)

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>
2017-01-23 12:05:21 +00:00
Markus Lehtonen 4a26ceaecf oeqa.buildperf: extend xml format to contain measurement data
Make the xml report format slightly non-standard by incorporating
measurement data into it.

[YOCTO #10590]

(From OE-Core rev: b7164d30fb125ff0c85a2ea508b0f1801aa57f66)

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>
2017-01-23 12:05:21 +00:00
Markus Lehtonen 07c245792e oe-build-perf-test: enable xml reporting
Add --xml command line option to oe-build-perf-test script for producing
a test report in JUnit XML format instead of JSON.

[YOCTO #10590]

(From OE-Core rev: 21ae1c491b93675254b7733640662b566ed76f98)

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>
2017-01-23 12:05:21 +00:00
Markus Lehtonen 96fcb0f7b4 oeqa.buildperf: include error details in json report
This will typically mean assert message and exception type plus a
traceback. In case of skipped tests the reason (i.e. skip message) is
included.

[YOCTO #10590]

(From OE-Core rev: bd5f5ab6f7350b4487c9cc2dbd100fa4b687d0fa)

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>
2017-01-23 12:05:21 +00:00
Markus Lehtonen 184afbc6ce oeqa.buildperf: sync test status names with JUnit
Use 'failure' instead of 'fail'. Also, use 'expected' instead of 'exp'.

[YOCTO #10590]

(From OE-Core rev: 51ae18c64eee074478157a484f71a53faadca80b)

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>
2017-01-23 12:05:21 +00:00
Markus Lehtonen ef988b3d06 oeqa.buildperf: prevent a crash on unexpected success
(From OE-Core rev: af205d9a13d182a0b590426ba8c4e3dff7f3f02b)

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>
2017-01-23 12:05:21 +00:00
Mariano Lopez 6cea270c54 selftest/runtime-test.py: Adapt test to use new runtime framework
This adapt the current runtime selftest to use the new runtime
framework.

(From OE-Core rev: cfeec8a59ba03f98944fd3dca1a67d80e7edb4c9)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:21 +00:00
Mariano Lopez 1cc2bac7ec oeqa/runtime/context.py: Add defaults for runtime context
This adds default values to OERuntimeTestContextExecutor class in
order to make easier the execution of exported test that were
generated with testexport class.

[YOCTO #10686]

(From OE-Core rev: c78aeaac3b75610bada62b138c9670815a07ee80)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:21 +00:00
Mariano Lopez 58789be270 testimage.bbclass: Add package install feature
This allows to use the package install feature with
the new OEQA framework.

[YOCTO #10234]

(From OE-Core rev: 077dc19445574457769eb4f231de97e8059cb75e)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez f8d7db1905 testimage.bbclass: Add support for package extraction
testimage support the installation of packages without a package
manager in the target. This adds support for package extraction
required to support the installation feature.

[YOCTO #10234]

(From OE-Core rev: 8c7335290cb00ed0683241249297ca573ebd353a)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 8970ed4b1f oeqa/core/utils/test.py: Add functions to get module path
This will add functions to get module file path from a test
case or a complete suite.

[YOCTO #10234]

(From OE-Core rev: 11dd49cb9faaf6588f045083ab5bd6679e2eafc1)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 41e4db0eea runtime/cases/smart.py: Migrate smart tests
This migrates the smart test from the old framework to
the new one. This has its own commit because smart
test was using bb and oe libraries that are available
when exporting the test cases to run in a different host.

Because of the removal of bb and oe libraries index and
packages feeds creation will be managed in testimage bbclass.

[YOCTO #10234]

(From OE-Core rev: 8d64ac4208e8dcb8a6fde6ea2959c9b3edfe2172)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez b569aa0e00 oeqa/runtime/cases: Migrate runtime tests.
This migrates current runtime test suite to be used with the new framework.

[YOCTO #10234]

(From OE-Core rev: b39c61f2d442c79d03b73e8ffd104996fcb2177e)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 211c5be54c core/target/qemu.py Adds qemu target
This adds qemu target to be used in testimage.
It uses the current QemuRunner class in order
to boot and control qemu.

[YOCTO #10231]

(From OE-Core rev: 44d4e9d0bb31fbc28d8c1fad8860ff56e5ae043a)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 71e456add8 oeqa/runtime/context.py: Add logger to getTarget
Current targets (ssh and qemu) require a logger in their
constructors, so in order to get a new target we need
to provide the logger.

[YOCTO #10686]

(From OE-Core rev: 26bae3c255bc1e1cc8d81db0cffc809de0182a43)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Aníbal Limón 0e8d0a03f0 oeqa/runtime/context.py: Prepare for qemu
This commit will prepare context to use qemu and not just
simpleremote.

(From OE-Core rev: 7485a08c967916fb6edff4cc573d9314ec577031)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Aníbal Limón 2d34b08533 oeqa/utils/dump: Move get_host_dumper to OERuntimeTestContextExecutor class
To avoid getVar calls inside a utils module, also moves
get_host_dumper import inside testexport isn't needed.

[YOCTO #10231]

(From OE-Core rev: f8beaf94e943a8b20d146be47a756af312ef107c)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Aníbal Limón 1247118870 oeqa/runtime/context: Move helper functions for process args to executor
(From OE-Core rev: 07ee2fa0008a50da87fd840aea5e8bb6051c68fa)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Aníbal Limón 6c3ca00884 oeqa/runtime/context: Add runtime option group and options for target type and server ip.
(From OE-Core rev: d3cc6761a13fd1da673829797b45323aed7997d0)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 32a3f4d6ab oeqa/core/context: Add option to select tests to run
This add the option to select what tests to run in the
<module>[.<class>[.<test>]] format.

Currently it just support modules

(From OE-Core rev: 0050565d71cee5a0cc22660b2398e4334d4b6719)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 41b0b31a84 oeqa/core/decorator: Add skipIfNotDataVar and skipIfNotInDataVar
skipIfNotDataVar will skip a test if a variable doesn't have certain value.

skipIfNotInDataVar will skip a test if a value is not in a certain variable.

(From OE-Core rev: a81045f4e2b740173237f5ae4e80e2bc0b287faa)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez c35b42cdbb oeqa/runtime/utils/targetbuildproject.py: Don't use more than 80 characters per line
(From OE-Core rev: 95a55e0736fc59ecdcb88d43f08b447ffa5a43ed)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 5f57fd0b08 oeqa/runtime/files: Move runtime files from old directory
As part of the refactor we require to move the files used
in runtime testing to the new directory. This also adds
the path to the runtime test context.

[YOCTO #10234]

(From OE-Core rev: f80c21b46f69c42ff0853bf8abd01cf0c082c346)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez bfe20fd23c oeqa/core/decorator/data.py: Add skipIfNotFeature decorator
This adds a new decorator to check if image under tests has
certain DISTRO_FEATURE or IMAGE_FEATURE.

[YOCTO #10234]

(From OE-Core rev: 8740803d0696a0e97b72210a56f4fbd3135826ed)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 9ee0816ca9 oeqa/runtime: Add OEHasPackage decorator
This new decorator will be used to skip the test
if the image under test doesn't have the required
packages installed.

[YOCTO #10234]

(From OE-Core rev: 021449938ff0b4d182d7f02930a80693f109c8ba)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 4cd982566b oeqa/runtime: Add case, context and loader classes for runtime testing
This adds OERuntimeTestCase, OERuntimeTestContext, and OERuntimeTestLoader
to be used for runtime testing.

As expected there are some changes in runtime context:

- Adds the target to be used for runtime testing, the default
is a SSH connection to the device under test running a OE image.
- Runtime context requires image manifest because several
tests are skipped if a package is missing or installed.
- Several tests require the output of the ps command and it changes
its output and arguments if busybox o procps is installed, so the
case must use the correct ps command.

[YOCTO #10234]

(From OE-Core rev: f995f178de79d6d11422cd879d06371811f50651)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Mariano Lopez 6ad52a82ea oeqa/core/target Add OESSHTarget to sent commands to targets using SSH
With this commit now it is possible to add targets with SSH for testing.
Most of it was imported for existing code, with improvements in log
handling.

[YOCTO #10234]

(From OE-Core rev: 3bc13548df4adb85f09467d200530a9c9f60da04)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:20 +00:00
Aníbal Limón b61326efb1 oeqa/runtime: Move to runtime_cases
The new oeqa core framework will modify the structure of the runtime
folder the new runtime folder will have python code inside to support
runtime test cases.

(From OE-Core rev: 637b712096e9d230e15b1a432a561e4118db34c8)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón ba1aec3407 oeqa: Fix files handling on runtime tests.
Common files was move to oeqa/files from oeqa/runtime/files
because the same files are used across Runtime,SDK,eSDK tests.

(From OE-Core rev: f099302efe8f222c3e4ae3604429f5ede4fd8c67)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón e5f05409d0 oeqa/runtime: Fix TargetBuildProject instances
TargetBuildProject was refactored to avoid bitbake dependency so
the instance don't allow to pass data store anymore.

classes/testimage: Export proxies before run tests

The TargetBuildProject based tests download archives from network.

(From OE-Core rev: e275f29de500a338a02402ecc570405309963b35)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón 260741847a oeqa/sdkext/cases: Migrate test case to new OEQA framework
Summary,

- Changes base case class to OESDKExtTest.
- Changes decorator classes to new ones.
- Chnages variable names sdktestdir -> sdk_dir.
- Added missing license to MIT.

(From OE-Core rev: 49568055df0a64e4228f27130b13ccafbba2a460)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón 14eee4fdf8 oeqa/sdkext: Adds case and context modules.
The extensible sdk context and case modules extends the sdk ones,
this means that the tests from sdk are run also the sdkext tests.

Enables support in context for use oe-test esdk command for run
the test suites, the same options of sdk are required for run esdk tests.

Removes old related to case and context inside oetest.py.

[YOCTO #10599]

(From OE-Core rev: 1f0bb99249744b87dd39227a4cf37f2341f5499c)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón 55f05fab2b oeqa/sdkext: Move test cases inside cases directory
For match with the new structure of the OEQA framework.

In the new framework Test component base directory in this case
sdk module will contain case and context implementations.

[YOCTO #10599]

(From OE-Core rev: bdb92fa4d9bd2e4a0a14e3adc62a6b9e9bf639d3)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón 3fac2417dd classes/testsdk: Remove the need of TEST_LOG_DIR variable
The TEST_LOG_DIR was used for store sdk_target_log this log
contains the output of the run of build commands now that information
could be found also on log.do_testsdk under WORKDIR.

The log will continue to store into SDK_DIR instead of TEST_LOG_DIR.

(From OE-Core rev: 1c9ba4b698bab916d42b58255692a7bf3d773bbc)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón c9fe59d7c5 oeqa/sdk/cases: Migrate tests to the new OEQA framework
Summary of the changes:

- Remove auto extend_path using pkgutil at __init__, is not needed.
- Change base class to OESDKTestCase.
- Add td_vars attr to set dependencies of certain variables in test
data.
- Change skips from module level to class level because Test context
  (tc)
now isn't at module level.
- Variable names changes to be consistent (i.e. sdktestdir ->
  sdk_dir).

[YOCTO #10599]

- Don't use bb.utils functions use instead remove_safe and shutil
  for copy files.
- SDKBuildProject pass test data variables instead of call getVar
  inside.

[YOCTO #10231]

(From OE-Core rev: 91cd1ed19a3f34c29cd77eb136036975fe465444)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00