[oe-commits] [openembedded-core] 04/04: Revert "runtime/dnf: Add new dnf test cases"

git at git.openembedded.org git at git.openembedded.org
Thu May 10 22:03:49 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 d25bc93a541795e4580a9a85a2a19ed8bdbd38c3
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu May 10 23:03:18 2018 +0100

    Revert "runtime/dnf: Add new dnf test cases"
    
    This reverts commit 5c6753ff0ac96e4f546355a97238214009dfffb7.
---
 meta/classes/testimage.bbclass     | 11 +++--------
 meta/lib/oeqa/runtime/cases/dnf.py | 40 --------------------------------------
 2 files changed, 3 insertions(+), 48 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index bb688b0..77291c2 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -331,7 +331,6 @@ def create_index(arg):
     return None
 
 def create_rpm_index(d):
-    import glob
     # Index RPMs
     rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
     index_cmds = []
@@ -348,13 +347,9 @@ def create_rpm_index(d):
         lf = bb.utils.lockfile(lockfilename, False)
         oe.path.copyhardlinktree(rpm_dir, idx_path)
         # Full indexes overload a 256MB image so reduce the number of rpms
-        # in the feed by filtering to specific packages needed by the tests.
-        package_list = glob.glob(idx_path + "*/*.rpm")
-
-        for pkg in package_list:
-            if not os.path.basename(pkg).startswith(("rpm", "run-postinsts", "busybox", "bash", "update-alternatives", "libc6", "curl", "musl")):
-                bb.utils.remove(pkg)
-
+        # in the feed. Filter to r* since we use the run-postinst packages and
+        # this leaves some allarch and machine arch packages too.
+        bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm")
         bb.utils.unlockfile(lf)
         cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)
 
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index 7da31cb..2f87296 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -120,44 +120,4 @@ class DnfRepoTest(DnfTest):
     def test_dnf_reinstall(self):
         self.dnf_with_repo('reinstall -y run-postinsts-dev')
 
-    @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
-    @OETestID(1771)
-    def test_dnf_installroot(self):
-        rootpath = '/home/root/chroot/test'
-        #Copy necessary files to avoid errors with not yet installed tools on
-        #installroot directory.
-        self.target.run('mkdir -p %s/etc' % rootpath, 1500)
-        self.target.run('mkdir -p %s/bin %s/sbin %s/usr/bin %s/usr/sbin' % (rootpath, rootpath, rootpath, rootpath), 1500)
-        self.target.run('mkdir -p %s/dev' % rootpath, 1500)
-        #Handle different architectures lib dirs
-        self.target.run('mkdir -p %s/lib' % rootpath, 1500)
-        self.target.run('mkdir -p %s/libx32' % rootpath, 1500)
-        self.target.run('mkdir -p %s/lib64' % rootpath, 1500)
-        self.target.run('cp /lib/libtinfo.so.5 %s/lib' % rootpath, 1500)
-        self.target.run('cp /libx32/libtinfo.so.5 %s/libx32' % rootpath, 1500)
-        self.target.run('cp /lib64/libtinfo.so.5 %s/lib64' % rootpath, 1500)
-        self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500)
-        self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500)
-        self.target.run('cp /bin/sh %s/bin' % rootpath, 1500)
-        self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500)
-        self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox run-postinsts' % rootpath)
-        status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500)
-        self.assertEqual(0, status, output)
-        status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500)
-        self.assertEqual(0, status, output)
 
-    @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
-    @OETestID(1772)
-    def test_dnf_exclude(self):
-        excludepkg = 'curl-dev'
-        self.dnf_with_repo('install -y curl*')
-        self.dnf('list %s' % excludepkg, 0)
-        #Avoid remove dependencies to skip some errors on different archs and images
-        self.dnf_with_repo('remove --setopt=clean_requirements_on_remove=0 -y curl*')
-        #check curl-dev is not installed adter removing all curl occurrences
-        status, output = self.target.run('dnf list --installed | grep %s'% excludepkg, 1500)
-        self.assertEqual(1, status, "%s was not removed,  is listed as installed"%excludepkg)
-        self.dnf_with_repo('install -y --exclude=%s curl*' % excludepkg)
-        #check curl-dev is not installed after being excluded
-        status, output = self.target.run('dnf list --installed | grep %s'% excludepkg , 1500)
-        self.assertEqual(1, status, "%s was not excluded, is listed as installed"%excludepkg)

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


More information about the Openembedded-commits mailing list