Commit Graph

26 Commits

Author SHA1 Message Date
Robert Yang 5988b5c5d7 selftest/signing.py: RPM_GPG_PASSPHRASE_FILE -> RPM_GPG_PASSPHRASE
(From OE-Core rev: ce14964d99741f1a4579bae18da5013498c365fd)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Ross Burton adad26455d xcursor-transparent-theme: use a version glob in the selftest bbappend
(From OE-Core rev: 97f60234f517a2ad57cc9227dd8c8803aea36e86)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 16:58:11 +00:00
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
Ed Bartosh 9b6dc9b07e wic-image-minimal: use uuid for root partition
Used --uuid option to generate PARTUUID for root partion and
gpt partition type. As this image is used in runtime testing
under qemu it makes sense to ensure that this way of specifying
root partition works.

Added dependency to gptfdisk-native to wic-image-minimal recipe to
be able to create gpt partition table.

(From OE-Core rev: ba82867bfda54e86e1de5dc4a6ad7246254cf5c3)

(From OE-Core rev: 767d814b2e125e20839f204e17512ebe2aec8b95)

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 2100f821e7 wic-image-minimal: update .wks to boot by qemu
With below list of changes wic-image-minimal can be boot by qemu:
    - Changed device name sda -> vda.
    - Added root=/dev/vda2 to the kernel command line.
    - Changed mount point for core partition to /mnt to have it
      mounted on boot time.

(From OE-Core rev: f085274711f561f97a2c89f40bb0e89094973054)

(From OE-Core rev: 4c8d44a1be344c603bcdcb1911f609ac67e6be66)

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
Ross Burton e24123dc60 emptytest: exclude from world builds
This recipe is for testing purposes and shouldn't be built in world builds, as
it produces errors without being built in the selftest.

(From OE-Core rev: 11fd33dfeea6606494cd0381986523566c03e2eb)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:22 +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
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
Ross Burton e191120581 oeqa/selftest: verify that devtool can use plugins in other layers
In selftest we want to exercise devtool's ability to use plugins from other
layers, so add a basic command to reverse a string to meta-selftest and a test
in oe-selftest to call it.

(From OE-Core rev: 69f5bbc1041e15691af0b4845e2136957a4846a1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-21 22:56:06 +01:00
Alex Franco 3b7853a065 test-empty-image: rename from core-image-empty
As the empty image isn't a "core" image, and it's meant for testing

Additionally, don't set LICENSE as it is inherited from image

[YOCTO #7664]

(From OE-Core rev: 6d47b3c277a3bb0f031084c24903a3412d7f4550)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-19 17:57:59 +01:00
Richard Purdie d822764831 meta-selftest: Add qemux86copy machine
I know Martin finds something like this useful for testing sstate signatures,
this adds one to meta-selftest so we can use it from oe-selftest in the sstate
tests there too.

(From OE-Core rev: 7ed3364b7ca61b210fce5ed014ab700e24ee470b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:35 +01:00
Alex Franco be13cdb5f6 Empty image: core-image-empty recipe
Added core-image-empty recipe in meta-selftest/recipes-test/images

[YOCTO #7664]

(From OE-Core rev: 472d94a2441e8ba51e52dd03212e2d6754ac5c7c)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:29 +01:00
brian avery aff7e72611 meta-selftest: add error recipe and error-image
* The error recipe throws an error during compile

    * The error-image includes the error recipe

    * Initial target is toaster selenium testing

(From OE-Core rev: 1810d4ab3374d833cb4b68388b456dc7ddb3d685)

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-24 17:54:30 +01:00
Ed Bartosh e0b38f20a8 wic-image-minimal: add dependency to .wks
Added dependency to wic-image-minimal.wks to the recipe. This makes
bitbake to rebuild the image if .wks file changes.

(From OE-Core rev: 2bc3d2e378da6555cf02ed46b1082643e1c0fe88)

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>
2015-09-23 09:52:54 +01:00
Ed Bartosh 219d73a6fa wic: use ext4 in wic-image-minimal.wks
ext4 is used in canned wks files, so let's use it here too
for the sake of consistency.

(From OE-Core rev: bc056b69987bf54199d4452df8c4567dc23f32ae)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:52:54 +01:00
Ed Bartosh ce2cb456f4 wic: add dependencies to wic-image-minimal recipe
Added "DEPENDS =" line to the recipe to ensure that all tools required
for image creation are built.

(From OE-Core rev: 776b9572543db7203f8c44e06b838391209badc4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:52:53 +01:00
Leonardo Sandoval 8be95c5fbe devtool: add upgrade feature
Upgrades a recipe to a particular version and downloads the source code
into a folder. User can avoid patching the source code.

These are the general steps of the upgrade function:

   - Extract current recipe source code into srctree and create a branch
   - Extract upgrade recipe source code into srctree and rebase with
     previous branch. In case the rebase is not correctly applied, source
     code will not be deleted, so user correct the patches
   - Creates the new recipe under the workspace

[YOCTO #7642]

(From OE-Core rev: 4020f5d91b3e4d011150d5081d36215f8eab732e)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:51 +01:00
Ed Bartosh 7c0940196c wic-image-minimal: add wic image recipe and .wks
Added example of recipe and .wks file to create partitioned image.

This image is using quite complex partitioning scheme.
It uses its own rootfs to populate two partitions in two different ways.
It also uses core-image-minimal rootfs to populate another partition.

This is how wic reports about artifacts used to create this image:
  ROOTFS_DIR: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/core"]: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/backup"]: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  BOOTIMG_DIR: tmp/sysroots/qemux86-64/usr/share
  KERNEL_DIR: tmp/deploy/images/qemux86-64
  NATIVE_SYSROOT: tmp/sysroots/x86_64-linux

(From OE-Core rev: f7069cbfb8f1e8273584221999d0739f1ae173c4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 23:26:25 +01:00
Paul Eggleton fbfc06a969 recipetool: add appendfile subcommand
Locating which recipe provides a file in an image that you want to
modify and then figuring out how to bbappend the recipe in order to
replace it can be a tedious process. Thus, add a new appendfile
subcommand to recipetool, providing the ability to create a bbappend
file to add/replace any file in the target system. Without the -r
option, it will search for the recipe packaging the specified file
(using pkgdata from previously built recipes). The bbappend will be
created at the appropriate path within the specified layer directory
(which may or may not be in your bblayers.conf) or if one already exists
it will be updated appropriately.

Fairly extensive oe-selftest tests are also provided.

Implements [YOCTO #6447].

(From OE-Core rev: dd2aa93b3c13d2c6464ef0fda59620c7dba450bb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-20 21:41:04 +01:00
Paul Eggleton a976d63ae5 oe-selftest: add a test for devtool deploy-target
Whilst this test would seemingly be better placed as a runtime test,
unfortunately the runtime tests run under bitbake and you can't run
devtool within bitbake (since devtool needs to run bitbake itself).
Additionally we are testing build-time functionality as well, so
really this has to be done as an oe-selftest test.

This test does have a few perhaps unusual requirements in order to run:
 * pexpect is installed
 * MACHINE is set to one of the qemu machines
 * runqemu tap devices have been set up

(From OE-Core rev: 9dc16a8a87bef5dc408aefb256c01e2a4fe3563c)

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-03-20 11:27:48 +00:00
Randy Witt f0f6b234a7 lib/oeqa/selftest/lic-checksum: Verify failure when checksum changes.
The test added verifies that when a file with an absolute path in
LIC_FILES_CHKSUM changes without a corresponding change to the md5sum,
it triggers the license qa test again with a failure.

[Yocto #6450]

(From OE-Core rev: cab59ce08916c45c1d9da1cf9a92a67574f6c2c3)

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>
2015-03-10 10:47:44 +00:00
Paul Eggleton 9f8f4fd1f9 Basic recipe formatting fixes
Fix statement indenting and spacing issues that I happened to notice.

(From OE-Core rev: d11e297b007aba625b398c52952ec929c3b02b83)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 12:50:21 +00:00
Paul Eggleton cec8b230cf Replace one-line DESCRIPTION with SUMMARY
A lot of our recipes had short one-line DESCRIPTION values and no
SUMMARY value set. In this case it's much better to just set SUMMARY
since DESCRIPTION is defaulted from SUMMARY anyway and then the SUMMARY
is at least useful. I also took the opportunity to fix up a lot of the
new SUMMARY values, making them concisely explain the function of the
recipe / package where possible.

(From OE-Core rev: b8feee3cf21f70ba4ec3b822d2f596d4fc02a292)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 12:50:18 +00:00
Corneliu Stoicescu b9afc0d262 meta-selftest: create a new test layer to be used by oe-selftest script
Everything in this layer is meant to be used by tests called by
scripts/oe-selftest. These are helper recipes/appends to test various bitbake
options or scripts.
Currently most of these files here only have "include test_recipe.inc" which
is the file tests will actually use.

(From OE-Core rev: 71a5053eea2aa0055663ccb2318eda866df49bb7)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00