Skip to contentSkip to conversation

oeqa/pam: Need shadow installed for the tests

PATCH New Khem Raj 1 participant 1 message Feb 25, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 oeqa/pam: Need shadow installed for the tests

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

---
v2: Check for dependencies instead of trying to run it without shadow

 meta/lib/oeqa/runtime/cases/pam.py | 3 +++
 1 file changed, 3 insertions(+)
meta/lib/oeqa/runtime/cases/pam.py +3 -0
index 271a1943e3..a482ded945 100644
@@ -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. '
Signature · 1 line
2.30.1