[OE-core] [PATCH v2] opkg.py Adds tests for ipk/opkg

Cruz, Libertad libertad.cruz at intel.com
Fri Jul 21 21:16:01 UTC 2017


This tests are made for runtime/cases, I believe it is the format other runtime test are script, they only check for return code == 0 . Should we consider opening another bug to add opkg testcases to selftest?

Best Regards
Libertad G.

From: Burton, Ross [mailto:ross.burton at intel.com]
Sent: Monday, July 17, 2017 7:28 AM
To: Cruz, Libertad <libertad.cruz at intel.com>
Cc: OE-core <openembedded-core at lists.openembedded.org>
Subject: Re: [OE-core] [PATCH v2] opkg.py Adds tests for ipk/opkg


On 10 July 2017 at 21:22, <libertad.cruz at intel.com<mailto:libertad.cruz at intel.com>> wrote:
+class opkgBasicTest(opkgTest):
+    @skipIfNotFeature('package-management', 'Test requires package-management to be in IMAGE_FEATURES')
+    @skipIfNotDataVar('IMAGE_PKGTYPE','ipk', 'IPK is not the primary package manager')
+    @OEHasPackage(['opkg'])
+
+    @OETestDepends(['ssh.SSHTest.test_ssh'])
+    @OETestID(1841)
+    def test_opkg_list(self):
+       self.opkg('list')
+
+    @OETestID(1842)
+    def test_opkg_list_installed(self):
+       self.opkg('list-installed')
+
+    @OETestID(1843)
+    def test_opkg_depends(self):
+       self.opkg('depends opkg')
+
+    @OETestID(1837)
+    def test_opkg_whatdepends(self):
+      self.opkg('whatdepends opkg')
+
+    @OETestID(1838)
+    def test_opkg_status(self):
+      self.opkg('status')
+
+    @OETestID(1839)
+    def test_opkg_info(self):
+        self.opkg('info opkg')
+
+    @OETestID(1840)
+    def test_opkg_print_architecture(self):
+        self.opkg('print-architecture')

I'd feel a lot happier that this was a selftest if it was exercising more than "opkg doesn't crash".  If opkg is replaced by a script that does "echo haha; exit 0" this test case would pass, so can it verify the output too.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170721/044aae08/attachment-0002.html>


More information about the Openembedded-core mailing list