Commit Graph

75 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
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
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
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
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
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
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
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
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
Ed Bartosh 253b8d7d58 selftest: fixed 3 wic test cases
Fixed test_systemd_bootdisk, test_wic_image_type and test_qemu
test cases by building core-image-minimal with correct configuration.

(From OE-Core rev: 897fe85d34302953c98d07ade4fa2dd749ae2d22)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh 78d4d09cf2 selftest: wic: don't set WKS_FILE
Setting WKS_FILE variable should be done only when
wic image is expected to be built by bitbake.
If it's set for all images it breaks image building in
some cases.

(From OE-Core rev: 46b84310f7df157c2ef290a60f5c2136d4206f09)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh 657f1e44b1 wic: fixed test_iso_image test case
Fixed isoimage-isohybrid plulgin and correspondent wic tet case:
- used wic-tools target when getting varlue of STAGING_LIBDIR variable
- ensured that image is built with efi and hddimg enabled

(From OE-Core rev: 5878484da64c38c7fde45bb06d76e22e608eb022)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh dc4a612e60 image.bbclass: put .env files to ${STAGING_DIR}/imgdata/
As STAGING_DIR_TARGET started to point to a recipe specific
sysroot wic is not able to add .env files when .wks file refers
to multiple rootfs recipes.

Used STAGING_DIR instead of STAGING_DIR_TARGET to make the
directory with .env files the same for all recipes.

(From OE-Core rev: 3797cfd7473d3f9b7c0d999dcf9cd9608c8c7c6c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:17 +00:00
Ed Bartosh 168f62e427 wic: fix getting path of native sysroot
wic used STAGING_DIR_NATIVE variable as a path to native sysroot.
This doesn't work with recipe specific sysroots as STAGING_DIR_NATIVE
points to the native sysroot of the current recipe.

Used RECIPE_SYSROOT_NATIVE variable of wic-tools recipe
to fix the issue.

(From OE-Core rev: de9d7d14cd03e4dfc5812890a53c79b706b56537)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:17 +00:00
Ed Bartosh a79b32c75a selftest: build wic-tools in the Wic.setUp
Built wic-tools recipe instead of set of tools recipes
to ensure that all tools are available from one recipe sysroot.

(From OE-Core rev: 52ce14d5ea667ffd319fdb3e147b6eb29505cf8e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:17 +00:00
Alejandro Hernandez 3f990e1b17 wic: Remove gummiboot test
Weve now migrated to systemd-boot, the gummiboot test on wic is no longer necessary

(From OE-Core rev: 0a8abc7681edec5f128ceb757559c5a50f139a9c)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-09 13:39:11 +00:00
Jair Gonzalez dd37336b4d selftest/wic: extending test coverage for WIC script options
The previous WIC script selftest didn't cover all of its command line
options. Some option variants were included in existing test cases and
the following tests were added to complete covering them:

1552 Test wic --version
1553 Test wic help create
1554 Test wic help list
1555 Test wic list images
1556 Test wic list source-plugins
1557 Test wic listed images help
1558 Test debug
1563 Test skip build check
1564 Test build rootfs
1559 Test image vars directory selection
1562 Test alternate output directory

(From OE-Core rev: b4d52c3f1e0ad2c14028ff08c0938d1b24b7f648)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-22 08:50:17 +00:00
Jair Gonzalez f8745bb519 selftest/wic: reorganizing test methods by functionality
Part of the test methods were rearranged to group them by
functionality and identify more easily opportunities to extend
coverage.

(From OE-Core rev: f290a2c9b946e00dbc451592691596c656d49042)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-22 08:50:17 +00:00
Jair Gonzalez 285c2ed90e selftest/wic: code cleanup
The following changes were added to improve the code readability:

- Removed redundant backlashes between brackets
- Aligned continuation lines according to PEP8 style
- Refactored command execution in the next methods for enhanced
  legibility:

  - test_build_image_name(self)
  - test_gpt_image(self)
  - test_qemux86_directdisk(self)
  - test_rootfs_indirect_recipes(self)
  - test_iso_image(self)
  - test_mkgummidisk(self)
  - test_mkefidisk(self)
  - test_directdisk_bootloader_config(self)
  - test_qemu(self)
  - test_bmap(self)
  - test_systemd_bootdisk(self)
  - test_sdimage_bootpart(self)

(From OE-Core rev: 5ba21836fe3c061a6271f855a9e26c66004d330a)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-22 08:50:17 +00:00
Jair Gonzalez c48c0f38b1 selftest/wic: adding Testopia ID numbers to test cases missing it
The following test cases were assigned an ID number on Testopia:

1496 Test generation of .bmap file
1560 Test creation of systemd-bootdisk image
1561 Test creation of sdimage-bootpart image

(From OE-Core rev: b53e432206eaba7c6c67e4689c25b5e62d7ee9b2)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-22 08:50:17 +00:00
Richard Purdie 8ccf396c72 Revert "selftest/wic: extending test coverage for WIC script options"
This reverts commit 68cb3180c1b0dcee50812b21f98850d188d8621b as this wasn't
ready for merge and there are new better versions.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-20 17:06:38 +00:00
Jair Gonzalez aa1c50a32b selftest/wic: extending test coverage for WIC script options
The previous WIC script selftest didn't cover all of its command
line options. The following test cases were added to complete
covering them:

1552 Test wic --version
1553 Test wic help create
1554 Test wic help list
1555 Test wic list images
1556 Test wic list source-plugins
1557 Test wic listed images help
1558 Test wic debug, skip-build-check and build_rootfs
1559 Test image vars directory selection
1562 Test alternate output directory

In addition, the following test cases were assigned an ID number on
Testopia:

1560 Test creation of systemd-bootdisk image
1561 Test creation of sdimage-bootpart image

Finally, part of the test methods were rearranged to group them by
functionality, and some cleanup was made to improve the code's
compliance with PEP8 style guide.

Fixes [YOCTO 10594]

(From OE-Core rev: 3d2ac67765020885a0996ebdd97a576ba37dbec0)

(From OE-Core rev: 68cb3180c1b0dcee50812b21f98850d188d8621b)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-20 15:22:16 +00:00
Ed Bartosh 1b32c6ed02 selftest: wic: fix test_qemu
Setting WKS_FILE variable in qemux86-64 made wic test to
use wrong wks file to produce an image and resulted in
test_qemu failure.

Used conditional assignment in qemux86-64 and explicitly
set WKS_FILE in wic testing suite to make the suite to use
wic-image-minimal.wsk. This should fix test_qemu failure.

(From OE-Core rev: 3bca4d18c2712e3b154bacfb917f0a749ebaddeb)

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>
2016-12-07 10:38:06 +00:00
Ed Bartosh 09a9de45e1 wic: selftest: add test for sdimage-bootpart
Test creation of sdimage-bootpart image

(From OE-Core rev: 8b18568591f66aa9770798bc61123898de92b8a9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07 16:43:58 +01:00
Ed Bartosh bed4a13440 wic: selftest: add test for systemd-bootdisk
Test creation of systemd-bootdisk image.

(From OE-Core rev: b8eef88536b944ea35664b9a6a9496fb0a3f7988)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07 16:43:58 +01:00
Ed Bartosh 05084640e6 wic: oe-selftest: build bmap-tools-native
bmap-tools-native is required to generate .bmap file. Without it
wic fails with this error when run with --bmap option:
    Error: A native program bmaptool required to build
           the image was not found

Added bmap-tools-native to the list of requirements to build
in Wic.setUpLocal method.

(From OE-Core rev: dd11ab551f9bf1d8761d0430f19510a9caa53a12)

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>
2016-07-20 10:28:50 +01:00
Ed Bartosh 978d450a52 oe-selftest: wic: add test_bmap test case
Tested generation of .bmap file using wic --bmap command
line option.

(From OE-Core rev: 1f21c46e517685ff1363d3b6f4fd840300b1930b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19 09:05:19 +01:00
Ross Burton e80800e005 Revert "oeqa/selftest/wic: add test case for sparse images"
This reverts commit 43150ab7ec.

(From OE-Core rev: d7d06cd7390fa02f866ba5414efc3924ceecfb4e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13 10:12:52 +01:00
Joshua Lock 43150ab7ec oeqa/selftest/wic: add test case for sparse images
Add a testcase to build a directdisk image and check that the
used disk size is less than the apparent size, as wic now
assembles images as sparse files.

(From OE-Core rev: 2b8299eb6b911e64d9a05b86c07b489d15eeaa5e)

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:45 +01:00
Daniel Istrate ede11b6b42 selftest: Added testcase decorator to tests
1418	test_recipetool_create_cmake
1422	test_qemu
1423	test_devtool_add_git_local
1433	test_devtool_upgrade_git
1434	test_sanity_unsafe_binary_references
1435	test_read_only_image

(From OE-Core rev: f3b46fe73b68db96ba245fcead74dc070ab10518)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 09:15:05 +01:00
Ed Bartosh 528a890554 oe-selftest: generate .env only in test_image_env
Most of wic functionality doesn't depend on .wicenv file,
so it's better to generate it only in test_image_env
test case where it's used.

(From OE-Core rev: caf9b41e1db7b565ef977200195d57b385127de9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-29 23:20:12 +01:00
Richard Purdie 92b2bc5d27 wic: Update after task ordering changes
We need the wic env files to be available and this no longer happens automatically
so ensure we have them by specifying a specific task dependency.

(From OE-Core rev: 15e10957a0c9f65eaa119f8cb4f817c2fe3d580f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:49 +01: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