diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-06-01 13:03:10 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-04 15:15:00 +0100 |
commit | 272ef77429935455863ec25299062a58e4511a94 (patch) | |
tree | 663c79a7c3fb63a0eb7d082e0f5cc7491e53013c | |
parent | a9ddcc4772a1c8678adc916f24aa24add2a9e759 (diff) | |
download | poky-272ef77429935455863ec25299062a58e4511a94.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.
(From OE-Core rev: fa7ba486ded13907f63f9300f66350ba2835a3f7)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/testimage.bbclass | 13 |
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 () { | |||
117 | } | 117 | } |
118 | 118 | ||
119 | python do_testimage() { | 119 | python do_testimage() { |
120 | |||
121 | testimage_sanity(d) | ||
122 | |||
123 | if (d.getVar('IMAGE_PKGTYPE') == 'rpm' | ||
124 | and ('dnf' in d.getVar('TEST_SUITES') or 'auto' in d.getVar('TEST_SUITES'))): | ||
125 | create_rpm_index(d) | ||
126 | |||
127 | testimage_main(d) | 120 | testimage_main(d) |
128 | } | 121 | } |
129 | 122 | ||
@@ -159,6 +152,12 @@ def testimage_main(d): | |||
159 | """ | 152 | """ |
160 | raise RuntimeError | 153 | raise RuntimeError |
161 | 154 | ||
155 | testimage_sanity(d) | ||
156 | |||
157 | if (d.getVar('IMAGE_PKGTYPE') == 'rpm' | ||
158 | and ('dnf' in d.getVar('TEST_SUITES') or 'auto' in d.getVar('TEST_SUITES'))): | ||
159 | create_rpm_index(d) | ||
160 | |||
162 | logger = make_logger_bitbake_compatible(logging.getLogger("BitBake")) | 161 | logger = make_logger_bitbake_compatible(logging.getLogger("BitBake")) |
163 | pn = d.getVar("PN") | 162 | pn = d.getVar("PN") |
164 | 163 | ||