summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/wic.py
Commit message (Collapse)AuthorAgeFilesLines
* selftest/wic.py: vda -> sdaRobert Yang2017-04-121-3/+3
| | | | | | | | | | | | Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and would use vda if no grep result, now we have set QB_DRIVE_TYPE to "/dev/sd" by default, and the device will be /dev/sda, so use sda to replace vda in the test case. (From OE-Core rev: a722016df3f452f7a870157a99a1abb7d97d8280) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: test wic sparse_copy APIEd Bartosh2017-04-121-0/+29
| | | | | | | | | | | | | Added new parameter 'api' to sparse_copy function to specify underlying filemap API to use. By default sparse_copy will try both available APIs. Added test case for sparse_copy to wic test suite. (From OE-Core rev: 88701cef6ba399e82f96ed1b0eef9a44ed8c1687) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: skip wic unit tests in case NLS is disableLeonardo Sandoval2017-04-101-1/+4
| | | | | | | | | | | | | | | | | | | | WIC test case requires wic-tools which in turn depends on intltool-native and gettext-native. However, if NLS is disable, the gettext-minimal-native is used instead of gettext-native causing a failure on intltool-native as seen below: checking for msgfmt... no checking for gmsgfmt... no configure: error: GNU gettext tools not found; required for intltool ERROR: Function failed: do_configure (log file is located at /home/lsandov1/poky/build/tmp/work/i586-poky-linux-musl/systemd-boot/232-r0/temp/log.do_configure.7518) ERROR: Task (/home/lsandov1/poky/meta/recipes-bsp/systemd-boot/systemd-boot_232.bb:do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 609 tasks of which 604 didn't need to be rerun and 1 failed. [YOCTO #10902] (From OE-Core rev: ccd2faca99331e010badbb78d42b0ee644ca1a0a) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove prepare_empty_partition_squashfsEd Bartosh2017-04-011-2/+1
| | | | | | | | | | | | | | | | | | | | There is not much sense in creation of empty squashfs partition. It's also not possible to create empty squashfs partition of specified size. Even more, prepare_empty_partition_squashfs method is absolutely broken. It raises exception when called and even its signature differs from the rest of of similar methods. It means that nobody uses it and it's safe to remove it. Removed prepare_empty_partition_squashfs method and testing of empty squashfs partition. (From OE-Core rev: 9152960f250cb4df1e559d747fb09005675a0d75) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: test creation of msdos partitionEd Bartosh2017-04-011-0/+1
| | | | | | | | | | | | Added msdos partition to the .wks file in test_fs_types wic test case. [YOCTO #11137] (From OE-Core rev: 044dd146d39542d0e6b598ee1dcadc49e0db3de9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fix incorrect fstypeEd Bartosh2017-04-011-1/+1
| | | | | | | | | Fixed typo in wks content: squash->squashfs (From OE-Core rev: cf06e6763d06e3e631bed85e2cb087f713808e6d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add test_image_bootpart_globbed test for wicEd Bartosh2017-04-011-0/+10
| | | | | | | | | | | | Test image-bootpart wic plugin with globbed value of IMAGE_BOOT_FILES variable to increase test coverage. [YOCTO #10618] (From OE-Core rev: 4da2526800de1d40b51db96b0d5ab44dbaff68ff) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add kickstart_parser test caseEd Bartosh2017-04-011-0/+12
| | | | | | | | | | | | Added test_kickstart_parser test case to test wks parser options not yet covered by tests. [YOCTO #10618] (From OE-Core rev: 36779a95f2e1e2c0d94ba81d30c8b1fc9dd161e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add wic test case test_fs_typesEd Bartosh2017-04-011-0/+19
| | | | | | | | | | | | Added wic test case to test all possible filesystem types for empty and not empty partitions. [YOCTO #10618] (From OE-Core rev: 95ec9e6b987706fac9bd410681f0950f957989bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add test_rawcopy_plugin test caseEd Bartosh2017-03-231-0/+16
| | | | | | | | | | | | This test case builds wic image using rawcopy plugin running wic directly. [YOCTO #10618] (From OE-Core rev: acbeaa37554f3546b036ff8ef9aebfe00f2537c6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: pylinted wic test suite.Ed Bartosh2017-03-231-24/+28
| | | | | | | | | Fixed long lines, indentation and one unused variable. (From OE-Core rev: a6dbe6e1630067164881c8d7efb44cb650cd043c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: test wic rawcopy pluginEd Bartosh2017-03-231-0/+16
| | | | | | | | | | | | | | | 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>
* wic: selftest: add tests for --fixed-size partition flagsMaciej Borzecki2017-03-221-0/+63
| | | | | | | | | | | | 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>
* wic: selftest: do not assume bzImage kernel imageMaciej Borzecki2017-03-221-1/+2
| | | | | | | | | | | 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>
* wic: selftest: avoid COMPATIBLE_HOST issuesMaciej Borzecki2017-03-221-1/+40
| | | | | | | | | | | | | | | | | 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>
* selftest: wic: replace directdisk with wictestdisk where possibleMaciej Borzecki2017-03-221-32/+32
| | | | | | | | | | | 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>
* wic: selftest: account for occasional newline in debugfs file namesMaciej Borzecki2017-03-141-4/+21
| | | | | | | | | | | | | | | | | | | | 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>
* selftest: test wic efi image in qemuEd Bartosh2017-03-081-0/+14
| | | | | | | | | | | | 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>
* selftest: Optimize get_bb_var useMariano Lopez2017-03-011-19/+20
| | | | | | | | | | | | | | | | | | 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>
* selftest/wic: Add tests for --exclude-dir option.Kristian Amlie2017-02-151-0/+104
| | | | | | | | | | | | | 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>
* selftest: wic: stop using iso image typeEd Bartosh2017-02-051-3/+3
| | | | | | | | | | | | | 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>
* selftest: wic: use wic-tools recipe to get STAGING_DIREd Bartosh2017-02-051-6/+12
| | | | | | | | | | | | | | | 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>
* selftest: wic: stop using hddimg in FSTYPESEd Bartosh2017-02-021-4/+4
| | | | | | | | | | | | | 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>
* selftest: wic: fix test_iso_image test caseEd Bartosh2017-01-311-1/+2
| | | | | | | | | | 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>
* selftest: stop using hddimg in the wic test suiteEd Bartosh2017-01-311-2/+1
| | | | | | | | | | | | 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>
* wic: Look for image artifacts in a common locationTom Zanussi2017-01-311-2/+2
| | | | | | | | | | | | | | | | 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>
* image-wic: remove HDDDIR from WICVARSEd Bartosh2017-01-311-2/+2
| | | | | | | | | | 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>
* wic: use INITRD_LIVE in isoimage-isohybridEd Bartosh2017-01-311-1/+1
| | | | | | | | | | | | | | 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>
* selftest: check results in test_image_vars_dir*Ed Bartosh2017-01-311-0/+2
| | | | | | | | | | 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>
* selftest: split wic tests casesEd Bartosh2017-01-311-9/+22
| | | | | | | | | | | 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>
* wic: change location of .env filesEd Bartosh2017-01-311-1/+2
| | | | | | | | | | | | | | | 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>
* selftest: wic: test default output directoryEd Bartosh2017-01-311-15/+7
| | | | | | | | | | | | | | 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>
* selftest: wic: explicitly specify output directoryEd Bartosh2017-01-311-30/+42
| | | | | | | | | | | 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>
* selftest: wic: split test_debug test caseEd Bartosh2017-01-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* selftest: fixed 3 wic test casesEd Bartosh2017-01-231-0/+12
| | | | | | | | | | 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>
* selftest: wic: don't set WKS_FILEEd Bartosh2017-01-231-2/+1
| | | | | | | | | | | | 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>
* wic: fixed test_iso_image test caseEd Bartosh2017-01-231-0/+4
| | | | | | | | | | | 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>
* image.bbclass: put .env files to ${STAGING_DIR}/imgdata/Ed Bartosh2017-01-231-1/+1
| | | | | | | | | | | | | | 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>
* wic: fix getting path of native sysrootEd Bartosh2017-01-231-6/+6
| | | | | | | | | | | | | | 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>
* selftest: build wic-tools in the Wic.setUpEd Bartosh2017-01-231-2/+1
| | | | | | | | | | 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>
* wic: Remove gummiboot testAlejandro Hernandez2017-01-091-7/+0
| | | | | | | | | | 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>
* selftest/wic: extending test coverage for WIC script optionsJair Gonzalez2016-12-221-14/+128
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* selftest/wic: reorganizing test methods by functionalityJair Gonzalez2016-12-221-92/+92
| | | | | | | | | | | | 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>
* selftest/wic: code cleanupJair Gonzalez2016-12-221-59/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* selftest/wic: adding Testopia ID numbers to test cases missing itJair Gonzalez2016-12-221-0/+3
| | | | | | | | | | | | | | 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>
* Revert "selftest/wic: extending test coverage for WIC script options"Richard Purdie2016-12-201-174/+72
| | | | | | | 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>
* selftest/wic: extending test coverage for WIC script optionsJair Gonzalez2016-12-201-72/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* selftest: wic: fix test_qemuEd Bartosh2016-12-071-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) 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 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>