summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2018-08-29 17:48:21 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 22:27:46 +0000
commit4ca53b38ce75ff012c11b719b4989510ba69014a (patch)
tree9a52dcbdb5c06985407f69f6ae6effd9fc46bd74 /meta
parentf663c39ce25b4a4775aa65e6ac0f5b2e18e9d767 (diff)
downloadpoky-4ca53b38ce75ff012c11b719b4989510ba69014a.tar.gz
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. (From OE-Core rev: 4f662b253f7313c4e02bfafb527cdac076b6309a) (From OE-Core rev: a80498e62898110e2ed6b01cbb9f5dd85995d13b) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/runtime/cases/dnf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index 7da31cbf88..dd7affca0a 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -67,7 +67,8 @@ class DnfRepoTest(DnfTest):
67 deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port) 67 deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port)
68 cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs] 68 cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs]
69 69
70 self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command) 70 output = self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command)
71 return output
71 72
72 @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) 73 @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
73 @OETestID(1744) 74 @OETestID(1744)
@@ -88,6 +89,9 @@ class DnfRepoTest(DnfTest):
88 @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache']) 89 @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
89 @OETestID(1740) 90 @OETestID(1740)
90 def test_dnf_install(self): 91 def test_dnf_install(self):
92 output = self.dnf_with_repo('list run-postinsts-dev')
93 if 'Installed Packages' in output:
94 self.dnf_with_repo('remove -y run-postinsts-dev')
91 self.dnf_with_repo('install -y run-postinsts-dev') 95 self.dnf_with_repo('install -y run-postinsts-dev')
92 96
93 @OETestDepends(['dnf.DnfRepoTest.test_dnf_install']) 97 @OETestDepends(['dnf.DnfRepoTest.test_dnf_install'])