summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2024-11-20 12:10:07 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-21 12:16:28 +0000
commit4b3b37156cdf70230bc74c647784da8514c284cf (patch)
tree249feacedc0a4237cc12b5c8993be9e09a0e974b /meta/classes-recipe
parent8f644a65b6f13099a4231fa76ec25ef0553d7c91 (diff)
downloadpoky-4b3b37156cdf70230bc74c647784da8514c284cf.tar.gz
testimage.bbclass: change test failure logging from bb.fatal() to bb.error()
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. (From OE-Core rev: 077bdd26e6c5bd161f082524ceee9e90d56315b5) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/testimage.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index 19075ce1f3..5463170fa5 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -399,9 +399,9 @@ def testimage_main(d):
399 os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME')))) 399 os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
400 400
401 if not results or not complete: 401 if not results or not complete:
402 bb.fatal('%s - FAILED - tests were interrupted during execution, check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True) 402 bb.error('%s - FAILED - tests were interrupted during execution, check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
403 if not results.wasSuccessful(): 403 if not results.wasSuccessful():
404 bb.fatal('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True) 404 bb.error('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
405 405
406def get_runtime_paths(d): 406def get_runtime_paths(d):
407 """ 407 """