Commit Graph

26 Commits

Author SHA1 Message Date
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
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 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
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 a66ed339d9 oeqa/selftest/wic: fix cleaning
In some situations the native tools built in setUpClass() are wiped from the
sysroot by the time the tests are executed, likely due to the cleanup performed
in the base setUp() method.

Avoid this by doing all of the preparatory building in setUpLocal.

(From OE-Core rev: 2285ff17a391fa22f2095da701bc6f2c9615ae7b)

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
Daniel Istrate b67b1a426d oeqa/selftest/wic: corrected testcase decorator for test18_iso_image
Changed testcase decorator for TC test18_iso_image from 1264 to 1346.

(From OE-Core rev: b845330133de6d47b63a03208aa083cf08801634)

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-21 22:56:06 +01:00
Ed Bartosh 07fc8c2dfb oe-selftest: wic: fix LocalSetup
Appended required features to build config every time
LocalSetup is run to ensure that core-image-minimal is not
rebuilt due to configuration changes.

This should fix test22_mkgummidisk and test23_mkefidisk testcases as
they depend on specific features set in LocalSetup.

(From OE-Core rev: 037b757722093ced372eaae8cc9305ad2ea81ab5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-07 00:09:10 +01:00
Richard Purdie e5b9c2a9f2 oeqa/selftest/wic: Use SetupLocal instead of Setup
If we replace the code Setup method, we don't get the cleanup it performs
and this just resulted in failures on the autobuilder due to a stale
config fragment. Setup will call SetupLocal so this should be a safe
and easy fix to resolve the auobuilder failures.

(From OE-Core rev: 16957f5f1de0f1fb4052d5aef93ee10c893f4a38)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:38 +01:00
Daniel Istrate 790b6c7ead oeqa/selftest/wic: Added testcase decorator to all testcases + fixed minor typos.
(From OE-Core rev: 432e85d8879ed074e04306174398a53e4903f84f)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:33 +01:00
Ed Bartosh 4fd65df90f wic: add test cases for 3 images
Added test cases to build qemux86_directdisk, mkgummidisk and
mkefdisk images.

(From OE-Core rev: f2d75d76d1af9e4852637f60eac8dfc967431acb)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03 12:43:25 +01:00
Ed Bartosh bf41b06887 oe-selftest: wic: configure a build
Added MACHINE_FEATURES and IMAGE_FSTYPES variables to the build config
to ensure that bootimg and efi artifacts are built. This is needed to
build canned wic images that are using those artifacts.

Introduced class variable Wic.image_is_ready to avoid building image
more than once. It would be better to build image in setUpClass, which
is called only once, but add_config method can't be called in class method,
so we have to use this trick with class variable in setUp method.

(From OE-Core rev: c5bb95704e00e7afdbcb2e02c1fbc74f33e26481)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03 12:43:25 +01:00
Ed Bartosh beea25ec42 oe-selftest: wic: fix test19_image_env test case
This test case fails on qemu machines as not all expected bitbake
variables are present in .env file.

Fixed by filtering out optional variables.

(From OE-Core rev: dd76c276a8ebaa2e2ab17b819514589ab4507740)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-31 11:33:31 +01:00
Ed Bartosh 4f7b72a07d oe-selftest: test building wic image by bitbake
Added test case to verify building of wic-image-minimal recipe
and produced artifacts: manifest and bzipped partitioned image.

(From OE-Core rev: 9d12fe44fdb52aeb8aa2c5c2c83175a06a0c7224)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 23:26:26 +01:00
Ed Bartosh 70534141e7 oe-selftest: test generation of <image>.env
Added test case to check if <image>.env file is generated
and contains bitbake variables used in wic code.

(From OE-Core rev: eaa5ecd2e7ff30192e51793d1419c0198638936d)

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
Mihaly Varga e4cb847b32 wic: Test creation of iso image
Added new wic testcase, for testing the creation of the hybrid iso
image with isoimage-isohybrid plugin.

(From OE-Core rev: de3de340ba9c86c297bcb9fc1b1022dd05a195e7)

Signed-off-by: Mihaly Varga <mihaly.varga@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-24 23:46:56 +01:00
Ed Bartosh 673343414f wic: Test rootfs plugin using rootfs paths
Added testcase to create multi-rootfs images using rootfs plugin
with paths to rootfs directories in wic command line.

(From OE-Core rev: 8becfc2281282a2e63b3bf511936df36315c9cb1)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 23:08:36 +01:00
Ed Bartosh b42d7d26e1 wic: Test rootfs plugin using image recipes
Added canned wks and testcase to create multi-rootfs images referring
bitbake image recipes.

(From OE-Core rev: 723ed56eda0e64b9678b846ef2001465b15e0c1b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 23:08:35 +01:00
Ed Bartosh e6f29dd712 wic: oe-selftest: Test image compressing
Added 4 new testcases for 'wic --compress-with <compressor>' functionality.

(From OE-Core rev: 0ffc5c38ef28605abf815a47eb41923802d31df7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:50 +01:00
Ed Bartosh 4862a4c33a wic: oe-selftest: Add 3 tests of 'wic help' command
Added tests for 'wic test overview', 'wic test plugins' and
'wic test kickstart' commands.

(From OE-Core rev: 2009df2aa048bb51b7b3050b69a44fe414c4de9d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:35 +01:00
Ed Bartosh 40764a309d wic: Return error code when wic fails to invoke command
Return 1 if command doesn't exist or wic is called without
any commmand.
Return result of invoke_command as wic return code.

Added tests for unsupported command and no command.

Fixed typo in test case test02_createhelp spotted by this fix.

[YOCTO #7856]

(From OE-Core rev: ebd9f7b1da8ed556e98aab4d5f4e81707ac44b27)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:34 +01:00
Ed Bartosh 410e272591 oe-selftest: wic: Fix testcase
Fixed test05_build_artifacts testcase by using values of MACHINE
and BUILD_SYS bitbake variables in paths to artifacts.

Test was failing because of hardcoded machine(qemux86) and
build_sys(qemux86-poky-linux) in artifact paths.

[YOCTO #7730]

(From OE-Core rev: dda85cd420d47d97b0d0b0f294b37cd6066c541c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:30 +01:00
Ed Bartosh 998273aee2 wic: oe-selftest: Configure testing of gpt/UUID image
Added runtime dependency to gptfdisk-native to wic test suite to
be able to test modified directdisk-gpt with UUID support.

(From OE-Core rev: 16e7d43cd4a4d16e498152764a8dbc8b933eef89)

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-06-11 23:59:12 +01:00
Ed Bartosh 921ea71607 wic: Test creation of directdisk image with GPT table
Added new wic testcase to the sute - creation of directdisk-gpt
image.

(From OE-Core rev: 73762747dfda5013563f15b13bcb19b40d0f69d9)

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-06-11 23:59:11 +01:00
Ed Bartosh 29d5503a54 oe-selftest: Build wic runtime requirements and images before testing
Some native tools (syslinux, parted, mtools, etc) are required
by wic to produce images. Unit tests fail if the tools are
not available.

Baked tools and image-core-minimal used by wic before running tests.

[YOCTO #7730]

(From OE-Core rev: 379c9bb7ffae5b40c5450e968cdde600b6edd3f3)

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-05-24 07:19:20 +01:00
Ed Bartosh fd254d007f wic tests: Move wic tests to oe-selftest infra
Modified existing wic test modules to work with oe-selftest
infrastructure.

$ oe-selftest --run-tests wic
...
test01_help (oeqa.selftest.wic.Wic)
Test wic --help ... ok
test02_createhelp (oeqa.selftest.wic.Wic)
Test wic create --help ... ok
test03_listhelp (oeqa.selftest.wic.Wic)
Test wic list --help ... ok
test04_build_image_name (oeqa.selftest.wic.Wic)
Test wic create directdisk --image-name core-image-minimal ... ok
test05_build_artifacts (oeqa.selftest.wic.Wic)
Test wic create directdisk providing all artifacts. ... ok

----------------------------------------------------------------------
Ran 5 tests in 6.434s

OK

(From OE-Core rev: 2a7f16b19d78186ed6c2eb119ec102c645596b87)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-03 11:43:49 +01:00