diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index f4c22f789c..ca9a5981bd 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py | |||
| @@ -38,22 +38,19 @@ class Wic(oeSelfTest): | |||
| 38 | """Wic test class.""" | 38 | """Wic test class.""" |
| 39 | 39 | ||
| 40 | resultdir = "/var/tmp/wic/build/" | 40 | resultdir = "/var/tmp/wic/build/" |
| 41 | 41 | image_is_ready = False | |
| 42 | @classmethod | ||
| 43 | def setUpClass(cls): | ||
| 44 | """Build wic runtime dependencies.""" | ||
| 45 | bitbake('syslinux syslinux-native parted-native gptfdisk-native ' | ||
| 46 | 'dosfstools-native mtools-native') | ||
| 47 | Wic.image_is_ready = False | ||
| 48 | 42 | ||
| 49 | def setUpLocal(self): | 43 | def setUpLocal(self): |
| 50 | """This code is executed before each test method.""" | 44 | """This code is executed before each test method.""" |
| 51 | features = 'IMAGE_FSTYPES += " hddimg"\nMACHINE_FEATURES_append = " efi"\n' | 45 | self.write_config('IMAGE_FSTYPES += " hddimg"\nMACHINE_FEATURES_append = " efi"\n') |
| 52 | self.append_config(features) | 46 | |
| 47 | # Do this here instead of in setUpClass as the base setUp does some | ||
| 48 | # clean up which can result in the native tools built earlier in | ||
| 49 | # setUpClass being unavailable. | ||
| 53 | if not Wic.image_is_ready: | 50 | if not Wic.image_is_ready: |
| 54 | # build core-image-minimal with required features | 51 | bitbake('syslinux syslinux-native parted-native gptfdisk-native ' |
| 52 | 'dosfstools-native mtools-native') | ||
| 55 | bitbake('core-image-minimal') | 53 | bitbake('core-image-minimal') |
| 56 | # set this class variable to avoid buiding image many times | ||
| 57 | Wic.image_is_ready = True | 54 | Wic.image_is_ready = True |
| 58 | 55 | ||
| 59 | rmtree(self.resultdir, ignore_errors=True) | 56 | rmtree(self.resultdir, ignore_errors=True) |
