summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
Commit message (Collapse)AuthorAgeFilesLines
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-06-181-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: 3248a9e3c5a197321b1c4417509b9309cc3bae97) 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>
* oeqa: Drop OETestIDRichard Purdie2019-05-201-59/+0
| | | | | | | | | | | | | These IDs refer to testopia which we're no longer using. We would now use the test names to definitively reference tests and the IDs can be dropped, along with their supporting code. (From OE-Core rev: 551153b0bd1ebbc05582f6014e3d88b9ce4a46d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Backported to keep in-sync with future qa changes] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: update test case test_qemuKai Kang2019-01-161-2/+4
| | | | | | | | | | | | | | | | | This test case boots the image in qemu and checks for mounted partitions. But the outputs of mount are different between sysvinit and systemd: sysvinit: /dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt systemd: /dev/sda1 /boot\r\n/dev/sda2 /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt So check mounted partitions by egrep rather than check output of runqemu. (From OE-Core rev: 8e3311d45ec68d74e934e966f67cf5102634981c) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: Fix/cleanup class setup codeRichard Purdie2018-07-301-16/+15
| | | | | | | | | | | | | | | | The code was using Wic instead of WicTestCase for image_is_ready and native_sysroot which was confusing some tests. Fix image_is_ready. For native_sysroot, convert the only user to just run the call itself as there is no point in executing this for all the other tests which don't use the value. Whilst here, move _get_image_env_path to the base class alongside its parent variabe and fix it to use WicTestCase. (From OE-Core rev: 3e83364ed7031d53f281216214b04c7acace844a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: clean up runCmd error code handlingRichard Purdie2018-07-251-110/+82
| | | | | | | | | | | runCmd handles checking exit 0 internally unless specified otherwise and its error messages are much more useful including the failed command output. Clean up the unneeded 0 exit code checks in the wic tests. (From OE-Core rev: 394f7d4efe80e390e2c9b0be5e6d10954395a82b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: Improve error message for test_fixed_sizeRichard Purdie2018-07-251-2/+0
| | | | | | | | | | | | | Currently this can fail with a message like 127 != 0 which is unhelpful. If we remove the ignore_status=False, the debugging from runCmd is much more helpful printing status.output. Also remove the now unneeded exit code check. (From OE-Core rev: 1aa7471b11aedc68de5116c461fe73152e3985fd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Split tests into two class groupsRichard Purdie2018-07-161-5/+9
| | | | | | | | This improves test parallelism. (From OE-Core rev: 26e04b23ba1b6942aa7c7df478d41dfe7b73e6e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Ensure initramfs exists for test_iso_imageRichard Purdie2018-07-161-1/+1
| | | | | | | | | | | | | | AssertionError: Command 'wic create mkhybridiso --image-name core-image-minimal -o /var/tmp/wic.oe-selftest/' returned non-zero exit status 1: ERROR: _exec_cmd: gzip -f -9 -c /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio > /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio.gz returned '1' instead of 0 output: gzip: /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio: No such file or directory This is because in a clean build directory, the initramfs may not be rebuilt. Add a call to ensure it is built to avoid the error. (From OE-Core rev: 2a80fa234d31992691a157425e8990db30158fd1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Use a subdir of builddir, not /var/Richard Purdie2018-07-161-1/+1
| | | | | | | | | Using /var/ leave wic open to races with other processes on the system, use a subdir of builddir instead to avoid this. (From OE-Core rev: e07ec908ce7f26143a7bdf0a07a1230c0fd6ac87) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* btrfs-tools: update to 4.15.1Alexander Kanavin2018-05-041-1/+1
| | | | | | | | | | | | | | | Drop upstreamed 0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch Add ftw-subdir-walk.patch as it resolves the RECIPE_NO_UPDATE_REASON. Add --disable-zstd as libzstd isn't provided in oe-core. Fix wic testcase, as the minimal fs size is now bigger. (From OE-Core rev: 94b645aa77a4193371e8c77ddc477ec00d858961) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/cases/wic: update OETestID decorator for test_qemuJoshua Lock2017-12-211-1/+1
| | | | | | | | | | Test case ID 1422 is not correct for this issue, the correct test case ID for test_qemu is 1424. (From OE-Core rev: d214b1dc9339c4873156934f5291b9373a11471f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta-selftest: wic: Add test for --use-uuid / --fsuuidTom Rini2017-12-181-2/+5
| | | | | | | | | | | | | | - Mount a '/media' partition to wic-image-minimal.wks with a known UUID. - In test_qemu, sort our output from checking the output of 'mount' as it may not be stable. Also, do not check the exit code as passing any output to cut ensures a 0 exit code. - Check for a 'UUID=' line in /etc/fstab with out expected output. (From OE-Core rev: 6d9396b26218f3234701944f385d5c36face8121) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: selftest: add test_wic_rm_ext test caseEd Bartosh2017-09-111-0/+23
| | | | | | | | | | | Tested if 'wic rm' correctly removes files from the ext4 partition of the wic image. (From OE-Core rev: 693b555e4f419b5d24f9f86c44354866492f8bb0) 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: selftest: add test_wic_cp_ext test caseEd Bartosh2017-09-111-0/+30
| | | | | | | | | | | Tested if 'wic cp' correctly copies files to the ext4 partition of the wic image. (From OE-Core rev: 7970907c72d9533fd63d2c8796bbeb9be86b3fc3) 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: selftest: add test_wic_ls_ext test caseEd Bartosh2017-09-111-0/+16
| | | | | | | | | | | Tested if 'wic ls' correctly lists directory contents of the ext* partition. (From OE-Core rev: 6ae3ff957b5c28c7853966cd5a7665772c594546) 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>
* oeqa/selftest: Add missing IDs to various test casesJose Perez Carranza2017-09-111-0/+1
| | | | | | | | | | | | | Add decorator @OETestID() with Tesopia TC-ID to the test cases that did not have it properly set. [YOCTO #11873] (From OE-Core rev: aa5b9edbd9c4495befe1912a5b401b536be39d5b) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: setlftest: test expanding MBR imageEd Bartosh2017-08-271-0/+53
| | | | | | | | | | | | | Added test_expand_mbr_image test case to the wic oe-selftest suite. The test expands directdisk wic image to 1Gb target, checks if it's expanded correctly and boots it in qemu to make sure the image is bootable, i.e. bootloader, kernel, boot and root partitions are still functional. (From OE-Core rev: 83739174be5b3fabd7df559a35ac6407d82a6280) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: wic: fix test_quemuEd Bartosh2017-07-301-1/+1
| | | | | | | | | | | This test case boots the image in qemu and checks for mounted partitions. As /boot is mounted automatically the test case fails. Fixed this by adding /boot to the list of mounted partitions. (From OE-Core rev: e5ba124b01ff6883a08c91daa47343dd09f6260d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: wic: change mkfs.btrfs optionsEd Bartosh2017-07-271-1/+1
| | | | | | | | | | | | | | | | test_mkfs_extraopts test case fails on ab with error caused by using -K --mixed options: output: extent-tree.c:2696: btrfs_reserve_extent: BUG_ON `ret` triggered, value -28 For this test case it's not important to use particular options, so changing options to anything less influential is OK. Changed extra options for mkfs.btrfs to '--quiet' to fix the failure. (From OE-Core rev: 6a1489f8deb2b26181ca340a0f6ef62aa18a5188) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: wic: add test_mkfs_extraopts test caseEd Bartosh2017-07-211-0/+19
| | | | | | | | | | | Test new wks option --mkfs-extraopts with all filesystems supported by wic. (From OE-Core rev: 79e853c450708e1e06684cf1216337cbad964770) 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>
* selftest: fixed 5 wic test casesEd Bartosh2017-07-171-4/+19
| | | | | | | | | | | | | | | | | Added core-image-minimal -> syslinux dependency to ensure syslinux artifacts are available from core-image-minimal build. This should fix test_iso_image, test_bootloader_config and test_default_output_dir test cases. Used --native-sysroot in test_image_vars_dir_long and test_image_vars_dir_short test cases to point out to wic-tools native sysrtoot. (From OE-Core rev: b7bcc4ba756aa3941c89999e9d6761738ea5bb05) 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>
* selftest: Add Testopia ID to test casesJose Perez Carranza2017-06-231-0/+19
| | | | | | | | | | | Add decorator @OETestID() with proper Tesopia TC ID to the test cases that did not have it set. (From OE-Core rev: d7bc697534db911a3ce98537d772d87482a0f702) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add test_wic_rm test caseEd Bartosh2017-06-141-0/+30
| | | | | | | | | | | Added test case for "wic rm" functionality. - remove file from vfat partition - remove directory from vfat partition (From OE-Core rev: fc42914d426ad2dad8c3026668726c003b3ab10b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add test_wic_cp test caseEd Bartosh2017-06-141-1/+45
| | | | | | | | | | | Added test case for "wic cp" functionality. - copy file to vfat partition - copy directory to vfat partition (From OE-Core rev: cb416d1feea042bcdedc9f522d588fef2c4929bc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add new test case test_wic_lsEd Bartosh2017-06-141-0/+20
| | | | | | | | | | | Tested 'wic ls' functionality: - list of image partitions - list of directory content of vfat partition (From OE-Core rev: 3b271f6a40d7ef93fff9700dd8ac98bddd92d581) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/cases: Migrate test cases into the new oe-qa frameworkLeonardo Sandoval2017-06-061-0/+793
New framework has different classes/decorators so adapt current test cases to support these. Changes include changes on base classes and decorators. Also include paths in selftest/__init__.py isn't needed because the loader is the standard unittest one. (From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>