summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-23 11:19:49 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-27 22:42:50 +0100
commite6f29dd7124637bd8d8c4ed41933534c9db9e8ea (patch)
tree524ef47373a61d0dc4557544c4e7f514b3a785dc /meta/lib
parenta04ebe7246554c58914d8b7ca9c4b5672b2e2f76 (diff)
downloadpoky-e6f29dd7124637bd8d8c4ed41933534c9db9e8ea.tar.gz
wic: oe-selftest: Test image compressing
Added 4 new testcases for 'wic --compress-with <compressor>' functionality. (From OE-Core rev: 0ffc5c38ef28605abf815a47eb41923802d31df7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/wic.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 47b70fda2b..53855625b8 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -103,3 +103,33 @@ class Wic(oeSelfTest):
103 def test11_help_kickstart(self): 103 def test11_help_kickstart(self):
104 """Test wic help kickstart""" 104 """Test wic help kickstart"""
105 self.assertEqual(0, runCmd('wic help kickstart').status) 105 self.assertEqual(0, runCmd('wic help kickstart').status)
106
107 def test12_compress_gzip(self):
108 """Test compressing an image with gzip"""
109 self.assertEqual(0, runCmd("wic create directdisk "
110 "--image-name core-image-minimal "
111 "-c gzip").status)
112 self.assertEqual(1, len(glob(self.resultdir + \
113 "directdisk-*.direct.gz")))
114
115 def test13_compress_gzip(self):
116 """Test compressing an image with bzip2"""
117 self.assertEqual(0, runCmd("wic create directdisk "
118 "--image-name core-image-minimal "
119 "-c bzip2").status)
120 self.assertEqual(1, len(glob(self.resultdir + \
121 "directdisk-*.direct.bz2")))
122
123 def test14_compress_gzip(self):
124 """Test compressing an image with xz"""
125 self.assertEqual(0, runCmd("wic create directdisk "
126 "--image-name core-image-minimal "
127 "-c xz").status)
128 self.assertEqual(1, len(glob(self.resultdir + \
129 "directdisk-*.direct.xz")))
130
131 def test15_wrong_compressor(self):
132 """Test how wic breaks if wrong compressor is provided"""
133 self.assertEqual(2, runCmd("wic create directdisk "
134 "--image-name core-image-minimal "
135 "-c wrong", ignore_status=True).status)