diff options
authorYeoh Ee Peng <>2018-08-29 17:48:21 +0800
committerRichard Purdie <>2018-08-29 15:42:21 +0100
commitb95b913108c064433c52c9898a08199ba58759ff (patch)
parent9c33184f0e2310b23ee545f7c916babb0a0413b0 (diff)
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 <> Signed-off-by: Richard Purdie <>
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ b/meta/lib/oeqa/runtime/cases/
index 67484bc9f9..e93a1cea06 100644
--- a/meta/lib/oeqa/runtime/cases/
+++ b/meta/lib/oeqa/runtime/cases/
@@ -67,7 +67,8 @@ class DnfRepoTest(DnfTest):
deploy_url = 'http://%s:%s/' %(, 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
@@ -88,6 +89,9 @@ class DnfRepoTest(DnfTest):
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')