summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/imagefeatures.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-07-27 14:04:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 23:29:15 +0100
commitc256bbc44d250ce0baf842397b5f710c7e56c5e0 (patch)
tree1d4ae340e112b9f8f511390d1a68634ffd86dbeb /meta/lib/oeqa/selftest/imagefeatures.py
parent86f0232bffb63cbcc3624f052d10675d521494fa (diff)
downloadpoky-c256bbc44d250ce0baf842397b5f710c7e56c5e0.tar.gz
oeqa/selftest/imagefeatures: remove gummiboot tests
These tests were _deleting_ meta-intel if it happened to appear under COREBASE, which could have been catastrophic if there was any work in progress in that directory. It turns out we don't even need meta-intel, but we do need a machine that's set up appropriately (e.g. genericx86-64). Tests that involve layers outside of OE-Core don't really belong in OE-Core, and genericx86-64 is in meta-yocto-bsp; however we will soon have the capability to have selftest tests in other layers, so remove this here so we can add a fixed version in meta-yocto-bsp after that happens. (From OE-Core rev: 7bf55e7b8036bb09f49ee0987fd002ec25e3e9e0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/imagefeatures.py')
-rw-r--r--meta/lib/oeqa/selftest/imagefeatures.py75
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
2from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu 2from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
3from oeqa.utils.decorators import testcase 3from oeqa.utils.decorators import testcase
4from oeqa.utils.sshcontrol import SSHControl 4from oeqa.utils.sshcontrol import SSHControl
5from os.path import isfile
6from os import system
7import glob
8import os 5import os
9import sys 6import sys
10import logging 7import 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
173class 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')