diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-14 16:22:19 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-16 13:21:35 +0100 |
commit | 05c32d2de1ee4681cc78cb107a158e9ab22c9619 (patch) | |
tree | f9d51a22d4ad080d29fe217ab5ebadce4a2e4a6c /meta/lib/oeqa/selftest/cases | |
parent | b3c379d93e55e6a040545ca6856ef75bef00bba1 (diff) | |
download | poky-05c32d2de1ee4681cc78cb107a158e9ab22c9619.tar.gz |
oeqa/selftest/wic: Split tests into two class groups
This improves test parallelism.
(From OE-Core rev: 26e04b23ba1b6942aa7c7df478d41dfe7b73e6e0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 2771af6367..ba4d3be7a8 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -61,7 +61,7 @@ def only_for_arch(archs, image='core-image-minimal'): | |||
61 | return wrapper | 61 | return wrapper |
62 | 62 | ||
63 | 63 | ||
64 | class Wic(OESelftestTestCase): | 64 | class WicTestCase(OESelftestTestCase): |
65 | """Wic test class.""" | 65 | """Wic test class.""" |
66 | 66 | ||
67 | image_is_ready = False | 67 | image_is_ready = False |
@@ -71,7 +71,7 @@ class Wic(OESelftestTestCase): | |||
71 | def setUpLocal(self): | 71 | def setUpLocal(self): |
72 | """This code is executed before each test method.""" | 72 | """This code is executed before each test method.""" |
73 | self.resultdir = self.builddir + "/wic-tmp/" | 73 | self.resultdir = self.builddir + "/wic-tmp/" |
74 | super(Wic, self).setUpLocal() | 74 | super(WicTestCase, self).setUpLocal() |
75 | if not self.native_sysroot: | 75 | if not self.native_sysroot: |
76 | Wic.native_sysroot = get_bb_var('STAGING_DIR_NATIVE', 'wic-tools') | 76 | Wic.native_sysroot = get_bb_var('STAGING_DIR_NATIVE', 'wic-tools') |
77 | 77 | ||
@@ -92,7 +92,9 @@ class Wic(OESelftestTestCase): | |||
92 | def tearDownLocal(self): | 92 | def tearDownLocal(self): |
93 | """Remove resultdir as it may contain images.""" | 93 | """Remove resultdir as it may contain images.""" |
94 | rmtree(self.resultdir, ignore_errors=True) | 94 | rmtree(self.resultdir, ignore_errors=True) |
95 | super(Wic, self).tearDownLocal() | 95 | super(WicTestCase, self).tearDownLocal() |
96 | |||
97 | class Wic(WicTestCase): | ||
96 | 98 | ||
97 | @OETestID(1552) | 99 | @OETestID(1552) |
98 | def test_version(self): | 100 | def test_version(self): |
@@ -522,6 +524,8 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
522 | % (wks_file, self.resultdir), ignore_status=True).status) | 524 | % (wks_file, self.resultdir), ignore_status=True).status) |
523 | os.remove(wks_file) | 525 | os.remove(wks_file) |
524 | 526 | ||
527 | class Wic2(WicTestCase): | ||
528 | |||
525 | @OETestID(1496) | 529 | @OETestID(1496) |
526 | def test_bmap_short(self): | 530 | def test_bmap_short(self): |
527 | """Test generation of .bmap file -m option""" | 531 | """Test generation of .bmap file -m option""" |
@@ -679,7 +683,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
679 | Test creation of a simple image with partition size controlled through | 683 | Test creation of a simple image with partition size controlled through |
680 | --fixed-size flag | 684 | --fixed-size flag |
681 | """ | 685 | """ |
682 | wkspath, wksname = Wic._make_fixed_size_wks(200) | 686 | wkspath, wksname = Wic2._make_fixed_size_wks(200) |
683 | 687 | ||
684 | self.assertEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \ | 688 | self.assertEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \ |
685 | % (wkspath, self.resultdir)).status) | 689 | % (wkspath, self.resultdir)).status) |
@@ -711,7 +715,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
711 | --fixed-size flag. The size of partition is intentionally set to 1MiB | 715 | --fixed-size flag. The size of partition is intentionally set to 1MiB |
712 | in order to trigger an error in wic. | 716 | in order to trigger an error in wic. |
713 | """ | 717 | """ |
714 | wkspath, wksname = Wic._make_fixed_size_wks(1) | 718 | wkspath, wksname = Wic2._make_fixed_size_wks(1) |
715 | 719 | ||
716 | self.assertEqual(1, runCmd("wic create %s -e core-image-minimal -o %s" \ | 720 | self.assertEqual(1, runCmd("wic create %s -e core-image-minimal -o %s" \ |
717 | % (wkspath, self.resultdir), ignore_status=True).status) | 721 | % (wkspath, self.resultdir), ignore_status=True).status) |