Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V3] dpky.py: Adds testcases for dpkg package manager
@ 2017-09-27 20:04 libertad.cruz
  2017-09-27 20:00 ` ✗ patchtest: failure for dpky.py: Adds testcases for dpkg package manager (rev3) Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: libertad.cruz @ 2017-09-27 20:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: libertad.cruz

From: libertad <libertad.cruz@intel.com>

Adds dpkg testcases for testing basic operation functionality for the dpkg packgage manager.Adds new assert function to verify expected results given by the dpkg package.

[YOCTO #10063]

Signed-off-by: libertad <libertad.cruz@intel.com>
---
 meta/lib/oeqa/runtime/cases/dpkg.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/dpkg.py b/meta/lib/oeqa/runtime/cases/dpkg.py
index cd1183c7f12..1bef332effa 100644
--- a/meta/lib/oeqa/runtime/cases/dpkg.py
+++ b/meta/lib/oeqa/runtime/cases/dpkg.py
@@ -10,9 +10,10 @@ from oeqa.runtime.decorator.package import OEHasPackage
 
 
 class dpkgTest(OERuntimeTestCase):
-    def dpkg(self, command, expected=0):
+    def dpkg(self, command, expectedStr, expected=0):
         status, output = self.target.run(command, 1500)
         message = os.linesep.join([command, output])
+        self.assertIn(expectedStr, output) 
         self.assertEqual(status, expected, message)
         return output
 
@@ -24,29 +25,29 @@ class dpkgBasicTest(dpkgTest):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OETestID(1801)
     def test_dpkg_help(self):
-        self.dpkg('dpkg --help')
+        self.dpkg('dpkg --help',"Usage: dpkg [<option> ...] <command>")
 
     @OETestDepends(['dpkg.dpkgBasicTest.test_dpkg_help'])
     @OETestID(1802)
     def test_dpkg_version(self):
-        self.dpkg('dpkg --version')
+        self.dpkg('dpkg --version',"Debian 'dpkg' package management program version")
 
     @OETestID(1803)
     def test_dpkg_Dhelp(self):
-        self.dpkg('dpkg -Dhelp')
+        self.dpkg('dpkg -Dhelp',"dpkg debugging option, --debug=<octal> or -D<octal>:")
 
     @OETestID(1805)
     def test_dpkg_force_help(self):
-        self.dpkg('dpkg --force-help')
+        self.dpkg('dpkg --force-help',"dpkg forcing options - control behaviour when problems found:")
 
     @OETestID(1806)
     def test_dpkg_deb_help(self):
-        self.dpkg('dpkg-deb --help')
+        self.dpkg('dpkg-deb --help',"Usage: dpkg-deb [<option> ...] <command>")
 
     @OETestID(1812)
     def test_dpkg_status(self):
-        self.dpkg('dpkg -s dpkg')
+        self.dpkg('dpkg -s dpkg',"Package: dpkg")
 
     @OETestID(1814)
     def test_dpkg_list(self):
-        self.dpkg('dpkg -l')
+        self.dpkg('dpkg -l',"Desired=Unknown/Install/Remove/Purge/Hold")
-- 
2.12.3



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

end of thread, other threads:[~2017-09-27 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 20:04 [PATCH V3] dpky.py: Adds testcases for dpkg package manager libertad.cruz
2017-09-27 20:00 ` ✗ patchtest: failure for dpky.py: Adds testcases for dpkg package manager (rev3) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox