aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/wic.py
AgeCommit message (Collapse)Author
2016-03-29oe-selftest: generate .env only in test_image_envEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28wic: Update after task ordering changesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15oe-selftest: don't use specific tasksEd Bartosh
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) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15oe-selftest: pylinted wic testsEd Bartosh
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) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15oe-selftest: add new wic testcaseEd Bartosh
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) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15wic-image-minimal: change IMAGE_FSTYPESEd Bartosh
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) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19image: Fix wic environment issuesRichard Purdie
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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16oeqa/selftest: Added testcase decorators for 2 testcasesDaniel Istrate
bblayers: test_bitbakelayers_showrecipes 1384 wic: test_directdisk_bootloader_config 1385 Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-09selftest/wic.py: Add test for custom bootloader configMariano Lopez
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] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/wic: remove numbers from test namesRoss Burton
There isn't any required ordering of tests, and the numbers meant that the tests didn't appear in oe-selftest --list-classes. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/wic: fix cleaningRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/wic: corrected testcase decorator for test18_iso_imageDaniel Istrate
Changed testcase decorator for TC test18_iso_image from 1264 to 1346. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-03oe-selftest: wic: fix LocalSetupEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01oeqa/selftest/wic: Use SetupLocal instead of SetupRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-29oeqa/selftest/wic: Added testcase decorator to all testcases + fixed minor ↵Daniel Istrate
typos. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-02wic: add test cases for 3 imagesEd Bartosh
Added test cases to build qemux86_directdisk, mkgummidisk and mkefdisk images. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-02oe-selftest: wic: configure a buildEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-31oe-selftest: wic: fix test19_image_env test caseEd Bartosh
This test case fails on qemu machines as not all expected bitbake variables are present in .env file. Fixed by filtering out optional variables. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30oe-selftest: test building wic image by bitbakeEd Bartosh
Added test case to verify building of wic-image-minimal recipe and produced artifacts: manifest and bzipped partitioned image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30oe-selftest: test generation of <image>.envEd Bartosh
Added test case to check if <image>.env file is generated and contains bitbake variables used in wic code. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-24wic: Test creation of iso imageMihaly Varga
Added new wic testcase, for testing the creation of the hybrid iso image with isoimage-isohybrid plugin. Signed-off-by: Mihaly Varga <mihaly.varga@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02wic: Test rootfs plugin using rootfs pathsEd Bartosh
Added testcase to create multi-rootfs images using rootfs plugin with paths to rootfs directories in wic command line. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Test rootfs plugin using image recipesEd Bartosh
Added canned wks and testcase to create multi-rootfs images referring bitbake image recipes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-26wic: oe-selftest: Test image compressingEd Bartosh
Added 4 new testcases for 'wic --compress-with <compressor>' functionality. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: oe-selftest: Add 3 tests of 'wic help' commandEd Bartosh
Added tests for 'wic test overview', 'wic test plugins' and 'wic test kickstart' commands. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: Return error code when wic fails to invoke commandEd Bartosh
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] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23oe-selftest: wic: Fix testcaseEd Bartosh
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] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-11wic: oe-selftest: Configure testing of gpt/UUID imageEd Bartosh
Added runtime dependency to gptfdisk-native to wic test suite to be able to test modified directdisk-gpt with UUID support. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Test creation of directdisk image with GPT tableEd Bartosh
Added new wic testcase to the sute - creation of directdisk-gpt image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-23oe-selftest: Build wic runtime requirements and images before testingEd Bartosh
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] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-03wic tests: Move wic tests to oe-selftest infraEd Bartosh
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 Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>