diff options
author | Milan Shah <mshah@mvista.com> | 2021-01-04 11:24:02 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2021-01-05 07:51:21 -1000 |
commit | 59272d46d61b3328ebd5c72d702d7e5b368afeb4 (patch) | |
tree | 6f3ea0627557cf5567dcff1ba3e51d57a7c106bc | |
parent | 4b976db13cfbd27a39e98902bd4699f4e43e5598 (diff) | |
download | openembedded-core-59272d46d61b3328ebd5c72d702d7e5b368afeb4.tar.gz |
oe-pkgdata-util: Added a test to verify oe-pkgdata-util without parameters
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.
Signed-off-by: Milan Shah <mshah@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6b4e2eafa6eb71ca94ccc8a18d05b473b352367c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/pkgdata.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py index 833a1803ba..254abc40c6 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) + currpos = result.output.find('usage: oe-pkgdata-util') + self.assertTrue(currpos != -1, msg = "Test is Failed. Help is not Displayed in %s" % result.output) |