Skip to contentSkip to conversation

oe-selftest: wic: fix test19_image_env test case

PATCH New Ed Bartosh 1 participant 1 message Aug 31, 2015

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 oe-selftest: wic: fix test19_image_env test case

This test case fails on qemu machines as not all expected bitbake variables are present in .env file.

Fixed by filtering out optional variables.

---
 meta/lib/oeqa/selftest/wic.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/wic.py +4 -2
index deb2333..6bc4b60 100644
@@ -180,8 +180,10 @@ class Wic(oeSelfTest):
         path = os.path.join(imgdatadir, basename) + '.env'
         self.assertTrue(os.path.isfile(path))
 
-        wicvars = get_bb_var('WICVARS', image).split()
-        wicvars.remove('IMAGE_BOOT_FILES') # this variable is optional
+        wicvars = set(get_bb_var('WICVARS', image).split())
+        # filter out optional variables
+        wicvars = wicvars.difference(('HDDDIR', 'IMAGE_BOOT_FILES',
+                                      'INITRD', 'ISODIR'))
         with open(path) as envfile:
             content = dict(line.split("=", 1) for line in envfile)
             # test if variables used by wic present in the .env file
Signature · 1 line
2.1.4