aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
AgeCommit message (Collapse)Author
2018-11-24selftest/wic: Improve error message for test_fixed_sizeRichard Purdie
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-11-24oeqa/selftest/wic: Ensure initramfs exists for test_iso_imageRichard Purdie
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-11-24oeqa/selftest/wic: Use a subdir of builddir, not /var/Richard Purdie
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-12-21oeqa/selftest/cases/wic: update OETestID decorator for test_qemuJoshua Lock
Test case ID 1422 is not correct for this issue, the correct test case ID for test_qemu is 1424. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18meta-selftest: wic: Add test for --use-uuid / --fsuuidTom Rini
- 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. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: selftest: add test_wic_rm_ext test caseEd Bartosh
Tested if 'wic rm' correctly removes files from the ext4 partition of the wic image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: selftest: add test_wic_cp_ext test caseEd Bartosh
Tested if 'wic cp' correctly copies files to the ext4 partition of the wic image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: selftest: add test_wic_ls_ext test caseEd Bartosh
Tested if 'wic ls' correctly lists directory contents of the ext* partition. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11oeqa/selftest: Add missing IDs to various test casesJose Perez Carranza
Add decorator @OETestID() with Tesopia TC-ID to the test cases that did not have it properly set. [YOCTO #11873] Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-27wic: setlftest: test expanding MBR imageEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30oe-selftest: wic: fix test_quemuEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27oe-selftest: wic: change mkfs.btrfs optionsEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21oe-selftest: wic: add test_mkfs_extraopts test caseEd Bartosh
Test new wks option --mkfs-extraopts with all filesystems supported by wic. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17selftest: fixed 5 wic test casesEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23selftest: Add Testopia ID to test casesJose Perez Carranza
Add decorator @OETestID() with proper Tesopia TC ID to the test cases that did not have it set. Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-14selftest: add test_wic_rm test caseEd Bartosh
Added test case for "wic rm" functionality. - remove file from vfat partition - remove directory from vfat partition Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14selftest: add test_wic_cp test caseEd Bartosh
Added test case for "wic cp" functionality. - copy file to vfat partition - copy directory to vfat partition Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14selftest: add new test case test_wic_lsEd Bartosh
Tested 'wic ls' functionality: - list of image partitions - list of directory content of vfat partition Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05oeqa/selftest/cases: Migrate test cases into the new oe-qa frameworkLeonardo Sandoval
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. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>