diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2025-02-03 14:28:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-05 12:49:56 +0000 |
commit | 908be6fd24fba2d62414226b01104604019cecec (patch) | |
tree | d7c48cffa1603c0e8f76e152a1be263b1fe72850 /meta/classes-recipe | |
parent | d16b82e7cad6a6218df8a589ae7bbb5228ad73b7 (diff) | |
download | poky-908be6fd24fba2d62414226b01104604019cecec.tar.gz |
testimage.bbclass: fix logDetails() call on error path
This happens when testimage task runs and bitbake is interupted
twice with ctrl-c/SIGINT:
QMP Available for connection at /home/builder/src/base/repo/meta-arm/build/tmp/.xjik9srq
QMP connected to QEMU at 01/31/25 10:36:19 and took 0.55 seconds
QMP released QEMU at 01/31/25 10:36:19 and took 0.07 seconds from connect
Keyboard Interrupt, closing down...
Second Keyboard Interrupt, stopping...
WARNING: Exiting due to interrupt.
NOTE: Sending SIGTERM to remaining 1 tasks
ERROR: core-image-base-1.0-r0 do_testimage: testimage interrupted, shutting down...
Output from runqemu:
runqemu - INFO - Received signal: 15
runqemu - INFO - Cleaning up
runqemu - INFO - Host uptime: 6230788.40
tput: No value for $TERM and no -T specified
ERROR: core-image-base-1.0-r0 do_testimage: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_testimage(d)
0003:
File: '/home/builder/src/base/repo/meta-arm/build/../poky/meta/classes-recipe/testimage.bbclass', lineno: 122, function: do_testimage
0118: dump-guest-memory {"paging":false,"protocol":"file:%s.img"}
0119:}
0120:
0121:python do_testimage() {
*** 0122: testimage_main(d)
0123:}
0124:
0125:addtask testimage
0126:do_testimage[nostamp] = "1"
File: '/home/builder/src/base/repo/meta-arm/build/../poky/meta/classes-recipe/testimage.bbclass', lineno: 389, function: testimage_main
0385:
0386: # Show results (if we have them)
0387: if results:
0388: configuration = get_testimage_configuration(d, 'runtime', machine)
*** 0389: results.logDetails(get_json_result_dir(d),
0390: configuration,
0391: get_testimage_result_id(configuration),
0392: dump_streams=d.getVar('TESTREPORT_FULLLOGS'))
0393: results.logSummary(pn)
Exception: AttributeError: 'TestResult' object has no attribute 'logDetails'
ERROR: Logfile of failure stored in: /home/builder/src/base/repo/meta-arm/build/tmp/work/qemuarm64_secureboot-poky-linux/core-image-base/1.0/temp/log.do_testimage.2771735
Summary: 1 task failed:
/home/builder/src/base/repo/meta-arm/build/../poky/meta/recipes-core/images/core-image-base.bb:do_testimage
(From OE-Core rev: c0d864a7007adbdf332da62e89c73630b3e01639)
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.bbclass | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index 97ed4223c4..e090b1ef4b 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass | |||
@@ -378,7 +378,6 @@ def testimage_main(d): | |||
378 | bb.error('runqemu failed, shutting down...') | 378 | bb.error('runqemu failed, shutting down...') |
379 | if results: | 379 | if results: |
380 | results.stop() | 380 | results.stop() |
381 | results = tc.results | ||
382 | finally: | 381 | finally: |
383 | signal.signal(signal.SIGTERM, orig_sigterm_handler) | 382 | signal.signal(signal.SIGTERM, orig_sigterm_handler) |
384 | tc.target.stop() | 383 | tc.target.stop() |
@@ -400,7 +399,7 @@ def testimage_main(d): | |||
400 | 399 | ||
401 | if not results or not complete: | 400 | if not results or not complete: |
402 | bb.error('%s - FAILED - tests were interrupted during execution, check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True) | 401 | 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(): | 402 | if results and not results.wasSuccessful(): |
404 | bb.error('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True) | 403 | bb.error('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True) |
405 | 404 | ||
406 | def get_runtime_paths(d): | 405 | def get_runtime_paths(d): |