]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/pam: Need shadow installed for the tests
authorKhem Raj <raj.khem@gmail.com>
Thu, 25 Feb 2021 23:29:16 +0000 (15:29 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 27 Feb 2021 22:40:36 +0000 (22:40 +0000)
Distros may not use shadow for login manager
secondly login --help returns 1 only with shadow provided login
utility, with busybox it returns normal 0, the testcase clearly
assumes shadow being part of image, therefore add needed
checks to ensure the pre-requisites are met

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/pam.py

index 271a1943e301e04331a9900d03d54544a1e1162d..a482ded94598ab06f0812448ff6d09dcab2de6f1 100644 (file)
@@ -8,11 +8,14 @@
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
 
 class PamBasicTest(OERuntimeTestCase):
 
     @skipIfNotFeature('pam', 'Test requires pam to be in DISTRO_FEATURES')
     @OETestDepends(['ssh.SSHTest.test_ssh'])
+    @OEHasPackage(['shadow'])
+    @OEHasPackage(['shadow-base'])
     def test_pam(self):
         status, output = self.target.run('login --help')
         msg = ('login command does not work as expected. '