Commit Graph

514 Commits

Author SHA1 Message Date
California Sullivan
7e9b658196 selftests: Add test case for booting a generic EFI boot partition image
Simple test case that adds 'efi' to MACHINE_FEATURES, sets WKS_FILE to
"efi-bootdisk.wks.in", installed required boot items, and attempts to
boot the wic image.

Quick check to make sure that the feature actually works.

(From OE-Core rev: 192c8738f4a8d0f82848a440acf24a1892f2ce93)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:35:42 -08:00
Ross Burton
1bcbe159aa sstatetests: pass the right files when comparing sigfiles
(From OE-Core rev: 65cc20690e7827df3d84ebea6357eebabb668f50)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-24 10:31:48 +00:00
Alexander Kanavin
3bbf10c364 oe-selftest: add a test for recipes without maintainers
'bitbake -c checkpkg world' is moved to class initializer to avoid
it being run twice in a row.

The no-maintainers test checks only oe-core recipes, as other layers
may be be configured, and assigning maintainership to specific people via
maintainers.inc is known to be used only in oe-core.

(From OE-Core rev: ac6a72aab19e04adb2fa2b9932a9427d1b6fbb46)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-24 10:31:45 +00:00
Alexander Kanavin
6bb3595ec5 oe-selftest: fix tests to reflect man->man-db transition
Rather than apply a patch twice, an incorrect patch is applied
(as the new man-db recipe does not have any patches yet).

(From OE-Core rev: a8bf4da183824caa5fceaf7546db52daa05f8662)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-24 10:31:45 +00:00
Yeoh Ee Peng
3f6eb216ef oe-selftest: meta_ide: add tests for meta-ide-support
QA team were testing meta-ide-support manually. Add automated
tests to test that bibtake meta-ide-support will create the
toolchain and environment setup script. Also test that after
using environment setup script, one can compile c program
and build cpio project.

(From OE-Core rev: db40eba68f51d02677526dfa4bc21343d9c27958)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15 11:23:11 +00:00
Saul Wold
58dd6fe372 imagefeatures: disable f2fs from test_image_features by default
Since the primary f2fs utilities are provided by the meta-openembedded
meta-filesystems layer, we disable the testing of that functionality
here.

(From OE-Core rev: f691ed2572e54fa2af04c1569746c36ce04463ee)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-23 23:43:46 +00:00
Robert Yang
598a4e9e85 selftest/cases/devtool.py: fix workspace layer checking
Fixed:
$ oe-selftest -r devtool.DevtoolTests.test_create_workspace
[snip]
2017-12-20 18:28:59,404 - oe-selftest - INFO - Traceback (most recent call last):
  File "/workspace2/lyang1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/workspace2/lyang1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 177, in test_create_workspace
    self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
AssertionError: False is not true : This test cannot be run with a workspace layer in bblayers.conf
[snip]

$ bitbake-layers show-layers
NOTE: Starting bitbake server...
layer                 path                                      priority
==========================================================================
meta                  /workspace2/lyang1/poky/meta              5
meta-poky             /workspace2/lyang1/poky/meta-poky         5
meta-yocto-bsp        /workspace2/lyang1/poky/meta-yocto-bsp    5
meta-selftest         /workspace2/lyang1/poky/meta-selftest     5

There is no workspace layer, but I'm in /workspace2, this patch can fix the problem.

[YOCTO #12442]

(From OE-Core rev: 695b234ea4f034d428f8cffacceabc2b8f00bc74)

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>
2018-01-14 09:11:57 +00:00
Richard Purdie
3ab6e17ffe bitbake.conf: Set AUTOREV to have a vardepvalue
If you have a recipe which does not include SRCPV in PV but does set
SRCREV = "${AUTOREV}" and you run do_fetch, then change the repo to a
new commit then run do_unpack, do_unpack will fail since the new commit
doesn't exist in the repo that was fetched.

The problem is the revision chosen is not represented in the do_fetch
task hash. It if were, the fetch would rerun first and the commit would be
present. It works when PV includes SRCPV since that does contain the chosen
commit from the AUTOREV.

The solution is to include the SRCPV value into the representation of AUTOREV
used for checksum calculation purposes.

Add a selftest for this issue.

(From OE-Core rev: 7b8ee9285a197784d51e339f1603240f49435846)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06 22:32:22 +00:00
Paul Eggleton
a77b6ee767 oe-selftest: devtool: switch away from mkelfimage
mkelfimage is about to be removed, so test_devtool_modify_git needs to
use a different recipe. psplash is a reasonable choice given it uses a
git repository (and probably will forever), and doesn't have too many
dependencies, so change the test to use that recipe instead.

(From OE-Core rev: daf583efc87faa058684dfe34df596d088caa8ef)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-02 17:24:37 +00:00
Alexander Kanavin
0ac5ca3fcf rpm: update to 4.14.0
Previously oe-core had a development snapshot of rpm, it's better to update
to something more stable.

Removed patches:
0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch
(upstream is using pkg-config)
0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
(functionality has been moved to a plugin, we disable plugins
for rpm-native)
0012-Use-conditional-to-access-_docdir-in-macros.in.patch
(merged upstream)

Changed patches:
0001-Fix-build-with-musl-C-library.patch
(one previous musl issue has been resolved upstream; another has been added)

Rest of the patches are trivial rebases.

Update the signing oe-selftest so that the reference output matches
the upstream changes.

(From OE-Core rev: b4613b6ce07c295c5d6de6861acf19315acaccb2)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-02 17:24:36 +00:00
Joshua Lock
a2fee27d0a oeqa/selftest/cases/wic: update OETestID decorator for test_qemu
Test case ID 1422 is not correct for this issue, the correct test
case ID for test_qemu is 1424.

(From OE-Core rev: d214b1dc9339c4873156934f5291b9373a11471f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-21 10:21:00 +00:00
Richard Purdie
04315672fc oeqa/selftest/buildoptions: Add test for fortran compiler building
(From OE-Core rev: 84d6be8ceb14b418b059212108c5a71a5950e6c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-21 10:21:00 +00:00
Richard Purdie
57ba094ad7 oeqa/selftest/archiver: Add test for srpm archiver mode dependencies
(From OE-Core rev: dc7a6b9a73362de5e87439a852234fb1c59ca004)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-21 10:21:00 +00:00
Tom Rini
d0de33c5d4 meta-selftest: wic: Add test for --use-uuid / --fsuuid
- Mount a '/media' partition to wic-image-minimal.wks with a known UUID.
- In test_qemu, sort our output from checking the output of 'mount' as
  it may not be stable.  Also, do not check the exit code as passing any
  output to cut ensures a 0 exit code.
- Check for a 'UUID=' line in /etc/fstab with out expected output.

(From OE-Core rev: 6d9396b26218f3234701944f385d5c36face8121)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18 18:03:58 +00:00
Paul Eggleton
6ef6326b37 oe-selftest: devtool: fix test for changes in lzo recipe
acinclude.m4 is about to be removed from the lzo recipe which breaks
test_devtool_update_recipe_local_files_2. Create a synthetic recipe in
meta-selftest with some local files and use that instead.

(From OE-Core rev: ed27470fa6a9f3cc1a0eb884474fe7985babde7a)

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-12-10 22:45:20 +00:00
Ross Burton
d5f42075e6 oeqa/selftest/runtime_test: simplify postinst testing
Update the packages and file names to reflect the new postinst recipe.

Fix a sh syntax error in the run_serial file exists test which was hidden by a
logic problem in the status code.

Remove the older test_verify_postinst as it's effectively a subset of
test_postinst_rootfs_and_boot, and doesn't work: when booting under systemd the
strings it searches for are not output to the console, but the test still
passes.

(From OE-Core rev: 781a1be88f5812157a231bf5771a01bb978bfcd9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-02 11:25:33 +00:00
Richard Purdie
27eaabb35c oeqa: Markup further tests for stdout/stderr buffering
This further cleans up the output of oe-selftest so that runqemu output
is hidden unless tests fail.

(From OE-Core rev: efa064d5026538ab513edc11869364ce2f14b977)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11 12:14:26 +00:00
Richard Purdie
0e198a7311 oeqa: Clean up logger handling
The logger handling in oeqa was confused at best. This patch:

a) Passes in a logger through various qemu runner pieces
b) Uses that logger consistently in the code
c) Creates a logger for QemuRunner outside the bitbake namespace
   meaning we don't conflict with the tinfoil logging changes

The result of this is more consistency. For runtime tests in testimage,
the logs always contain the debug info, nothing is shwon on the console.
For the oe-selftests, logs are intercepted and only shown if the test
fails.

(From OE-Core rev: 4ff678137a55b93c9ba2cbffda34335ba859f704)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-09 12:24:24 +00:00
Richard Purdie
a3a122d2f5 oeqa/runqemu: Only show stdout/stderr upon test failure
In general we don't need to see the output of runqemu however if it fails
we do. Use the buffer option that already exists in TestResult but allow
us to trigger it on a per test basis.

(From OE-Core rev: 86bef95bccbe9dad3dc3445ea365439861966179)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-09 12:24:24 +00:00
Ross Burton
5239691cc9 selftest/imagefeatures: add basic test for useradd-staticids
(From OE-Core rev: 468079140c1f19096bbc628663462beebc194800)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-08 22:24:03 +00:00
Joshua Lock
51b3c38b5d lib/oeqa/selftest/cases/gotoolchain: add selftest for the Go toolchain
Add a simple test case to being testing of the Go toolchain:
1) build meta-go-toolchain
2) create a temp directory and install the generated Go toolchain within
3) fetch an archive of the Go Dep tool
4) create an appropriately laid out GOROOT and inflate the dep archive there
5) build the dep command with the SDK's Go toolchain and check it returned
   successfully.

[YOCTO #12152]

(From OE-Core rev: bca999644e28e1666357bcbeab685547c6f9dd65)

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-11-08 22:24:03 +00:00
Ross Burton
ce71ef3ee5 oeqa/selftest/runtime_test: use console in postinst_rootfs_and_boot
Use a console login not SSH for simplicity.

(From OE-Core rev: 842f3beb211eb0a398b37c50d433a93b86964f6b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-08 22:24:03 +00:00
Ross Burton
f8ea81129d oeqa/selftest/runtime_test: fix postinst_rootfs_and_boot
This test overrides IMAGE_FEATURES but failed to include package-management,
which is essential for postinsts to work under dpkg.

(From OE-Core rev: 7e73b84331a4ae8d93518feb68c748d98bac78c6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07 13:34:29 +00:00
Ross Burton
01a050ebff oeqa/selftest/runtime: force empty root password, use helpers to access qemu
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:33:23 +00:00
Peter Kjellerstedt
16f1a14f83 license.py: Correct selection of licenses in is_included()
When faced with multiple sets of licenses combined with | (OR), it was
possible for oe.license.is_included() to choose a set of licenses with
a blacklisted license and then report failure, even if choosing
another set of licenses would have resulted in a successful
result. This happened when the chosen set still contained more
whitelisted licenses than the other set.

This change makes sure a set with any blacklisted license is always
considered with a lower weight than a set with only whitelisted
licenses.

Example: Faced with the license string "GPL-3.0 & GPL-2.0 & LGPL-2.1 |
Proprietary" and with "GPL-3.0" being blacklisted, the old code would
report a failure since "GPL-3.0 & GPL-2.0 & LGPL-2.1" still contains
more whitelisted licenses than "Proprietary" does.

This change also adds a unit test for oe.license.is_included().

(From OE-Core rev: 312b4d6175e189852c0787ca2fe99b99ce92d1bd)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07 23:20:39 +01:00
Leonardo Sandoval
6550d66de3 selftest/cases/runtime_test: ignore removal errors when cleaning temporary gpg directory
The high-level method tempfile.TemporaryDirectory give us no way to ignore erros on
removal thus use tempfile.mkdtemp instead. Ignoring possible issues on removal
is neccesary because it contains gpg sockets that are automatically removed by
the system once the process terminates, otherwise the following log is observed:

  File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
  FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'

This is the same fix as 7e3a7cd2426feac757def81850dc44156cd0f33e, but this applies
to runtime (instead of signing).

[YOCTO #11821]

(From OE-Core rev: f28e8131f69913ff90ed210c7a58726d3ef37db6)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-26 11:05:01 +01:00
Ross Burton
6470f39f1e oeqa/selftest/recipetool: use stable tarball for recipetool create test
GitHub dynamically generates the /archive/ tarballs but we're encoding checksums
in the test suite.  Change the URL to use a static tarball, and update the
checksums.

(From OE-Core rev: 9c668f9ff989a34e615e2ecc051dadbfe24a5bb4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Paul Eggleton
10af6d86b3 devtool: rework source extraction so that dependencies are handled
Since it was first implemented, devtool's source extraction (as used by
the devtool modify, extract and upgrade subcommands) ignored other recipe
dependencies - so for example if you ran devtool modify on a recipe that
fetches from svn or is compressed using xz then it would fail if those
dependencies hadn't been built first. Now that we can execute tasks in
the normal way (i.e. tinfoil.build_targets()) then we can rework it to
use that. This is slightly tricky in that the source extraction needs to
insert some logic in between tasks; luckily we can use a helper class
that conditionally adds prefuncs to make that possible.

Some side-effects / aspects of this change worth noting:
* Operations are a little slower because we have to go through the task
  dependency graph generation and other startup processing. There's not
  really any way to avoid this though.
* devtool extract didn't used to require a workspace, now it does
  because it needs to create a temporary bbappend for the recipe. (As
  with other commands the workspace be created on the fly if it doesn't
  already exist.)
* I want any existing sysroot files and stamps to be left alone during
  extraction since we are running the tasks off to the side, and
  especially devtool extract should be able to be used without touching
  these. However, this was hampered by the automatic removal process in
  sstate.bbclass triggered by bb.event.ReachableStamps when the task
  signatures change, thus I had to introduce a way to disable this
  removal on a per-recipe basis (we still want it to function for any
  dependencies that we aren't working on). To implement this I elected
  to use a file written to tmp/sstate-control which gets deleted
  automatically after reading so that there's less chance of stale files
  affecting future sessions. I could have used a variable but this would
  have needed to be whitelisted and I'd have to have poked its value in
  using the setVariable command.

Fixes [YOCTO #11198].

(From OE-Core rev: 830dbd66992cbb9e731b48d56fddf8f220349666)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:29 +01:00
Paul Eggleton
92a08ae838 oe-selftest: devtool: fix test_devtool_add hanging on some machines
The code in scriptutils which implements the logic for running the
editor used by devtool edit-recipe looks at the VISUAL environment
variable before EDITOR, and thus if VISUAL is set in the environment it
will override the EDITOR value we are setting here, the editor (usually
vim) launches and there's nothing to stop it running forever short of
manually killing it. Set VISUAL instead to fix this.

Apparently VISUAL is in fact the variable we should really be preferring
here - I don't think I knew that but somehow I got it right in the code,
just not in the test. Here are the details for the curious:

  https://unix.stackexchange.com/questions/4859/visual-vs-editor-whats-the-difference

Fixes [YOCTO #12074].

(From OE-Core rev: 6a7c50def569b5e86aa17bd9b287e8c63781dcb0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13 21:59:55 +01:00
Leonardo Sandoval
f44dfe63a4 selftest/cases/signing: ignore removal errors when cleaning temporary gpg directory
The high-level method tempfile.TemporaryDirectory give us no way to
ignore erros on removal thus use tempfile.mkdtemp instead. Ignoring possible issues
on removal is neccesary because it contains gpg sockets that are automatically removed
by the system once the process terminates, otherwise the following log is observed:

  ..
  ..
  File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
  FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'

[YOCTO #11821]

(From OE-Core rev: 7e3a7cd2426feac757def81850dc44156cd0f33e)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Jose Perez Carranza
fae168d288 selftest/devtool: Avoid writing on TOPDIR on kernel test case
Use a tempdir to copy the .config file from the kernel instead of being
copied to build directory.

(From OE-Core rev: ccccf975c75055639c0ed5052ac0ad53ebbf53ca)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Ed Bartosh
e1d59cbab4 wic: selftest: add test_wic_rm_ext test case
Tested if 'wic rm' correctly removes files from the ext4 partition
of the wic image.

(From OE-Core rev: 693b555e4f419b5d24f9f86c44354866492f8bb0)

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-09-11 17:30:29 +01:00
Ed Bartosh
f5a679e9b1 wic: selftest: add test_wic_cp_ext test case
Tested if 'wic cp' correctly copies files to the ext4 partition
of the wic image.

(From OE-Core rev: 7970907c72d9533fd63d2c8796bbeb9be86b3fc3)

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-09-11 17:30:29 +01:00
Ed Bartosh
d3739ff0e2 wic: selftest: add test_wic_ls_ext test case
Tested if 'wic ls' correctly lists directory contents
of the ext* partition.

(From OE-Core rev: 6ae3ff957b5c28c7853966cd5a7665772c594546)

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-09-11 17:30:29 +01:00
Robert P. J. Day
d27b089fef oeqa: Replace "append +=" with normal "append =" in layerappend.py
(From OE-Core rev: 0fae16b67542c59b059aa359146c38040785f200)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:28 +01:00
Ola x Nilsson
7470b7ef19 oeqa/selftest/case: Add recipeinc method
The recipeinc method returns the absolute path of the test_recipe.inc
file of a specified recipe.  It replaces four instances of identical
code, and make it possible to access the filename from a testcase for
cleanup.

The write_recipeinc and append_recipeinc methods are changed to return
the path to the file in case that is useful.

The test_recipe.inc file is usually cleaned up in a finally block,
but that block executes before any teardown operations.  This blocks
any teardown that requires the presence of the test_recipe.inc file.

(From OE-Core rev: cdb431676456f47da1a3b70caddf49f083948798)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:28 +01:00
Jose Perez Carranza
1d5d4165a5 oeqa/selftest: Add missing IDs to various test cases
Add decorator @OETestID() with Tesopia TC-ID to the test cases
that did not have it properly set.

[YOCTO #11873]

(From OE-Core rev: aa5b9edbd9c4495befe1912a5b401b536be39d5b)

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-09-11 17:30:28 +01:00
Richard Purdie
24a938cea1 selftest/prservice: Adapt to BB_SERVER_TIMEOUT
In the memory resident mode, the user may not see a message about the server
starting, it would be in the cookerdeamon logfile. We don't need this to
test the server is functioning correctly so just drop the test.

Add in an extra check that the file we expected to be created was
created when exporting PR values.

(From OE-Core rev: 811edd95420e907e71b5c7646bde5013b43d4c73)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 23:30:03 +01:00
Paul Eggleton
e3ccf04902 oe-selftest: tinfoil: add a test for variable history
I recently found that variable history wasn't working properly for
recipes when we enable history tracking, resulting in minor
functionality loss in devtool upgrade, so add a test to ensure this
doesn't regress now that it's fixed.

(From OE-Core rev: f49042e707d641b59a71c687374b76df97c64c34)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 23:30:02 +01:00
Paul Eggleton
3be475019f oe-selftest: devtool: test find-recipe and edit-recipe
We weren't testing the devtool find-recipe and edit-recipe subcommands,
with the result that when they regressed recently we didn't notice. Add
some code into the test_devtool_add to test this (since we need a
recipe in the workspace, and adding a new test with all that preamble
would seem a bit excessive for these simple checks). Also take the
opportunity to refactor the test a little bit so that the recipe name
and version are variables rather than hardcoding them everywhere.

(From OE-Core rev: 355d8f42679e37610c2947dece597ed7db774bee)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 23:30:02 +01:00
Ed Bartosh
390dcbf2e1 wic: setlftest: test expanding MBR image
Added test_expand_mbr_image test case to the wic oe-selftest suite.
The test expands directdisk wic image to 1Gb target, checks if it's
expanded correctly and boots it in qemu to make sure the image
is bootable, i.e. bootloader, kernel, boot and root partitions
are still functional.

(From OE-Core rev: 83739174be5b3fabd7df559a35ac6407d82a6280)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-27 22:30:07 +01:00
Richard Purdie
ca940601b8 runqemu: Use virtio to mount cdrom drives
The IDE driver in the kernel is fragile and in 4.12 is causing backtraces.
To unblock 4.12 kernel merging use the virtio CD driver instead to mount
iso images which should be faster and more stable.

(From OE-Core rev: f59e729f98ef9b506b0cfdc415567e03ec87f2a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23 12:06:52 +01:00
Markus Lehtonen
188feb233a dnf: expand dnf selftest to test signed package feeds
[YOCTO #11209]

(From OE-Core rev: 4d65421f381fc69397d7c61ba76488775e83e043)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16 00:03:16 +01:00
Markus Lehtonen
05361f9a4f oeqa: fix dnf tests
Rename one dnf runtime test that it will recognized as a python module
and thus also found by the oe test loader. Also, fix value of
TEST_SUITES in dnf selftest so that all test dependencies are satisfied
and the runtime test may be successfully run from there.

(From OE-Core rev: ee3be65aa1348798d385ead9b80c6a6ada21d6b0)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16 00:03:15 +01:00
Richard Purdie
d2697f92e9 selftest/tinfoil: Filter LogRecords in test_event_wait
As the code stands today, an event mask does not mask LogRecord events
since the log levels are controlled separately. We therefore need to
accept (and ignore) LogRecord events in this test to avoid errors.

(From OE-Core rev: efe1f2c8ad09af3c5ee9c778601c7463c532b012)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16 00:03:15 +01:00
Alexander Kanavin
5813f1f764 selftest: fix distrodata.py to use per-recipe UPSTREAM_VERSION_UNKNOWN setting
... instead of a global exception list which was problematic.

[YOCTO #11896]

(From OE-Core rev: 89dfede4ca795ba085f1ee7290c6dede573c11db)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16 00:03:13 +01:00
Leonardo Sandoval
d6823e947b sstatetests: limit the number of signature comparisons when differ
For perfomance reasons, limit the number of signature comparisons when
stamps differ. The limit set is hardcoded to 20.

[YOCTO #11651]

(From OE-Core rev: a2e2f434cd8d68b69e1ccdb7d7c17c0c73289866)

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-08-13 09:27:38 +01:00
Ross Burton
7b5e524c8e oeqa/buildoptions: remove unsafe-references-in-script test
This QA test is about to be deleted, so remove it from selftest.

(From OE-Core rev: b9faf41ddc4510d484b5cbe8d182d8288fe00773)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-13 09:27:38 +01:00
Leonardo Sandoval
5ec91f9a32 context: Include a command line argument to run all except certain tests
A new command line argument (-R, which is the oposite of current -r) that allows
to run all test cases except the ones indicated through the command line.

Some command line examples:

* Run all except the distro test case:
$ oe-selftest -R distrodata

* Run all except the archiver test case and a single bblayers unit test
$ oe-selftest -R archiver bblayers.BitbakeLayers.test_bitbakelayers_add_remove

[YOCTO #11847]

(From OE-Core rev: e40eeaa790b95d9c25832405c0b0d5b3a0d0292b)

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-08-13 09:27:37 +01:00
Ross Burton
582097c103 oeqa/runtime_test: use subtests in test_postinst_rootfs_and_boot
As this test has two nested loops and actually runs six times, use
UnitTest.subTest() so we can tell which instance is failing, and to run all
variations instead of failing on the first one.

Also set PACKAGE_CLASSES to just the type we need to reduce the verboseness of
the output, and consolidate the feature generation to be neater.

(From OE-Core rev: c7ef6000b11f1b1cd27c9bc408eea9f76bb94a3b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-13 09:27:37 +01:00