summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-01-26 19:30:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-31 14:13:28 +0000
commit71e3c631bac859d00cef05bbf7bd901a96bac520 (patch)
tree233f65198f7ca35b4311ecf34f2ab49aea6064ac
parentbc6e6a34f35bd081d828160bab8ee12e770c7e1e (diff)
downloadopenembedded-core-71e3c631bac859d00cef05bbf7bd901a96bac520.tar.gz
openembedded-core-71e3c631bac859d00cef05bbf7bd901a96bac520.tar.bz2
openembedded-core-71e3c631bac859d00cef05bbf7bd901a96bac520.zip
selftest: split wic tests cases
Split tests to run wic only once per test case. This should fix failures caused by result images left from the previous wic run. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-rw-r--r--meta/lib/oeqa/selftest/wic.py31
1 files changed, 22 insertions, 9 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 9784a6818e..24093d1d53 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -273,12 +273,15 @@ class Wic(oeSelfTest):
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
@testcase(1563)
- def test_skip_build_check(self):
- """Test skip build check"""
+ def test_skip_build_check_short(self):
+ """Test -s option"""
self.assertEqual(0, runCmd("wic create directdisk "
"--image-name=core-image-minimal "
"-s -o %s" % self.resultdir).status)
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
+
+ def test_skip_build_check_long(self):
+ """Test --skip-build-check option"""
self.assertEqual(0, runCmd("wic create directdisk "
"--image-name=core-image-minimal "
"--skip-build-check "
@@ -286,12 +289,15 @@ class Wic(oeSelfTest):
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
@testcase(1564)
- def test_build_rootfs(self):
- """Test build rootfs"""
+ def test_build_rootfs_short(self):
+ """Test -f option"""
self.assertEqual(0, runCmd("wic create directdisk "
"--image-name=core-image-minimal "
"-f -o %s" % self.resultdir).status)
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
+
+ def test_build_rootfs_long(self):
+ """Test --build-rootfs option"""
self.assertEqual(0, runCmd("wic create directdisk "
"--image-name=core-image-minimal "
"--build-rootfs "
@@ -328,14 +334,16 @@ class Wic(oeSelfTest):
self.assertEqual(1, len(glob(self.resultdir + "%(wks)s-*.direct" % bbvars)))
@testcase(1496)
- def test_bmap(self):
- """Test generation of .bmap file"""
+ def test_bmap_short(self):
+ """Test generation of .bmap file -m option"""
cmd = "wic create directdisk -e core-image-minimal -m -o %s" % self.resultdir
status = runCmd(cmd).status
self.assertEqual(0, status)
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*direct")))
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*direct.bmap")))
- rmtree(self.resultdir)
+
+ def test_bmap_long(self):
+ """Test generation of .bmap file --bmap option"""
cmd = "wic create directdisk -e core-image-minimal --bmap -o %s" % self.resultdir
status = runCmd(cmd).status
self.assertEqual(0, status)
@@ -374,14 +382,19 @@ class Wic(oeSelfTest):
self.assertTrue(content[var])
@testcase(1559)
- def test_image_vars_dir(self):
- """Test image vars directory selection"""
+ def test_image_vars_dir_short(self):
+ """Test image vars directory selection -v option"""
image = 'core-image-minimal'
imgenvdir = self._get_image_env_path(image)
self.assertEqual(0, runCmd("wic create directdisk "
"--image-name=%s -v %s -o %s"
% (image, imgenvdir, self.resultdir)).status)
+
+ def test_image_vars_dir_long(self):
+ """Test image vars directory selection --vars option"""
+ image = 'core-image-minimal'
+ imgenvdir = self._get_image_env_path(image)
self.assertEqual(0, runCmd("wic create directdisk "
"--image-name=%s "
"--vars %s "