diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/dnf.py')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/dnf.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py index 2f87296b4e0..1dd3a5de388 100644 --- a/meta/lib/oeqa/runtime/cases/dnf.py +++ b/meta/lib/oeqa/runtime/cases/dnf.py @@ -120,4 +120,34 @@ 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' + try: + self.dnf_with_repo('install --installroot=%s -v -y busybox run-postinsts' % rootpath) + except: + self.target.run('mkdir -p %s/etc' % 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.dnf_with_repo('install --installroot=%s -v -y 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' + try: + self.dnf('list curl %s' % excludepkg ,0) + except: + self.dnf_with_repo('install -y curl*') + self.dnf('list %s' % excludepkg, 0) + + self.dnf_with_repo('remove -y curl*') + self.dnf('list %s' % excludepkg, 1) + self.dnf_with_repo('install -y --exclude=%s curl*' % excludepkg) + self.dnf('list %s' % excludepkg, 1) |