summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-02-13 11:02:20 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-15 16:28:44 +0000
commit80e892894258fc9d87e97301ea04ee43c667e282 (patch)
tree1e7769c8ee89e547f8c0992c11099b6301fcc8f5 /meta
parent9b6dc9b07e8eb53b4783abf2b9189081ae6bcf5d (diff)
downloadpoky-80e892894258fc9d87e97301ea04ee43c667e282.tar.gz
oe-selftest: pylinted wic tests
Fixed the following pylint warnings: C: 45, 0: Line too long (91/80) (line-too-long) C:105, 0: Wrong continued indentation. ignore_status=True).status) ^ | (bad-continuation) W: 83, 8: Redefining built-in 'vars' (redefined-builtin) W:175, 8: Redefining built-in 'vars' (redefined-builtin) W: 27, 0: Unused import sys (unused-import) (From OE-Core rev: ecb5320e766d0fa031c269d6d9b2a24c81c7aa7e) (From OE-Core rev: c47af4a772883c86559673ba9b9f774f0ff0d54c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/wic.py18
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
26import os 26import os
27import sys
28 27
29from glob import glob 28from glob import glob
30from shutil import rmtree 29from 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):