[OE-core] [PATCH V3] dpky.py: Adds testcases for dpkg package manager

Burton, Ross ross.burton at intel.com
Thu Sep 28 13:28:38 UTC 2017


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

> From: libertad <libertad.cruz at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170928/4bbcb92a/attachment-0002.html>


More information about the Openembedded-core mailing list