summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-06-01 13:03:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-04 15:14:43 +0100
commitfa7ba486ded13907f63f9300f66350ba2835a3f7 (patch)
tree2f1ebcd144ef7cc516dd9c5ec7999946b2d45d72
parent263f8ad612674b0b47cd980212556332c17cb370 (diff)
downloadopenembedded-core-contrib-fa7ba486ded13907f63f9300f66350ba2835a3f7.tar.gz
testimage.bbclass: move codes into testimage_main
testimage-auto is expected to run testimage task's codes automatically. But in fact, it's currently missing some codes, including testimage_sanity and create_rpm_index. This leads to the problem of unexpected runtime failure of test_dnf_makecache. The error message is as below. RESULTS - dnf.DnfRepoTest.test_dnf_makecache - Testcase 1744: ERROR This error is caused by the fact that create_rpm_index is not executed before running the tests. There's no reason why such codes should not be in testimage_main, so move them into it. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/testimage.bbclass13
1 files changed, 6 insertions, 7 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 14252ffc8a..c17a7c604b 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -117,13 +117,6 @@ testimage_dump_host () {
}
python do_testimage() {
-
- testimage_sanity(d)
-
- if (d.getVar('IMAGE_PKGTYPE') == 'rpm'
- and ('dnf' in d.getVar('TEST_SUITES') or 'auto' in d.getVar('TEST_SUITES'))):
- create_rpm_index(d)
-
testimage_main(d)
}
@@ -159,6 +152,12 @@ def testimage_main(d):
"""
raise RuntimeError
+ testimage_sanity(d)
+
+ if (d.getVar('IMAGE_PKGTYPE') == 'rpm'
+ and ('dnf' in d.getVar('TEST_SUITES') or 'auto' in d.getVar('TEST_SUITES'))):
+ create_rpm_index(d)
+
logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
pn = d.getVar("PN")