diff options
author | Ross Burton <ross.burton@intel.com> | 2016-08-23 15:14:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-25 23:03:45 +0100 |
commit | 8670979d228d402b8a4331031ef7617c8284a926 (patch) | |
tree | 99f20b2cff47650e279ca6dc7f8169f7463cea5f /meta/lib | |
parent | 578f8113da65cd63de192429145e21eea5135948 (diff) | |
download | poky-8670979d228d402b8a4331031ef7617c8284a926.tar.gz |
oeqa/runtime/rpm: use su instead of sudo
This test works fine with su, which is more likely to be installed in images
than sudo.
(From OE-Core rev: 59d10be745a1f7d31c68e4d5da9e1c3461b7d390)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/runtime/rpm.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py index 624c515aad..4d03ecbf4a 100644 --- a/meta/lib/oeqa/runtime/rpm.py +++ b/meta/lib/oeqa/runtime/rpm.py | |||
@@ -53,9 +53,9 @@ class RpmInstallRemoveTest(oeRuntimeTest): | |||
53 | def test_rpm_query_nonroot(self): | 53 | def test_rpm_query_nonroot(self): |
54 | (status, output) = self.target.run('useradd test1') | 54 | (status, output) = self.target.run('useradd test1') |
55 | self.assertTrue(status == 0, msg="Failed to create new user: " + output) | 55 | self.assertTrue(status == 0, msg="Failed to create new user: " + output) |
56 | (status, output) = self.target.run('sudo -u test1 id') | 56 | (status, output) = self.target.run('su -c id test1') |
57 | self.assertTrue('(test1)' in output, msg="Failed to execute as new user") | 57 | self.assertTrue('(test1)' in output, msg="Failed to execute as new user") |
58 | (status, output) = self.target.run('sudo -u test1 rpm -qa') | 58 | (status, output) = self.target.run('su -c "rpm -qa" test1 ') |
59 | self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output)) | 59 | self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output)) |
60 | 60 | ||
61 | @testcase(195) | 61 | @testcase(195) |
@@ -98,4 +98,3 @@ class RpmInstallRemoveTest(oeRuntimeTest): | |||
98 | @classmethod | 98 | @classmethod |
99 | def tearDownClass(self): | 99 | def tearDownClass(self): |
100 | oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm') | 100 | oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm') |
101 | |||