All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] oe-pkgdata-util: Added a test to verify oe-pkgdata-util without parameters
@ 2020-12-22 11:24 Milan Shah
  2020-12-22 13:44 ` [OE-core] " Paul Barker
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Shah @ 2020-12-22 11:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Milan Shah

A test is implemented on poky/meta/lib/oeqa/selftest/pkgdata.py to test
the scenario when oe-pkgdata-util is executed without parameters and
help is displayed.

See [YOCTO #10726] for detailed bug information.

Upstream-Status: Submitted

Signed-off-by: Milan Shah <mshah@mvista.com>
---
 meta/lib/oeqa/selftest/cases/pkgdata.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index 833a180..d3a5519 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -218,3 +218,9 @@ class OePkgdataUtilTests(OESelftestTestCase):
     def test_specify_pkgdatadir(self):
         result = runCmd('oe-pkgdata-util -p %s lookup-pkg zlib' % get_bb_var('PKGDATA_DIR'))
         self.assertEqual(result.output, 'libz1')
+
+    def test_no_param(self):
+        result = runCmd('oe-pkgdata-util', ignore_status=True)
+        self.assertEqual(result.status, 2, "Status different than 2. output: %s" % result.output)
+        self.assertIn('oe-pkgdata-util: error: the following arguments are required: <subcommand>', result.output)
+        self.assertIn('usage: oe-pkgdata-util [-h] [-d] [-p PKGDATA_DIR] <subcommand>', result.output)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-24 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 11:24 [meta-oe][PATCH] oe-pkgdata-util: Added a test to verify oe-pkgdata-util without parameters Milan Shah
2020-12-22 13:44 ` [OE-core] " Paul Barker
2020-12-24 13:04   ` Milan Shah

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.