diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/imagefeatures.py | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py index a370d1edb1..fcffc423ea 100644 --- a/meta/lib/oeqa/selftest/imagefeatures.py +++ b/meta/lib/oeqa/selftest/imagefeatures.py | |||
@@ -2,9 +2,6 @@ from oeqa.selftest.base import oeSelfTest | |||
2 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu | 2 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu |
3 | from oeqa.utils.decorators import testcase | 3 | from oeqa.utils.decorators import testcase |
4 | from oeqa.utils.sshcontrol import SSHControl | 4 | from oeqa.utils.sshcontrol import SSHControl |
5 | from os.path import isfile | ||
6 | from os import system | ||
7 | import glob | ||
8 | import os | 5 | import os |
9 | import sys | 6 | import sys |
10 | import logging | 7 | import logging |
@@ -169,75 +166,3 @@ class ImageFeatures(oeSelfTest): | |||
169 | # Build a core-image-weston | 166 | # Build a core-image-weston |
170 | bitbake('core-image-weston') | 167 | bitbake('core-image-weston') |
171 | 168 | ||
172 | |||
173 | class Gummiboot(oeSelfTest): | ||
174 | |||
175 | meta_intel_dir = '' | ||
176 | |||
177 | def setUpLocal(self): | ||
178 | """ | ||
179 | Common setup for test cases: 1101, 1103 | ||
180 | """ | ||
181 | |||
182 | self.meta_intel_dir = get_bb_var('COREBASE') + '/meta-intel' | ||
183 | meta_nuc_dir = self.meta_intel_dir + '/meta-nuc' | ||
184 | meta_intel_repo = 'http://git.yoctoproject.org/git/meta-intel' | ||
185 | |||
186 | # Delete meta_intel_dir | ||
187 | system('rm -rf ' + self.meta_intel_dir) | ||
188 | |||
189 | # Delete meta-intel dir even if the setUp fails | ||
190 | self.add_command_to_tearDown('rm -rf ' + self.meta_intel_dir) | ||
191 | |||
192 | # Clone meta-intel | ||
193 | runCmd('git clone ' + meta_intel_repo + ' ' + self.meta_intel_dir) | ||
194 | |||
195 | # Add meta-intel and meta-nuc layers in conf/bblayers.conf | ||
196 | features = 'BBLAYERS += "' + self.meta_intel_dir + ' ' + meta_nuc_dir + '"' | ||
197 | self.append_bblayers_config(features) | ||
198 | |||
199 | # Set EFI_PROVIDER = "gummiboot" and MACHINE = "nuc" in conf/local.conf | ||
200 | features = 'EFI_PROVIDER = "gummiboot"\n' | ||
201 | features += 'MACHINE = "nuc"' | ||
202 | self.append_config(features) | ||
203 | |||
204 | # Run "bitbake syslinux syslinux-native parted-native dosfstools-native mtools-native core-image-minimal " | ||
205 | # to build a nuc/efi gummiboot image | ||
206 | |||
207 | bitbake('syslinux syslinux-native parted-native dosfstools-native mtools-native core-image-minimal') | ||
208 | |||
209 | @testcase(1101) | ||
210 | def test_efi_gummiboot_images_can_be_build(self): | ||
211 | """ | ||
212 | Summary: Check if efi/gummiboot images can be buit | ||
213 | Expected: 1. File gummibootx64.efi should be available in build/tmp/deploy/images/nuc | ||
214 | 2. Efi/gummiboot images can be built | ||
215 | Product: oe-core | ||
216 | Author: Ionut Chisanovici <ionutx.chisanovici@intel.com> | ||
217 | AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com> | ||
218 | """ | ||
219 | |||
220 | look_for_file = 'gummibootx64.efi' | ||
221 | file_location = get_bb_var('COREBASE') + '/build/tmp/deploy/images/nuc/' | ||
222 | |||
223 | found = isfile(file_location + look_for_file) | ||
224 | self.assertTrue(found, 'File {} not found under {}.'.format(look_for_file, file_location)) | ||
225 | |||
226 | @testcase(1103) | ||
227 | def test_wic_command_can_create_efi_gummiboot_installation_images(self): | ||
228 | """ | ||
229 | Summary: Check that wic command can create efi/gummiboot installation images | ||
230 | Expected: A .direct file in folder /var/tmp/wic/ must be created. | ||
231 | Product: oe-core | ||
232 | Author: Ionut Chisanovici <ionutx.chisanovici@intel.com> | ||
233 | AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com> | ||
234 | """ | ||
235 | |||
236 | # Create efi/gummiboot installation images | ||
237 | wic_create_cmd = 'wic create mkgummidisk -e core-image-minimal' | ||
238 | runCmd(wic_create_cmd) | ||
239 | |||
240 | # Verify that a .direct file was created | ||
241 | direct_file = '/var/tmp/wic/build/*.direct' | ||
242 | ret = glob.glob(direct_file) | ||
243 | self.assertEqual(1, len(ret), 'Failed to find the .direct file') | ||