summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/wic.py
Commit message (Collapse)AuthorAgeFilesLines
* selftest: wic: fix test_qemuEd Bartosh2017-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: bda4e3cceda2205a0a5d916ef5b674df560d43f9) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: selftest: add test for sdimage-bootpartEd Bartosh2016-10-071-0/+8
| | | | | | | | | 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>
* wic: selftest: add test for systemd-bootdiskEd Bartosh2016-10-071-0/+7
| | | | | | | | | 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>
* wic: oe-selftest: build bmap-tools-nativeEd Bartosh2016-07-201-1/+1
| | | | | | | | | | | | | | | | 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>
* oe-selftest: wic: add test_bmap test caseEd Bartosh2016-05-191-0/+8
| | | | | | | | | | 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>
* Revert "oeqa/selftest/wic: add test case for sparse images"Ross Burton2016-04-131-13/+0
| | | | | | | | | This reverts commit 43150ab7ec63d804e8a998ecee9d00295b8b2bc7. (From OE-Core rev: d7d06cd7390fa02f866ba5414efc3924ceecfb4e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: add test case for sparse imagesJoshua Lock2016-04-091-0/+13
| | | | | | | | | | | | 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>
* selftest: Added testcase decorator to testsDaniel Istrate2016-03-311-0/+1
| | | | | | | | | | | | | | 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>
* oe-selftest: generate .env only in test_image_envEd Bartosh2016-03-291-1/+2
| | | | | | | | | | | 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>
* wic: Update after task ordering changesRichard Purdie2016-03-281-1/+1
| | | | | | | | | 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>
* oe-selftest: don't use specific tasksEd Bartosh2016-02-151-1/+1
| | | | | | | | | | | | | | | | | 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>
* oe-selftest: pylinted wic testsEd Bartosh2016-02-151-9/+9
| | | | | | | | | | | | | | | | | | 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>
* oe-selftest: add new wic testcaseEd Bartosh2016-02-151-1/+11
| | | | | | | | | | | | | | 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>
* wic-image-minimal: change IMAGE_FSTYPESEd Bartosh2016-02-151-1/+1
| | | | | | | | | | | | | | | | 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>
* image: Fix wic environment issuesRichard Purdie2016-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* oeqa/selftest: Added testcase decorators for 2 testcasesDaniel Istrate2015-12-161-1/+1
| | | | | | | | | | | 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>
* selftest/wic.py: Add test for custom bootloader configMariano Lopez2015-12-091-0/+8
| | | | | | | | | | | | | | | | 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>
* oeqa/selftest/wic: remove numbers from test namesRoss Burton2015-10-211-23/+23
| | | | | | | | | | 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>
* oeqa/selftest/wic: fix cleaningRoss Burton2015-10-211-11/+8
| | | | | | | | | | | | | 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>
* oeqa/selftest/wic: corrected testcase decorator for test18_iso_imageDaniel Istrate2015-10-211-1/+1
| | | | | | | | | | 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>
* oe-selftest: wic: fix LocalSetupEd Bartosh2015-10-071-2/+2
| | | | | | | | | | | | | | 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>
* oeqa/selftest/wic: Use SetupLocal instead of SetupRichard Purdie2015-10-011-1/+1
| | | | | | | | | | | 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>
* oeqa/selftest/wic: Added testcase decorator to all testcases + fixed minor ↵Daniel Istrate2015-10-011-4/+29
| | | | | | | | | 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>
* wic: add test cases for 3 imagesEd Bartosh2015-09-031-0/+21
| | | | | | | | | | 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>
* oe-selftest: wic: configure a buildEd Bartosh2015-09-031-2/+11
| | | | | | | | | | | | | | | | 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>
* oe-selftest: wic: fix test19_image_env test caseEd Bartosh2015-08-311-2/+4
| | | | | | | | | | | | 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>
* oe-selftest: test building wic image by bitbakeEd Bartosh2015-08-301-0/+14
| | | | | | | | | | 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>
* oe-selftest: test generation of <image>.envEd Bartosh2015-08-301-0/+20
| | | | | | | | | | 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>
* wic: Test creation of iso imageMihaly Varga2015-08-241-0/+8
| | | | | | | | | | | 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>
* wic: Test rootfs plugin using rootfs pathsEd Bartosh2015-07-021-0/+17
| | | | | | | | | | 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>
* wic: Test rootfs plugin using image recipesEd Bartosh2015-07-021-0/+10
| | | | | | | | | | 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>
* wic: oe-selftest: Test image compressingEd Bartosh2015-06-271-0/+30
| | | | | | | | | 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>
* wic: oe-selftest: Add 3 tests of 'wic help' commandEd Bartosh2015-06-231-0/+12
| | | | | | | | | | 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>
* wic: Return error code when wic fails to invoke commandEd Bartosh2015-06-231-1/+10
| | | | | | | | | | | | | | | | | 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>
* oe-selftest: wic: Fix testcaseEd Bartosh2015-06-231-7/+10
| | | | | | | | | | | | | | | 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>
* wic: oe-selftest: Configure testing of gpt/UUID imageEd Bartosh2015-06-111-2/+2
| | | | | | | | | | | 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>
* wic: Test creation of directdisk image with GPT tableEd Bartosh2015-06-111-0/+6
| | | | | | | | | | | 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>
* oe-selftest: Build wic runtime requirements and images before testingEd Bartosh2015-05-241-1/+7
| | | | | | | | | | | | | | | | 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>
* wic tests: Move wic tests to oe-selftest infraEd Bartosh2015-05-031-0/+69
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>