[oe-commits] Ed Bartosh : wic: oe-selftest: Test image compressing
git at git.openembedded.org
git at git.openembedded.org
Fri Jun 26 13:02:11 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: 66ae8b5689eaccf18d59e48eb9bd7fc8ca805501
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=66ae8b5689eaccf18d59e48eb9bd7fc8ca805501
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date: Tue Jun 23 11:19:49 2015 +0300
wic: oe-selftest: Test image compressing
Added 4 new testcases for 'wic --compress-with <compressor>' functionality.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
meta/lib/oeqa/selftest/wic.py | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 47b70fd..5385562 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -103,3 +103,33 @@ class Wic(oeSelfTest):
def test11_help_kickstart(self):
"""Test wic help kickstart"""
self.assertEqual(0, runCmd('wic help kickstart').status)
+
+ def test12_compress_gzip(self):
+ """Test compressing an image with gzip"""
+ self.assertEqual(0, runCmd("wic create directdisk "
+ "--image-name core-image-minimal "
+ "-c gzip").status)
+ self.assertEqual(1, len(glob(self.resultdir + \
+ "directdisk-*.direct.gz")))
+
+ def test13_compress_gzip(self):
+ """Test compressing an image with bzip2"""
+ self.assertEqual(0, runCmd("wic create directdisk "
+ "--image-name core-image-minimal "
+ "-c bzip2").status)
+ self.assertEqual(1, len(glob(self.resultdir + \
+ "directdisk-*.direct.bz2")))
+
+ def test14_compress_gzip(self):
+ """Test compressing an image with xz"""
+ self.assertEqual(0, runCmd("wic create directdisk "
+ "--image-name core-image-minimal "
+ "-c xz").status)
+ self.assertEqual(1, len(glob(self.resultdir + \
+ "directdisk-*.direct.xz")))
+
+ def test15_wrong_compressor(self):
+ """Test how wic breaks if wrong compressor is provided"""
+ self.assertEqual(2, runCmd("wic create directdisk "
+ "--image-name core-image-minimal "
+ "-c wrong", ignore_status=True).status)
More information about the Openembedded-commits
mailing list