aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-08-23 15:14:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-06 11:43:18 +0100
commit0c35ac4b1b78a0b1be8e50ced5502c1bf9d31774 (patch)
tree6b8977a73b1cf892cbf6d1b82173a685ba729fc4
parent793b6e57d7cf4a093223b4cd34085a929a5c43c3 (diff)
downloadopenembedded-core-0c35ac4b1b78a0b1be8e50ced5502c1bf9d31774.zip
openembedded-core-0c35ac4b1b78a0b1be8e50ced5502c1bf9d31774.tar.gz
openembedded-core-0c35ac4b1b78a0b1be8e50ced5502c1bf9d31774.tar.bz2
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>
-rw-r--r--meta/lib/oeqa/runtime/rpm.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index 624c515..4d03ecb 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -53,9 +53,9 @@ class RpmInstallRemoveTest(oeRuntimeTest):
def test_rpm_query_nonroot(self):
(status, output) = self.target.run('useradd test1')
self.assertTrue(status == 0, msg="Failed to create new user: " + output)
- (status, output) = self.target.run('sudo -u test1 id')
+ (status, output) = self.target.run('su -c id test1')
self.assertTrue('(test1)' in output, msg="Failed to execute as new user")
- (status, output) = self.target.run('sudo -u test1 rpm -qa')
+ (status, output) = self.target.run('su -c "rpm -qa" test1 ')
self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
@testcase(195)
@@ -98,4 +98,3 @@ class RpmInstallRemoveTest(oeRuntimeTest):
@classmethod
def tearDownClass(self):
oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm')
-