[oe-commits] [openembedded-core] 04/07: oeqa/runtime/dnf: Make sure test_dnf_install does not skipped
git at git.openembedded.org
git at git.openembedded.org
Wed Aug 29 14:17:54 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 252ed4de53bd43c2a37736957e1436bae2bee737
Author: Yeoh Ee Peng <ee.peng.yeoh at intel.com>
AuthorDate: Wed Aug 29 17:48:21 2018 +0800
oeqa/runtime/dnf: Make sure test_dnf_install does not skipped
During debugging dnf issue, we found that the test_dnf_install
PASSED the testing even though the environment does not allow
dnf install to run successfully. Further debugging had identified
that current test_dnf_install will execute dnf install even when
the package to be installed already exist, thus dnf install
will just skipped and this test will PASSED even though it was
not.
To solve this, added additional logic to check if the package
to be installed already exist, if yes then remove the package
before actually run dnf install. This will make sure dnf install
was tested as expected.
Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/runtime/cases/dnf.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index 67484bc..e93a1ce 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -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'])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list