bb.fatal() exists right away while bb.error() does some cleanup
before exiting. Fixes running tests during image build with TESTIMAGE_AUTO
multiple times in a row when some of the tests fail:

$ killall -9 Cooker ; bitbake -c clean core-image-base ; \
bitbake core-image-base ; \
bitbake core-image-base

With bb.fatal() something in cleanup is not done and second
image build builds an empty rootfs into .wic image.
Workaround is to kill Cooker processes between bitbake calls,
or to switch testimage.bbclass from bb.fatal() to bb.error()
logging which is done here.

Signed-off-by: Mikko Rapeli <mikko.rap...@linaro.org>
---
 meta/classes-recipe/testimage.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes-recipe/testimage.bbclass 
b/meta/classes-recipe/testimage.bbclass
index a9b031093a..055002d3fd 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -399,9 +399,9 @@ def testimage_main(d):
     os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, 
os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
 
     if not results or not complete:
-        bb.fatal('%s - FAILED - tests were interrupted during execution, check 
the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
+        bb.error('%s - FAILED - tests were interrupted during execution, check 
the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
     if not results.wasSuccessful():
-        bb.fatal('%s - FAILED - also check the logs in %s' % (pn, 
d.getVar("LOG_DIR")), forcelog=True)
+        bb.error('%s - FAILED - also check the logs in %s' % (pn, 
d.getVar("LOG_DIR")), forcelog=True)
 
 def get_runtime_paths(d):
     """
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#207419): 
https://lists.openembedded.org/g/openembedded-core/message/207419
Mute This Topic: https://lists.openembedded.org/mt/109681808/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to