Commit Graph

209 Commits

Author SHA1 Message Date
Paul Eggleton bf4d380b97 oe-selftest: devtool: add an additional test for devtool upgrade
Add a test for devtool upgrade with a recipe pointing to a git
repository, since this uses several different code paths.

(From OE-Core rev: d3ec74ff4db248ea11a568d5214708d6a1757012)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 11:33:01 +00:00
Paul Eggleton 4bae2f25b8 oe-selftest: devtool: rework devtool upgrade test
* Use a more real-world test of a recipe pointing to a remote file
* The cleanup tracking / teardown commands need to be added towards the
  top, or they won't have the desired effect of cleaning up if the test
  fails.
* Check that a versioned subdirectory gets renamed to match the new
  version
* Ensure the recipe contents gets changed as we expect it to
* Check that the recipe directory is deleted by devtool reset at the end

(From OE-Core rev: d0ae258e963f9bafffc4ca43c87497d27e57c127)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 11:33:01 +00:00
Francisco Pedraza 8d07e14009 oeqa/selftest/prservice: Added new TC: check pr-server starts and stop correctly on localhost.
This test case validates if prservice start and stop properly the server.
Using bitbake commands also validates the exit status.

[YOCTO #8258]

(From OE-Core rev: 5125dd2a5c2e382c47ddeaf0327fc7dc39482023)

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>
2016-02-28 11:32:59 +00:00
Daniel Istrate 4a21827415 oeqa/selftest/signing: Added test for locked signatures
fix for [YOCTO #8706]

(From OE-Core rev: 9b704ae44d9dc1d3d5c3aee6d7a5530b642070c4)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 11:32:57 +00:00
Ross Burton 7a95c2cb67 oeqa/selftest/buildoptions: build -minimal instead of -sato images
When checking enabling buildhistory doesn't change anything but rootfs stamps,
just build core-image-minimal instead of -sato to reduce the time this test
takes.

(From OE-Core rev: e9b44579007cbaa24c6b39ff788be3a927797660)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26 17:16:19 +00:00
Daniel Istrate 9cd64edebf oeqa/selftest/bbtests: Test bitbake --setscene-only option
Bitbake option to restore from sstate only within a build
(i.e. execute no real tasks, only setscene)

fix for [YOCTO #8876]

(From OE-Core rev: 3821aee0129b87a859b3a540b82745fdae184721)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18 07:39:30 +00:00
Richard Purdie d585a716d2 oeqa: Update to handle domain specific references in build logs
With the addition of the task name to recipe output, the sanity tests
need updates where they are looking for specific messages.

(From OE-Core rev: 0f2ef4304e6a6f18b4ed13f59000b4a1daa35f6b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:46 +00:00
Ed Bartosh 5d156bc066 oe-selftest: don't use specific tasks
Image should be build usual way, i.e. using bitbake <image>.
Specifying do_mage_complete and do_rootfs_wicenv tasks should not
be needed anymore as those tasks should be run by bitbake for
every image.

Removed specifying do_mage_complete and do_rootfs_wicenv tasks
from bitbake calls.

(From OE-Core rev: d8d7bd1b41eb846f18378a2581ff172cb2cc52b8)

(From OE-Core rev: 00cd291605ff5f001979b350d95670e33012fdc9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:45 +00:00
Ed Bartosh 80e8928942 oe-selftest: pylinted wic tests
Fixed the following pylint warnings:
  C: 45, 0: Line too long (91/80) (line-too-long)
  C:105, 0: Wrong continued indentation.
                            ignore_status=True).status)
                            ^         | (bad-continuation)
  W: 83, 8: Redefining built-in 'vars' (redefined-builtin)
  W:175, 8: Redefining built-in 'vars' (redefined-builtin)
  W: 27, 0: Unused import sys (unused-import)

(From OE-Core rev: ecb5320e766d0fa031c269d6d9b2a24c81c7aa7e)

(From OE-Core rev: c47af4a772883c86559673ba9b9f774f0ff0d54c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Ed Bartosh 51e0a8a180 oe-selftest: add new wic testcase
Added test_qemu testcase to boot wic-image-minimal and test
that 2 partitions mentioned in .wks are mounted.

[YOCTO #8499]

(From OE-Core rev: 6fb015d0847fe7d259d654d4a99bf4c328f810ab)

(From OE-Core rev: be360c24649391235fd9547a8f2c1251b12e9c81)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Ed Bartosh 4b2660144d wic-image-minimal: change IMAGE_FSTYPES
Replaced wic.bz2 -> wic in the recipe.
Replaced wic.bz2 -> wic in oe-selftest test case.

wic-image-minimal is going to be booted in qemu and tested.
As runqemu doesn't support compressed images this recipe needs
to produce raw wic image.

(From OE-Core rev: 3ce91db94f4b921566dce0dc6f91a422009be06b)

(From OE-Core rev: 69d8dfe4fc1fec440e33b1bb6cef62e20f1f5c28)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Ed Bartosh d083fec6d1 oe-selftest: remove unused parameter
Removed unused parameter 'test' from runqemu function.

(From OE-Core rev: c688b3bcbb57099fa72a9728bc708b109802f7fc)

(From OE-Core rev: a7af1eb28fab515180c0fa01a003ac7b2ce0cff4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Paul Eggleton e64ce73b7e oe-selftest: devtool: add another devtool add test
Add a test so we validate the following recently implemented/fixed
aspects of "devtool add":

* Adding from a local directory with no name specified
* Auto-detecting the name and version from autoconf files
* Setting SRC_URI and S from the local git repo
* Showing the recipe file path in "devtool status" if it has been
  created within the workspace

Incidentally also tests:

* LICENSE and LIC_FILES_CHKSUM detection (though just for this piece of
  software)
* Extracting a dependency from autoconf (though just for this narrow
  case since there's only one)

(From OE-Core rev: d991fe7f17861dc5c21f7eac30d8c912b4d5dbed)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton fa50153bc2 devtool: modify: make -x the default behaviour
It's going to be more common for users not to have the prepared source
tree for a recipe already, so the default behaviour ought to be to
extract it for them from the recipe. Change the default to extract
(effectively making the -x option a no-op) and add a --no-extract/-n
option to disable it. Later we can look at trying to be smart and
reusing an existing source tree instead of erroring out if it exists;
for now this is just the default reversal.

(From OE-Core rev: 80a44e52609a89d9ffe816181ae193af491c06ac)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Ross Burton 25d2956d97 oeqa/selftest/sstatetests.py: check that PARALLEL_MAKE doesn't change signatures
There are recipes that manage to have sstate signatures that depend on
PARALLEL_MAKE, so verify that changing this variable doesn't change signatures.

(From OE-Core rev: 14e8026cc25394b0a6d1d2063dc36b6b295857e5)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:27:48 +00:00
Richard Purdie 864797ab8d oeqa/prservice: Fix whitespace problem
Recent bitbake changes mean the whitespace formatting around the way functions are
defined, changed which broke the rather ugly construct this test uses to append to
a python function. This really needs to be rewritten and improved but fix the
whitespace so at least the tests work again and other regressions don't creep in.

(From OE-Core rev: 3279386edb2d231ea19ebc2b66c19062305ddf8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:27:43 +00:00
Richard Purdie ecb9c34bbc oeqa: Improve test failure messages
When the test fails, print the incorrect values so aid debugging.

(From OE-Core rev: 115f479ff91347ecb5069e89e193a5c678e7dc35)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10 16:06:24 +00:00
Richard Purdie eb53c54675 sstatetests: Fix after change to sstate populate_lic SWSPEC
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9fd214d2e7a931cfb46f40cb76d49aeb07af612e
changed SSTATE_SWSPEC, correctly however it did mean that some sstate files
now appear where the tests don't expect them. Filter the test results
to ignore the correct behaviour.

(From OE-Core rev: e86947bb79a9cb1b59a564ee511739f8a2b2b913)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 17:30:01 +00:00
Paul Eggleton d193531d5e devtool: build: ensure pkgdata is written out
When you run devtool build, you need to have the pkgdata written out at
the end, so that if what you're adding is a library and the next thing
you add is something that depends on that library, the necessary
information to map the dependency back to the recipe is present. In
practical terms all this means is we need do_packagedata to run in
addition to do_populate_sysroot.

This does mean that do_package needs to run which wasn't running before,
and that means that the few package QA tests that run within do_package
such as installed-vs-shipped will now be run. This may be a bit
bothersome, and prompted a fix for one of our oe-selftest tests as a
result, but I don't see an easy way around it. Ultimately if you care
about using the recipe in an image you'll need to fix any such errors
anyway.

Fixes [YOCTO #8887].

(From OE-Core rev: 6579c7120ee5a541427ff5b6b07f838d52f9fe7c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:32 +00:00
Markus Lehtonen a84058826d oeqa/selftest/signing: use temporary rpmdb
Use temporary rpmdb when importing gpg public key and checking rpm
signature. This patch should fix a problem where test_signing_packages()
sometimes fails with
"pmdb: BDB1540 configured environment flags incompatible with existing
 environment"

(From OE-Core rev: e2ddf409f405ab570ea7f6ed87180789b3a54607)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:20 +00:00
Paul Eggleton 0612ca4d0f oe-selftest: devtool: fix test_devtool_add_library if python was built first
If Python is in the sysroot then this test can fail due to some
brokenness in libftdi's CMakeLists.txt file for its python bindings.
Just disable it in order to have the test work more reliably.

(From OE-Core rev: 3e53e675bba75eb949be97a8d372e0134f6df935)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:24:53 +00:00
Paul Eggleton 2c8c9fe3b4 recipetool: create: add basic support for extracting dependencies from cmake
Add support for extracting dependencies from CMakeLists.txt. There's
still a bunch of things missing that are outside the scope of OE-Core
and we still lack a proper extension mechanism, but this is a good
start.

This also adds an oe-selftest test to exercise the new code a bit.

Implements [YOCTO #7635].

(From OE-Core rev: 77e73e6930381fdbd6e78d3913d6467572e16568)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:24:53 +00:00
Paul Eggleton dbe91a3d6a recipetool: create: improve extraction of pkg-config / lib deps
* The regexes for PKG_CHECK_MODULES / AC_CHECK_LIB were a bit too strict
  and thus we were skipping some macros.
* Add support for PKG_CHECK_EXISTS
* Avoid duplicates in warning on missing pkg-config dependencies
* Ignore dependency on musl (since this may come up if it's the selected
  C library)

(From OE-Core rev: c58669fb0977f7f0cb79f252484d5c5ef0dfb7e4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:24:48 +00:00
Richard Purdie 12e37e7c79 selftest/buildhistory: Improve test to remove sources of error
When we add buildhistory, we expect do_rootfs to rerun, but depending
on IMAGE_FSTYPES, the number of tasks which would execute after
do_rootfs varies (e.g. live would add do_bootimg and we recently
added do_image).

Therefore limit the test to -c rootfs and then we're clear that only
one task should re-run.

(From OE-Core rev: 9e9a33281e6008c3b699b5bbb738921829dbc501)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:24:47 +00:00
Richard Purdie fb1654fee4 image: Fix wic environment issues
The wic environment function needs to run after the rootfs size is
setup. We move this code to a specific task, and depend on that task
from the wic images and other places its needed.
This fixes:

======================================================================
FAIL: test_image_env (oeqa.selftest.wic.Wic)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 106, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 218, in test_image_env
    self.assertTrue(var in content, "%s is not in .env file" % var)
AssertionError: False is not true : ROOTFS_SIZE is not in .env file

(From OE-Core rev: 606f9e2d7d8d389c8d4f5c3090139d3bb780e09c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:24:46 +00:00
Richard Purdie 1da8f52b67 insane: Start to clean up do_configure_qa code
This cleans up the do_configure_qa code so that the exit status from
package_qa_handle_error is handled correctly.

It also converts package_qa_check_license to use our standard QA check
configuration interface through package_qa_handle_error rather than
a mix of return values, bb.fatal and bb.build.FuncFailed.

Due to the merging of multiple lines into one message, we need to
tweak a QA test to account for this.

(From OE-Core rev: fbdf977a8094bb1e0baca85ffb3ed7f326986639)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:24:46 +00:00
Ross Burton 5aa3b93009 oeqa/selftest/recipetool: update for libjpeg-turbo migration
The recipe creation test of libmatchbox now depends on libjpeg-turbo, not jpeg.

(From OE-Core rev: 58bb2d82f4f1b111641c480a27836be6119ee279)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 13:40:17 +00:00
Daniel Istrate c2bda6c000 scripts/oe-selftest: Allow to run tests on random/all MACHINEs
Add an option for random MACHINE into oe-selftest:
--machine [random/all]
1. random: will set a random MACHINE for each test
2. all: will run tests for all machines

Custom machine sets only weak default values (??=) for MACHINE in machine.inc.
This let test cases that require a specific MACHINE to be able to
override it, using (?= or =).

e.g.:
oe-selftest --run-tests signing --machine random -->
will run all tests switching MACHINE randomly for each test

oe-selftest --run-tests signing --machine all -->
for each machine will run all tests

oe-selftest --run-all-tests --machine random

Also update oeqa/selftest/base.py to accomodate this feature.

Fix for [YOCTO #5880].

(From OE-Core rev: 4a9c3653eecd9a3c1b45bab5e16c8d679c55f8bd)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 13:40:17 +00:00
Daniel Istrate 8e1435eb71 selftest: Added testcase decorators for 2 tests
1391 for test_devtool_add_fetch_simple from devtool
1392 for test_recipetool_create_simple from recipetool

(From OE-Core rev: d6ee070127a08be98958bbb8b11c80bb64165dc7)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 13:40:16 +00:00
Daniel Istrate 4ec2da71db selftest: moved tc test_buildhistory_does_not_change_signatures
Moved test_buildhistory_does_not_change_signatures from
buildhistory/BuildhistoryBase to buildoptions/BuildhistoryTests.

The test being in the base class was causing it to run
multiple times.

Fix for [YOCTO #8867]

(From OE-Core rev: 975e67e28ccba5dcb0fced43c1f9e7da183dc201)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 13:40:16 +00:00
Ross Burton 09705a4af0 oeqa/selftest: support sets in devtool comparisons
The devtool and recipetool tests do literal string comparisons, but for some
fields the ordering could be irrelevant and potentially non-deterministic.  For
example, the recipetool_create_simple test started failing with:

AssertionError: 'GPLv2 Unknown' != 'Unknown GPLv2' : values for LICENSE do not match

The ordering of the LICENSE field isn't relevant.  So, if the expected value is
a set(), split the string into a set too and compare those.

(From OE-Core rev: dab1b0ad42f08eb547732e854ba28a4cf0a23107)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:20 +00:00
Daniel Istrate ab79287688 selftest: Added MACHINE = "qemux86" to tests that use runqemu
It makes sense for tests that use runqemu to have MACHINE set as qemu.
This also avoid issues when running oe-selftest with --arch random/all
option.

(From OE-Core rev: 169e1eaa4fc5ed03e2307b68686a7f5b1db37a36)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:17 +00:00
Paul Eggleton 9da9308781 oe-selftest: devtool: add more explicit check for ls output
test_devtool_deploy_target is failing on the Yocto Project autobuilder
apparently when it attempts to cut out some fields from the list. It
doesn't fail here and I can't see what the problem lines are, so add a
check for lines with too few fields so we can get a look at them next
time it fails.

(From OE-Core rev: 2b19c74332c3899c84708946d749f88c4416cf73)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:14 +00:00
Paul Eggleton c2435b1181 oe-selftest: add tests for simple devtool add / recipetool create URL case
Add an oe-selftest test case for the newly supported syntax with only
the remote URL specified (auto-detecting name and version).

(From OE-Core rev: 7c7df9f62fe15578af0420c63e320c317e058708)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:14 +00:00
Paul Eggleton ebe5f0b872 recipetool: create: basic extraction of name/version from filename
Often the filename (e.g. source tarball) contains the name and version
of the software it contains.

(This isn't intended to be exhaustive, just to catch the common case.)

(From OE-Core rev: 944eacfb849ee69b41e12c9de4f264406281ac6a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:13 +00:00
Paul Eggleton db5f9645ad recipetool: create: support extracting name and version from build scripts
Some build systems (notably autotools) support declaring the name and
version of the program being built; since we need those for the recipe
we can attempt to extract them. It's a little fuzzy as they are often
omitted or may not be appropriately formatted for our purposes, but it
does work on a reasonable number of software packages to be useful.

(From OE-Core rev: 3b3fd33190d89c09e62126eea0e45aa84fe5442e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:13 +00:00
Daniel Istrate d4b5a1f171 selftest/buildhistory.py: Test buildhistory does not change sigs
[YOCTO #5953] Add a test to ensure buildhistory does not
change signatures.

Also removed unused imports.

(From OE-Core rev: 9e8f5ff6b0bd6cffcbb991d75487ab6005974000)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-22 16:08:49 +00:00
Daniel Istrate f80f8baa6f oeqa/selftest: Added testcase decorators for 2 testcases
bblayers: test_bitbakelayers_showrecipes    1384
wic:      test_directdisk_bootloader_config 1385

(From OE-Core rev: eeb3382f38f0cb9188cccb4d32deb38be0b50f67)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16 12:12:15 +00:00
Mariano Lopez d7baeb5fad selftest/wic.py: Add test for custom bootloader config
This change just add anoher test to the wic module.
It will try to create a image with a custom bootloader
configuration. This test will use the example image
directdisk-bootloader-config to test the configfile
option for the bootloaders.

[YOCTO #8728]

(From OE-Core rev: 567cb51f15354c0398b986e32011420a5f3dd090)

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>
2015-12-09 08:48:25 +00:00
Paul Eggleton 0fe742674e devtool: disable creating workspace for extract and search subcommands
For subcommands that don't actually involve the workspace, don't
auto-create the workspace.

(From OE-Core rev: 90cba7992bc1d227e242666cd486414bd4a45f7e)

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>
2015-12-01 21:32:03 +00:00
Ross Burton a6c68d85a9 oeqa/selftest/sstatetests: prettier output for allarch test
Instead of creating two lists of full paths and comparing them which in failure
produces a list of every stamp file (so all tasks, twice), reduce the filename
down to a recipe/task->hash dictionary and compare those, meaning unittest
shows the differences in the dictionaries.

In the future get_files() should be generalised so all tests in this class can
use it, and find a pair of hashes that don't match and run diffsigs on them.

(From OE-Core rev: b612628081b81b50965ae9454df4b2747c6997b2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24 15:55:41 +00:00
Daniel Istrate 92328b43bc oeqa/selftest/signing: Added new test for signing sstate.
[YOCTO #8182] Optional signing sstate archives and signature verification
[YOCTO #8559] Signing sstate archives with custom dir for gpg keys

(From OE-Core rev: 6a462fbb11db2085e4b6763a601c7fc4ac0025c8)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24 15:55:41 +00:00
Daniel Istrate fbb03a8c90 oeqa/selftest/signing: New test for Signing packages in the package feeds.
[YOCTO # 8134] This test verifies features introduced in bug 8134.

It requires as resources the files from meta-selftest/files/signing:
For 'gpg --gen-key' the used input was:
key: RSA
key-size: 2048
key-valid: 0
realname: testuser
email: testuser@email.com
comment: nocomment
passphrase: test123

(From OE-Core rev: 6b9d22bfd5414b517a1f0468e1229dfa2294b5fd)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24 15:55:41 +00:00
Paul Eggleton 8b2b068064 oe-selftest: add test for bitbake-layers show-recipes
Add a test for bitbake-layers show-recipes including the recently
added -i option.

(From OE-Core rev: da2733ad91cdff8cae2848fec5377ca777820d6b)

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>
2015-11-16 11:39:39 +00:00
Paul Eggleton 480bbaee58 oeqa/selftest/layerappend: fix test if build directory is not inside COREBASE
Fix test_layer_appends to work when build directory is not inside
COREBASE.

Fixes [YOCTO #8639].

(From OE-Core rev: 0f146e77655d153d3f9a59e489265450f08c6ad7)

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>
2015-11-16 11:39:39 +00:00
Paul Eggleton a301f6e3b8 oeqa/selftest/devtool: fix test if build directory is not inside COREBASE
Fix test_devtool_update_recipe_git to work when build directory is not
inside COREBASE.

Fixes [YOCTO #8639].

(From OE-Core rev: 0225888207f82e5f1d9e3dffb7c342a10169aea3)

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>
2015-11-16 11:39:39 +00:00
Daniel Istrate 426a9b78d0 oeqa/selftest: Added testcase decorators.
Added testcase decorators for testopia integration.

(From OE-Core rev: 9c7ffd397c8232d53c87017e58e03e3056863edf)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:28 +00:00
Ross Burton 2d008033c5 oeqa/selftest: improve config writing and cleanup
The selftest.inc configuration file is deleted in both tearDown() and setUp() so
there's no need to use addCleanup() to remove statements from it.

Use write_config instead of append_config if the intention is to start from an
empty config file, for clarity.

Finally remove some misleading comments that claim that append_config() writes
to local.conf when it doesn't.

(From OE-Core rev: ad33259b507914bfc8de92d1df12e0974157900e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-21 22:56:07 +01:00
Ross Burton 1881564cdd oeqa/selftest/wic: remove numbers from test names
There isn't any required ordering of tests, and the numbers meant that the tests
didn't appear in oe-selftest --list-classes.

(From OE-Core rev: 2a4ecc88ca10ef6abe55dddb96842b579b73497c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-21 22:56:07 +01:00
Ross Burton 2ac34d2a19 oeqa/selftest: clean up selftest.inc in teardown
Test cases may want to do call bitbake in setUpClass() but at that point the
previous selftest.inc is still present which could change the build
configuration and result in any built artifacts being removed in the next
bitbake invocation as part of the sysroot clean up.

Resolve this by cleaning selftest.inc in the tearDown, the clean in setUp should
be considered a safety net.

(From OE-Core rev: 573bd03a7844a5ad762533f65f41214df31cd197)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-21 22:56:07 +01:00