diff options
author | Jose Perez Carranza <jose.perez.carranza@linux.intel.com> | 2017-06-15 05:49:22 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-23 11:44:12 +0100 |
commit | ab0780dfea9f0202ded3f2692633926aea35a5e6 (patch) | |
tree | de21c8e1e6e8e3444273a9a72fea1ad5fea19e1f /meta/lib/oeqa/selftest/cases/wic.py | |
parent | f822525c5830247e4ec8ea6be9aa36a97106cca8 (diff) | |
download | poky-ab0780dfea9f0202ded3f2692633926aea35a5e6.tar.gz |
selftest: Add Testopia ID to test cases
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>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/wic.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index ee9ff0f2dd..02c7d0f66e 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -311,6 +311,7 @@ class Wic(OESelftestTestCase): | |||
311 | "-D -o %s" % self.resultdir).status) | 311 | "-D -o %s" % self.resultdir).status) |
312 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) | 312 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) |
313 | 313 | ||
314 | @OETestID(1658) | ||
314 | def test_debug_long(self): | 315 | def test_debug_long(self): |
315 | """Test --debug option""" | 316 | """Test --debug option""" |
316 | self.assertEqual(0, runCmd("wic create wictestdisk " | 317 | self.assertEqual(0, runCmd("wic create wictestdisk " |
@@ -326,6 +327,7 @@ class Wic(OESelftestTestCase): | |||
326 | "-s -o %s" % self.resultdir).status) | 327 | "-s -o %s" % self.resultdir).status) |
327 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) | 328 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) |
328 | 329 | ||
330 | @OETestID(1671) | ||
329 | def test_skip_build_check_long(self): | 331 | def test_skip_build_check_long(self): |
330 | """Test --skip-build-check option""" | 332 | """Test --skip-build-check option""" |
331 | self.assertEqual(0, runCmd("wic create wictestdisk " | 333 | self.assertEqual(0, runCmd("wic create wictestdisk " |
@@ -342,6 +344,7 @@ class Wic(OESelftestTestCase): | |||
342 | "-f -o %s" % self.resultdir).status) | 344 | "-f -o %s" % self.resultdir).status) |
343 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) | 345 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) |
344 | 346 | ||
347 | @OETestID(1656) | ||
345 | def test_build_rootfs_long(self): | 348 | def test_build_rootfs_long(self): |
346 | """Test --build-rootfs option""" | 349 | """Test --build-rootfs option""" |
347 | self.assertEqual(0, runCmd("wic create wictestdisk " | 350 | self.assertEqual(0, runCmd("wic create wictestdisk " |
@@ -383,6 +386,7 @@ class Wic(OESelftestTestCase): | |||
383 | self.assertEqual(0, status) | 386 | self.assertEqual(0, status) |
384 | self.assertEqual(1, len(glob(self.resultdir + "%(wks)s-*.direct" % bbvars))) | 387 | self.assertEqual(1, len(glob(self.resultdir + "%(wks)s-*.direct" % bbvars))) |
385 | 388 | ||
389 | @OETestID(1661) | ||
386 | def test_exclude_path(self): | 390 | def test_exclude_path(self): |
387 | """Test --exclude-path wks option.""" | 391 | """Test --exclude-path wks option.""" |
388 | 392 | ||
@@ -490,6 +494,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
490 | finally: | 494 | finally: |
491 | os.environ['PATH'] = oldpath | 495 | os.environ['PATH'] = oldpath |
492 | 496 | ||
497 | @OETestID(1662) | ||
493 | def test_exclude_path_errors(self): | 498 | def test_exclude_path_errors(self): |
494 | """Test --exclude-path wks option error handling.""" | 499 | """Test --exclude-path wks option error handling.""" |
495 | wks_file = 'temp.wks' | 500 | wks_file = 'temp.wks' |
@@ -517,6 +522,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
517 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) | 522 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) |
518 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct.bmap"))) | 523 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct.bmap"))) |
519 | 524 | ||
525 | @OETestID(1655) | ||
520 | def test_bmap_long(self): | 526 | def test_bmap_long(self): |
521 | """Test generation of .bmap file --bmap option""" | 527 | """Test generation of .bmap file --bmap option""" |
522 | cmd = "wic create wictestdisk -e core-image-minimal --bmap -o %s" % self.resultdir | 528 | cmd = "wic create wictestdisk -e core-image-minimal --bmap -o %s" % self.resultdir |
@@ -569,6 +575,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
569 | % (image, imgenvdir, self.resultdir)).status) | 575 | % (image, imgenvdir, self.resultdir)).status) |
570 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) | 576 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) |
571 | 577 | ||
578 | @OETestID(1665) | ||
572 | def test_image_vars_dir_long(self): | 579 | def test_image_vars_dir_long(self): |
573 | """Test image vars directory selection --vars option""" | 580 | """Test image vars directory selection --vars option""" |
574 | image = 'core-image-minimal' | 581 | image = 'core-image-minimal' |
@@ -618,6 +625,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
618 | self.assertEqual(output, '/dev/root /\r\n/dev/sda3 /mnt') | 625 | self.assertEqual(output, '/dev/root /\r\n/dev/sda3 /mnt') |
619 | 626 | ||
620 | @only_for_arch(['i586', 'i686', 'x86_64']) | 627 | @only_for_arch(['i586', 'i686', 'x86_64']) |
628 | @OETestID(1852) | ||
621 | def test_qemu_efi(self): | 629 | def test_qemu_efi(self): |
622 | """Test core-image-minimal efi image under qemu""" | 630 | """Test core-image-minimal efi image under qemu""" |
623 | config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "mkefidisk.wks"\n' | 631 | config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "mkefidisk.wks"\n' |
@@ -647,6 +655,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
647 | 655 | ||
648 | return wkspath, wksname | 656 | return wkspath, wksname |
649 | 657 | ||
658 | @OETestID(1847) | ||
650 | def test_fixed_size(self): | 659 | def test_fixed_size(self): |
651 | """ | 660 | """ |
652 | Test creation of a simple image with partition size controlled through | 661 | Test creation of a simple image with partition size controlled through |
@@ -677,6 +686,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
677 | self.assertEqual(1, len(partlns)) | 686 | self.assertEqual(1, len(partlns)) |
678 | self.assertEqual("1:0.00MiB:200MiB:200MiB:ext4::;", partlns[0]) | 687 | self.assertEqual("1:0.00MiB:200MiB:200MiB:ext4::;", partlns[0]) |
679 | 688 | ||
689 | @OETestID(1848) | ||
680 | def test_fixed_size_error(self): | 690 | def test_fixed_size_error(self): |
681 | """ | 691 | """ |
682 | Test creation of a simple image with partition size controlled through | 692 | Test creation of a simple image with partition size controlled through |
@@ -692,6 +702,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
692 | self.assertEqual(0, len(wicout)) | 702 | self.assertEqual(0, len(wicout)) |
693 | 703 | ||
694 | @only_for_arch(['i586', 'i686', 'x86_64']) | 704 | @only_for_arch(['i586', 'i686', 'x86_64']) |
705 | @OETestID(1854) | ||
695 | def test_rawcopy_plugin_qemu(self): | 706 | def test_rawcopy_plugin_qemu(self): |
696 | """Test rawcopy plugin in qemu""" | 707 | """Test rawcopy plugin in qemu""" |
697 | # build ext4 and wic images | 708 | # build ext4 and wic images |
@@ -707,6 +718,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
707 | self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) | 718 | self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) |
708 | self.assertEqual(output, '2') | 719 | self.assertEqual(output, '2') |
709 | 720 | ||
721 | @OETestID(1853) | ||
710 | def test_rawcopy_plugin(self): | 722 | def test_rawcopy_plugin(self): |
711 | """Test rawcopy plugin""" | 723 | """Test rawcopy plugin""" |
712 | img = 'core-image-minimal' | 724 | img = 'core-image-minimal' |
@@ -723,6 +735,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
723 | out = glob(self.resultdir + "%s-*direct" % wksname) | 735 | out = glob(self.resultdir + "%s-*direct" % wksname) |
724 | self.assertEqual(1, len(out)) | 736 | self.assertEqual(1, len(out)) |
725 | 737 | ||
738 | @OETestID(1849) | ||
726 | def test_fs_types(self): | 739 | def test_fs_types(self): |
727 | """Test filesystem types for empty and not empty partitions""" | 740 | """Test filesystem types for empty and not empty partitions""" |
728 | img = 'core-image-minimal' | 741 | img = 'core-image-minimal' |
@@ -742,6 +755,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
742 | out = glob(self.resultdir + "%s-*direct" % wksname) | 755 | out = glob(self.resultdir + "%s-*direct" % wksname) |
743 | self.assertEqual(1, len(out)) | 756 | self.assertEqual(1, len(out)) |
744 | 757 | ||
758 | @OETestID(1851) | ||
745 | def test_kickstart_parser(self): | 759 | def test_kickstart_parser(self): |
746 | """Test wks parser options""" | 760 | """Test wks parser options""" |
747 | with NamedTemporaryFile("w", suffix=".wks") as wks: | 761 | with NamedTemporaryFile("w", suffix=".wks") as wks: |
@@ -754,6 +768,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
754 | out = glob(self.resultdir + "%s-*direct" % wksname) | 768 | out = glob(self.resultdir + "%s-*direct" % wksname) |
755 | self.assertEqual(1, len(out)) | 769 | self.assertEqual(1, len(out)) |
756 | 770 | ||
771 | @OETestID(1850) | ||
757 | def test_image_bootpart_globbed(self): | 772 | def test_image_bootpart_globbed(self): |
758 | """Test globbed sources with image-bootpart plugin""" | 773 | """Test globbed sources with image-bootpart plugin""" |
759 | img = "core-image-minimal" | 774 | img = "core-image-minimal" |
@@ -764,6 +779,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
764 | self.remove_config(config) | 779 | self.remove_config(config) |
765 | self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct"))) | 780 | self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct"))) |
766 | 781 | ||
782 | @OETestID(1855) | ||
767 | def test_sparse_copy(self): | 783 | def test_sparse_copy(self): |
768 | """Test sparse_copy with FIEMAP and SEEK_HOLE filemap APIs""" | 784 | """Test sparse_copy with FIEMAP and SEEK_HOLE filemap APIs""" |
769 | libpath = os.path.join(get_bb_var('COREBASE'), 'scripts', 'lib', 'wic') | 785 | libpath = os.path.join(get_bb_var('COREBASE'), 'scripts', 'lib', 'wic') |
@@ -792,6 +808,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
792 | self.assertEqual(dest_stat.st_blocks, 8) | 808 | self.assertEqual(dest_stat.st_blocks, 8) |
793 | os.unlink(dest) | 809 | os.unlink(dest) |
794 | 810 | ||
811 | @OETestID(1857) | ||
795 | def test_wic_ls(self): | 812 | def test_wic_ls(self): |
796 | """Test listing image content using 'wic ls'""" | 813 | """Test listing image content using 'wic ls'""" |
797 | self.assertEqual(0, runCmd("wic create wictestdisk " | 814 | self.assertEqual(0, runCmd("wic create wictestdisk " |
@@ -812,6 +829,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
812 | self.assertEqual(0, result.status) | 829 | self.assertEqual(0, result.status) |
813 | self.assertEqual(6, len(result.output.split('\n'))) | 830 | self.assertEqual(6, len(result.output.split('\n'))) |
814 | 831 | ||
832 | @OETestID(1856) | ||
815 | def test_wic_cp(self): | 833 | def test_wic_cp(self): |
816 | """Test copy files and directories to the the wic image.""" | 834 | """Test copy files and directories to the the wic image.""" |
817 | self.assertEqual(0, runCmd("wic create wictestdisk " | 835 | self.assertEqual(0, runCmd("wic create wictestdisk " |
@@ -856,6 +874,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
856 | self.assertEqual(8, len(result.output.split('\n'))) | 874 | self.assertEqual(8, len(result.output.split('\n'))) |
857 | self.assertTrue(os.path.basename(testdir) in result.output) | 875 | self.assertTrue(os.path.basename(testdir) in result.output) |
858 | 876 | ||
877 | @OETestID(1858) | ||
859 | def test_wic_rm(self): | 878 | def test_wic_rm(self): |
860 | """Test removing files and directories from the the wic image.""" | 879 | """Test removing files and directories from the the wic image.""" |
861 | self.assertEqual(0, runCmd("wic create mkefidisk " | 880 | self.assertEqual(0, runCmd("wic create mkefidisk " |