All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3] dpky.py: Adds testcases for dpkg package manager
@ 2017-09-27 20:43 libertad.cruz
  2017-09-27 21:00 ` ✗ patchtest: failure for dpky.py: Adds testcases for dpkg package manager (rev4) Patchwork
  2017-09-28 13:28 ` [PATCH V3] dpky.py: Adds testcases for dpkg package manager Burton, Ross
  0 siblings, 2 replies; 6+ messages in thread
From: libertad.cruz @ 2017-09-27 20:43 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] 6+ messages in thread

* ✗ patchtest: failure for dpky.py: Adds testcases for dpkg package manager (rev4)
  2017-09-27 20:43 [PATCH V3] dpky.py: Adds testcases for dpkg package manager libertad.cruz
@ 2017-09-27 21:00 ` Patchwork
  2017-09-28 13:28 ` [PATCH V3] dpky.py: Adds testcases for dpkg package manager Burton, Ross
  1 sibling, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-09-27 21:00 UTC (permalink / raw)
  To: libertad.cruz; +Cc: openembedded-core

== Series Details ==

Series: dpky.py: Adds testcases for dpkg package manager (rev4)
Revision: 4
URL   : https://patchwork.openembedded.org/series/7695/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at abf2e9526a)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* Re: [PATCH V3] dpky.py: Adds testcases for dpkg package manager
  2017-09-27 20:43 [PATCH V3] dpky.py: Adds testcases for dpkg package manager libertad.cruz
  2017-09-27 21:00 ` ✗ patchtest: failure for dpky.py: Adds testcases for dpkg package manager (rev4) Patchwork
@ 2017-09-28 13:28 ` Burton, Ross
  2017-09-29 11:36   ` Alexander Kanavin
  2017-09-29 12:45   ` Alexander Kanavin
  1 sibling, 2 replies; 6+ messages in thread
From: Burton, Ross @ 2017-09-28 13:28 UTC (permalink / raw)
  To: Libertad Cruz; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

On 27 September 2017 at 21:43, <libertad.cruz@intel.com> wrote:

> 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
>

Basic functionality of a package manager is list packages, add packages,
remove packages.

Whereas the bulk of this this test verifies that four combinations of
--help or --version work, which isn't actually testing anything beyond "is
dpkg installed".

Can we just remove all of them?  I don't see the point in cluttering
testopia and the source with test cases that don't actually test anything.

     @OETestID(1812)
>      def test_dpkg_status(self):
> -        self.dpkg('dpkg -s dpkg')
> +        self.dpkg('dpkg -s dpkg',"Package: dpkg")
>

I'd suggest also verifying the status.  It should be 'Status: install ok
installed'.


>      @OETestID(1814)
>      def test_dpkg_list(self):
> -        self.dpkg('dpkg -l')
> +        self.dpkg('dpkg -l',"Desired=Unknown/Install/Remove/Purge/Hold")
>

If dpkg -l crashes immediately after outputting the header (say, the
database parser was broken) then this test would pass.

Either search it for some essential packages ("ii dpkg" would be a good
start), or remove the test.

Ross

[-- Attachment #2: Type: text/html, Size: 2605 bytes --]

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

* Re: [PATCH V3] dpky.py: Adds testcases for dpkg package manager
  2017-09-28 13:28 ` [PATCH V3] dpky.py: Adds testcases for dpkg package manager Burton, Ross
@ 2017-09-29 11:36   ` Alexander Kanavin
  2017-09-29 12:45   ` Alexander Kanavin
  1 sibling, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2017-09-29 11:36 UTC (permalink / raw)
  To: Burton, Ross, Libertad Cruz; +Cc: OE-core

On 09/28/2017 04:28 PM, Burton, Ross wrote:
> On 27 September 2017 at 21:43, <libertad.cruz@intel.com 
> <mailto:libertad.cruz@intel.com>> wrote:
> 
>     From: libertad <libertad.cruz@intel.com
>     <mailto: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
> 
> 
> Basic functionality of a package manager is list packages, add packages, 
> remove packages.
> 
> Whereas the bulk of this this test verifies that four combinations of 
> --help or --version work, which isn't actually testing anything beyond 
> "is dpkg installed".
> 
> Can we just remove all of them?  I don't see the point in cluttering 
> testopia and the source with test cases that don't actually test anything.

Useful dpkg testcases could be modeled on, for instance, 
meta/lib/oeqa/runtime/cases/rpm.py.

Alex


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

* Re: [PATCH V3] dpky.py: Adds testcases for dpkg package manager
  2017-09-28 13:28 ` [PATCH V3] dpky.py: Adds testcases for dpkg package manager Burton, Ross
  2017-09-29 11:36   ` Alexander Kanavin
@ 2017-09-29 12:45   ` Alexander Kanavin
  1 sibling, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2017-09-29 12:45 UTC (permalink / raw)
  To: Burton, Ross, Libertad Cruz; +Cc: OE-core

On 09/28/2017 04:28 PM, Burton, Ross wrote:

> Either search it for some essential packages ("ii dpkg" would be a good 
> start), or remove the test.

We actually don't even have meta/lib/oeqa/runtime/cases/dpkg.py in 
master; the patch is modifying a file that doesn't exist. Hence, 
patchwork failure.

Alex


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

* [PATCH V3] dpky.py: Adds testcases for dpkg package manager
@ 2017-09-27 20:04 libertad.cruz
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

end of thread, other threads:[~2017-09-29 12:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 20:43 [PATCH V3] dpky.py: Adds testcases for dpkg package manager libertad.cruz
2017-09-27 21:00 ` ✗ patchtest: failure for dpky.py: Adds testcases for dpkg package manager (rev4) Patchwork
2017-09-28 13:28 ` [PATCH V3] dpky.py: Adds testcases for dpkg package manager Burton, Ross
2017-09-29 11:36   ` Alexander Kanavin
2017-09-29 12:45   ` Alexander Kanavin
  -- strict thread matches above, loose matches on Subject: below --
2017-09-27 20:04 libertad.cruz

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.