summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/pam.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-11-01 07:48:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:20 +0000
commitb569aa0e0056a97b29577f5bda611ef3dd539db3 (patch)
tree64f4d7856959435abfc7c49258688f64861f6d7c /meta/lib/oeqa/runtime/cases/pam.py
parent3857e5c91da678d7bdc07712a1df9daa14354986 (diff)
downloadpoky-b569aa0e0056a97b29577f5bda611ef3dd539db3.tar.gz
oeqa/runtime/cases: Migrate runtime tests.
This migrates current runtime test suite to be used with the new framework. [YOCTO #10234] (From OE-Core rev: b39c61f2d442c79d03b73e8ffd104996fcb2177e) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/pam.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/pam.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/pam.py b/meta/lib/oeqa/runtime/cases/pam.py
new file mode 100644
index 0000000000..3654cdc946
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/pam.py
@@ -0,0 +1,33 @@
1# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=287 testcase
2# Note that the image under test must have "pam" in DISTRO_FEATURES
3
4from oeqa.runtime.case import OERuntimeTestCase
5from oeqa.core.decorator.depends import OETestDepends
6from oeqa.core.decorator.oeid import OETestID
7from oeqa.core.decorator.data import skipIfNotFeature
8
9class PamBasicTest(OERuntimeTestCase):
10
11 @OETestID(1543)
12 @skipIfNotFeature('pam', 'Test requires pam to be in DISTRO_FEATURES')
13 @OETestDepends(['ssh.SSHTest.test_ssh'])
14 def test_pam(self):
15 status, output = self.target.run('login --help')
16 msg = ('login command does not work as expected. '
17 'Status and output:%s and %s' % (status, output))
18 self.assertEqual(status, 1, msg = msg)
19
20 status, output = self.target.run('passwd --help')
21 msg = ('passwd command does not work as expected. '
22 'Status and output:%s and %s' % (status, output))
23 self.assertEqual(status, 0, msg = msg)
24
25 status, output = self.target.run('su --help')
26 msg = ('su command does not work as expected. '
27 'Status and output:%s and %s' % (status, output))
28 self.assertEqual(status, 0, msg = msg)
29
30 status, output = self.target.run('useradd --help')
31 msg = ('useradd command does not work as expected. '
32 'Status and output:%s and %s' % (status, output))
33 self.assertEqual(status, 0, msg = msg)