[oe-commits] [openembedded-core] 08/15: oeqa/runtime/rpm: Move test_rpm_query_nonroot test case to RpmBasicTest

git at git.openembedded.org git at git.openembedded.org
Mon Jul 15 08:32:23 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 506388a10a26613524602dcb4e630f216c6fee60
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Fri Jul 12 16:55:28 2019 +0800

    oeqa/runtime/rpm: Move test_rpm_query_nonroot test case to RpmBasicTest
    
    The test_rpm_query_nonroot test case was in RpmInstallRemoveTest.
    But it should logically belong to RpmBasicTest. So move it there.
    
    Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/runtime/cases/rpm.py | 59 +++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 29 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index 2b45d34..8e18b42 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -30,35 +30,6 @@ class RpmBasicTest(OERuntimeTestCase):
         msg = 'status and output: %s and %s' % (status, output)
         self.assertEqual(status, 0, msg=msg)
 
-class RpmInstallRemoveTest(OERuntimeTestCase):
-
-    @classmethod
-    def setUpClass(cls):
-        pkgarch = cls.td['TUNE_PKGARCH'].replace('-', '_')
-        rpmdir = os.path.join(cls.tc.td['DEPLOY_DIR'], 'rpm', pkgarch)
-        # Pick base-passwd-doc as a test file to get installed, because it's small
-        # and it will always be built for standard targets
-        rpm_doc = 'base-passwd-doc-*.%s.rpm' % pkgarch
-        if not os.path.exists(rpmdir):
-            return
-        for f in fnmatch.filter(os.listdir(rpmdir), rpm_doc):
-            cls.test_file = os.path.join(rpmdir, f)
-        cls.dst = '/tmp/base-passwd-doc.rpm'
-
-    @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
-    def test_rpm_install(self):
-        self.tc.target.copyTo(self.test_file, self.dst)
-        status, output = self.target.run('rpm -ivh /tmp/base-passwd-doc.rpm')
-        msg = 'Failed to install base-passwd-doc package: %s' % output
-        self.assertEqual(status, 0, msg=msg)
-        self.tc.target.run('rm -f %s' % self.dst)
-
-    @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_install'])
-    def test_rpm_remove(self):
-        status,output = self.target.run('rpm -e base-passwd-doc')
-        msg = 'Failed to remove base-passwd-doc package: %s' % output
-        self.assertEqual(status, 0, msg=msg)
-
     @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
     def test_rpm_query_nonroot(self):
 
@@ -105,6 +76,36 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
         finally:
             unset_up_test_user(tuser)
 
+
+class RpmInstallRemoveTest(OERuntimeTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        pkgarch = cls.td['TUNE_PKGARCH'].replace('-', '_')
+        rpmdir = os.path.join(cls.tc.td['DEPLOY_DIR'], 'rpm', pkgarch)
+        # Pick base-passwd-doc as a test file to get installed, because it's small
+        # and it will always be built for standard targets
+        rpm_doc = 'base-passwd-doc-*.%s.rpm' % pkgarch
+        if not os.path.exists(rpmdir):
+            return
+        for f in fnmatch.filter(os.listdir(rpmdir), rpm_doc):
+            cls.test_file = os.path.join(rpmdir, f)
+        cls.dst = '/tmp/base-passwd-doc.rpm'
+
+    @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
+    def test_rpm_install(self):
+        self.tc.target.copyTo(self.test_file, self.dst)
+        status, output = self.target.run('rpm -ivh /tmp/base-passwd-doc.rpm')
+        msg = 'Failed to install base-passwd-doc package: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+        self.tc.target.run('rm -f %s' % self.dst)
+
+    @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_install'])
+    def test_rpm_remove(self):
+        status,output = self.target.run('rpm -e base-passwd-doc')
+        msg = 'Failed to remove base-passwd-doc package: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+
     @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_remove'])
     def test_check_rpm_install_removal_log_file_size(self):
         """

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list