summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-16 14:19:49 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:38:16 +0100
commitebd9f7b1da8ed556e98aab4d5f4e81707ac44b27 (patch)
tree4ce03ddbd3836188bd6ed066c89d63be5c38924a /meta
parent0997208266686473d23aed0fab58a1fd7c5d8cae (diff)
downloadopenembedded-core-ebd9f7b1da8ed556e98aab4d5f4e81707ac44b27.tar.gz
openembedded-core-ebd9f7b1da8ed556e98aab4d5f4e81707ac44b27.tar.bz2
openembedded-core-ebd9f7b1da8ed556e98aab4d5f4e81707ac44b27.zip
wic: Return error code when wic fails to invoke command
Return 1 if command doesn't exist or wic is called without any commmand. Return result of invoke_command as wic return code. Added tests for unsupported command and no command. Fixed typo in test case test02_createhelp spotted by this fix. [YOCTO #7856] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/wic.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 60c8cb3deb..5fa190db06 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -52,7 +52,7 @@ class Wic(oeSelfTest):
def test02_createhelp(self):
"""Test wic create --help"""
- self.assertEqual(0, runCmd('wic creat --help').status)
+ self.assertEqual(0, runCmd('wic create --help').status)
def test03_listhelp(self):
"""Test wic list --help"""
@@ -82,3 +82,12 @@ class Wic(oeSelfTest):
self.assertEqual(0, runCmd("wic create directdisk-gpt "
"--image-name core-image-minimal").status)
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
+
+ def test07_unsupported_subcommand(self):
+ """Test unsupported subcommand"""
+ self.assertEqual(1, runCmd('wic unsupported',
+ ignore_status=True).status)
+
+ def test08_no_command(self):
+ """Test wic without command"""
+ self.assertEqual(1, runCmd('wic', ignore_status=True).status)