diff options
author | Alexandru Palalau <alexandrux.palalau@intel.com> | 2013-08-20 16:15:48 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-26 11:47:20 +0100 |
commit | 4ea9e94f55897a5583f4722ee9a856993088c1dc (patch) | |
tree | 8aaf94927263ef5059383e50dc44f37f1dff57c7 /meta/lib/oeqa | |
parent | 748ddc39e56623f4e48987f0467f4722f6e162f2 (diff) | |
download | poky-4ea9e94f55897a5583f4722ee9a856993088c1dc.tar.gz |
lib/oeqa/runtime: add new PAM support test
New test which verifies some usual commands functionality with PAM support
(From OE-Core rev: 06c7914e3354ff4e430a6b664f40e5a71e212761)
Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/runtime/pam.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/pam.py b/meta/lib/oeqa/runtime/pam.py new file mode 100644 index 0000000000..52e1eb88e6 --- /dev/null +++ b/meta/lib/oeqa/runtime/pam.py | |||
@@ -0,0 +1,24 @@ | |||
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 | |||
4 | import unittest | ||
5 | from oeqa.oetest import oeRuntimeTest | ||
6 | from oeqa.utils.decorators import * | ||
7 | |||
8 | def setUpModule(): | ||
9 | if not oeRuntimeTest.hasFeature("pam"): | ||
10 | skipModule("target doesn't have 'pam' in DISTRO_FEATURES") | ||
11 | |||
12 | |||
13 | class PamBasicTest(oeRuntimeTest): | ||
14 | |||
15 | @skipUnlessPassed('test_ssh') | ||
16 | def test_pam(self): | ||
17 | (status, output) = self.target.run('login --help') | ||
18 | self.assertEqual(status, 1, msg = "login command does not work as expected. Status and output:%s and %s" %(status, output)) | ||
19 | (status, output) = self.target.run('passwd --help') | ||
20 | self.assertEqual(status, 6, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output)) | ||
21 | (status, output) = self.target.run('su --help') | ||
22 | self.assertEqual(status, 2, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output)) | ||
23 | (status, output) = self.target.run('useradd --help') | ||
24 | self.assertEqual(status, 2, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output)) | ||