From: Libertad Cruz <libertad.c...@intel.com> Adds dpkg testcases for testing basic operation functionality for the dpkg package manager.
[YOCTO #10063] Signed-off-by: Libertad Cruz <libertad.c...@intel.com> --- meta/lib/oeqa/runtime/cases/dpkg.py | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 meta/lib/oeqa/runtime/cases/dpkg.py diff --git a/meta/lib/oeqa/runtime/cases/dpkg.py b/meta/lib/oeqa/runtime/cases/dpkg.py new file mode 100644 index 0000000..cd1183c --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/dpkg.py @@ -0,0 +1,52 @@ +import os +import re +import subprocess + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.oeid import OETestID +from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature +from oeqa.runtime.decorator.package import OEHasPackage + + +class dpkgTest(OERuntimeTestCase): + def dpkg(self, command, expected=0): + status, output = self.target.run(command, 1500) + message = os.linesep.join([command, output]) + self.assertEqual(status, expected, message) + return output + +class dpkgBasicTest(dpkgTest): + @skipIfNotFeature('package-management','Test requires package-management to be in IMAGE_FEATURES') + @skipIfNotDataVar('IMAGE_PKGTYPE','deb','DEB is not the primary package manager') + @OEHasPackage(['dpkg']) + + @OETestDepends(['ssh.SSHTest.test_ssh']) + @OETestID(1801) + def test_dpkg_help(self): + self.dpkg('dpkg --help') + + @OETestDepends(['dpkg.dpkgBasicTest.test_dpkg_help']) + @OETestID(1802) + def test_dpkg_version(self): + self.dpkg('dpkg --version') + + @OETestID(1803) + def test_dpkg_Dhelp(self): + self.dpkg('dpkg -Dhelp') + + @OETestID(1805) + def test_dpkg_force_help(self): + self.dpkg('dpkg --force-help') + + @OETestID(1806) + def test_dpkg_deb_help(self): + self.dpkg('dpkg-deb --help') + + @OETestID(1812) + def test_dpkg_status(self): + self.dpkg('dpkg -s dpkg') + + @OETestID(1814) + def test_dpkg_list(self): + self.dpkg('dpkg -l') -- 2.1.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core