diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 7b173e4c09..ed0301837b 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py | |||
@@ -24,7 +24,6 @@ | |||
24 | """Test cases for wic.""" | 24 | """Test cases for wic.""" |
25 | 25 | ||
26 | import os | 26 | import os |
27 | import sys | ||
28 | 27 | ||
29 | from glob import glob | 28 | from glob import glob |
30 | from shutil import rmtree | 29 | from shutil import rmtree |
@@ -42,7 +41,8 @@ class Wic(oeSelfTest): | |||
42 | 41 | ||
43 | def setUpLocal(self): | 42 | def setUpLocal(self): |
44 | """This code is executed before each test method.""" | 43 | """This code is executed before each test method.""" |
45 | self.write_config('IMAGE_FSTYPES += " hddimg"\nMACHINE_FEATURES_append = " efi"\n') | 44 | self.write_config('IMAGE_FSTYPES += " hddimg"\n' |
45 | 'MACHINE_FEATURES_append = " efi"\n') | ||
46 | 46 | ||
47 | # Do this here instead of in setUpClass as the base setUp does some | 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 | 48 | # clean up which can result in the native tools built earlier in |
@@ -80,14 +80,14 @@ class Wic(oeSelfTest): | |||
80 | @testcase(1212) | 80 | @testcase(1212) |
81 | def test_build_artifacts(self): | 81 | def test_build_artifacts(self): |
82 | """Test wic create directdisk providing all artifacts.""" | 82 | """Test wic create directdisk providing all artifacts.""" |
83 | vars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \ | 83 | bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \ |
84 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', | 84 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', |
85 | 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS')) | 85 | 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS')) |
86 | status = runCmd("wic create directdisk " | 86 | status = runCmd("wic create directdisk " |
87 | "-b %(staging_datadir)s " | 87 | "-b %(staging_datadir)s " |
88 | "-k %(deploy_dir_image)s " | 88 | "-k %(deploy_dir_image)s " |
89 | "-n %(staging_dir_native)s " | 89 | "-n %(staging_dir_native)s " |
90 | "-r %(image_rootfs)s" % vars).status | 90 | "-r %(image_rootfs)s" % bbvars).status |
91 | self.assertEqual(0, status) | 91 | self.assertEqual(0, status) |
92 | self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) | 92 | self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) |
93 | 93 | ||
@@ -102,7 +102,7 @@ class Wic(oeSelfTest): | |||
102 | def test_unsupported_subcommand(self): | 102 | def test_unsupported_subcommand(self): |
103 | """Test unsupported subcommand""" | 103 | """Test unsupported subcommand""" |
104 | self.assertEqual(1, runCmd('wic unsupported', | 104 | self.assertEqual(1, runCmd('wic unsupported', |
105 | ignore_status=True).status) | 105 | ignore_status=True).status) |
106 | 106 | ||
107 | @testcase(1214) | 107 | @testcase(1214) |
108 | def test_no_command(self): | 108 | def test_no_command(self): |
@@ -172,20 +172,20 @@ class Wic(oeSelfTest): | |||
172 | @testcase(1269) | 172 | @testcase(1269) |
173 | def test_rootfs_artifacts(self): | 173 | def test_rootfs_artifacts(self): |
174 | """Test usage of rootfs plugin with rootfs paths""" | 174 | """Test usage of rootfs plugin with rootfs paths""" |
175 | vars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \ | 175 | bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \ |
176 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', | 176 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', |
177 | 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS')) | 177 | 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS')) |
178 | vars['wks'] = "directdisk-multi-rootfs" | 178 | bbvars['wks'] = "directdisk-multi-rootfs" |
179 | status = runCmd("wic create %(wks)s " | 179 | status = runCmd("wic create %(wks)s " |
180 | "-b %(staging_datadir)s " | 180 | "-b %(staging_datadir)s " |
181 | "-k %(deploy_dir_image)s " | 181 | "-k %(deploy_dir_image)s " |
182 | "-n %(staging_dir_native)s " | 182 | "-n %(staging_dir_native)s " |
183 | "--rootfs-dir rootfs1=%(image_rootfs)s " | 183 | "--rootfs-dir rootfs1=%(image_rootfs)s " |
184 | "--rootfs-dir rootfs2=%(image_rootfs)s" \ | 184 | "--rootfs-dir rootfs2=%(image_rootfs)s" \ |
185 | % vars).status | 185 | % bbvars).status |
186 | self.assertEqual(0, status) | 186 | self.assertEqual(0, status) |
187 | self.assertEqual(1, len(glob(self.resultdir + \ | 187 | self.assertEqual(1, len(glob(self.resultdir + \ |
188 | "%(wks)s-*.direct" % vars))) | 188 | "%(wks)s-*.direct" % bbvars))) |
189 | 189 | ||
190 | @testcase(1346) | 190 | @testcase(1346) |
191 | def test_iso_image(self): | 191 | def test_iso_image(self): |