From 1a4b7ee28bf7413af6513fb45ad0d0736048f866 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Sun, 16 Dec 2018 17:11:34 -0800 Subject: reset upstream subtrees to yocto 2.6 Reset the following subtrees on thud HEAD: poky: 87e3a9739d meta-openembedded: 6094ae18c8 meta-security: 31dc4e7532 meta-raspberrypi: a48743dc36 meta-xilinx: c42016e2e6 Also re-apply backports that didn't make it into thud: poky: 17726d0 systemd-systemctl-native: handle Install wildcards meta-openembedded: 4321a5d libtinyxml2: update to 7.0.1 042f0a3 libcereal: Add native and nativesdk classes e23284f libcereal: Allow empty package 030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG 179a1b9 gtest: update to 1.8.1 Squashed OpenBMC subtree compatibility updates: meta-aspeed: Brad Bishop (1): aspeed: add yocto 2.6 compatibility meta-ibm: Brad Bishop (1): ibm: prepare for yocto 2.6 meta-ingrasys: Brad Bishop (1): ingrasys: set layer compatibility to yocto 2.6 meta-openpower: Brad Bishop (1): openpower: set layer compatibility to yocto 2.6 meta-phosphor: Brad Bishop (3): phosphor: set layer compatibility to thud phosphor: libgpg-error: drop patches phosphor: react to fitimage artifact rename Ed Tanous (4): Dropbear: upgrade options for latest upgrade yocto2.6: update openssl options busybox: remove upstream watchdog patch systemd: Rebase CONFIG_CGROUP_BPF patch Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7 Signed-off-by: Brad Bishop --- poky/meta/lib/oeqa/runtime/cases/dnf.py | 48 +++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'poky/meta/lib/oeqa/runtime/cases/dnf.py') diff --git a/poky/meta/lib/oeqa/runtime/cases/dnf.py b/poky/meta/lib/oeqa/runtime/cases/dnf.py index 2f87296b4..c1ed39d77 100644 --- a/poky/meta/lib/oeqa/runtime/cases/dnf.py +++ b/poky/meta/lib/oeqa/runtime/cases/dnf.py @@ -55,7 +55,7 @@ class DnfRepoTest(DnfTest): @classmethod def setUpClass(cls): cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-testimage-repo'), - cls.tc.target.server_ip) + cls.tc.target.server_ip, logger=cls.tc.logger) cls.repo_server.start() @classmethod @@ -67,7 +67,8 @@ class DnfRepoTest(DnfTest): deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port) cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs] - self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command) + output = self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command) + return output @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) @OETestID(1744) @@ -88,6 +89,9 @@ class DnfRepoTest(DnfTest): @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache']) @OETestID(1740) def test_dnf_install(self): + output = self.dnf_with_repo('list run-postinsts-dev') + if 'Installed Packages' in output: + self.dnf_with_repo('remove -y run-postinsts-dev') self.dnf_with_repo('install -y run-postinsts-dev') @OETestDepends(['dnf.DnfRepoTest.test_dnf_install']) @@ -120,4 +124,44 @@ 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 --exclude=curl-staticdev 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) -- cgit v1.2.3