[oe-commits] [openembedded-core] 27/53: oeqa/runtime/cases/rpm.py: change to use base-passwd-doc

git at git.openembedded.org git at git.openembedded.org
Sat Jun 16 14:25:53 UTC 2018


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

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

commit c828e7bd7a95e0ee9a31c0282dafd859bd11b7db
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Thu Jun 14 12:52:32 2018 +0800

    oeqa/runtime/cases/rpm.py: change to use base-passwd-doc
    
    The test cases assume that rpm-doc is built out, as it says it its
    comment. This is not always true. And it sometimes results in
    following error.
    
      |     cls.tc.target.copyTo(test_file, dst)
      | UnboundLocalError: local variable 'test_file' referenced before assignment
    
    Change to use base-passwd-doc, as this package is more likely to be
    built out than rpm-doc.
    
    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 | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index 58df28b..1e5e463 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -39,31 +39,31 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
 
         pkgarch = cls.td['TUNE_PKGARCH'].replace('-', '_')
         rpmdir = os.path.join(cls.tc.td['DEPLOY_DIR'], 'rpm', pkgarch)
-        # Pick rpm-doc as a test file to get installed, because it's small
+        # 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 = 'rpm-doc-*.%s.rpm' % pkgarch
+        rpm_doc = 'base-passwd-doc-*.%s.rpm' % pkgarch
         for f in fnmatch.filter(os.listdir(rpmdir), rpm_doc):
             test_file = os.path.join(rpmdir, f)
-        dst = '/tmp/rpm-doc.rpm'
+        dst = '/tmp/base-passwd-doc.rpm'
         cls.tc.target.copyTo(test_file, dst)
 
     @classmethod
     def tearDownClass(cls):
-        dst = '/tmp/rpm-doc.rpm'
+        dst = '/tmp/base-passwd-doc.rpm'
         cls.tc.target.run('rm -f %s' % dst)
 
     @OETestID(192)
     @OETestDepends(['rpm.RpmBasicTest.test_rpm_help'])
     def test_rpm_install(self):
-        status, output = self.target.run('rpm -ivh /tmp/rpm-doc.rpm')
-        msg = 'Failed to install rpm-doc package: %s' % output
+        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)
 
     @OETestID(194)
     @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_install'])
     def test_rpm_remove(self):
-        status,output = self.target.run('rpm -e rpm-doc')
-        msg = 'Failed to remove rpm-doc package: %s' % output
+        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)
 
     @OETestID(1096)
@@ -119,16 +119,16 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
         self.assertEqual(0, status, msg=msg)
 
         # Remove the package just in case
-        self.target.run('rpm -e rpm-doc')
+        self.target.run('rpm -e base-passwd-doc')
 
         # Install/Remove a package 10 times
         for i in range(10):
-            status, output = self.target.run('rpm -ivh /tmp/rpm-doc.rpm')
-            msg = 'Failed to install rpm-doc package. Reason: {}'.format(output)
+            status, output = self.target.run('rpm -ivh /tmp/base-passwd-doc.rpm')
+            msg = 'Failed to install base-passwd-doc package. Reason: {}'.format(output)
             self.assertEqual(0, status, msg=msg)
 
-            status, output = self.target.run('rpm -e rpm-doc')
-            msg = 'Failed to remove rpm-doc package. Reason: {}'.format(output)
+            status, output = self.target.run('rpm -e base-passwd-doc')
+            msg = 'Failed to remove base-passwd-doc package. Reason: {}'.format(output)
             self.assertEqual(0, status, msg=msg)
 
         # if using systemd this should ensure all entries are flushed to /var

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


More information about the Openembedded-commits mailing list