summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-01 14:05:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-05 12:37:02 +0000
commitd8d5199e6652b7a4ffd5ae47f4165add4d19d268 (patch)
tree43b850f8b121cd8ebe3e9adeac64163c5c1a25f1 /meta/lib/oeqa
parentba89e87d8ec28e20d75d28b1bb7a240593733c8b (diff)
downloadpoky-d8d5199e6652b7a4ffd5ae47f4165add4d19d268.tar.gz
lib/oe/utils: Improve multiprocess_lauch exception handling
We've seen a cryptic: "ERROR: Fatal errors occurred in subprocesses, tracebacks printed above" message from oe-selftest with no other traceback information. Improve the traceback logging to try and give a better indication of any errors that is ocurring. (From OE-Core rev: 521dd3d00979a27b6932e58d5497de68abac26e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oelib/utils.py b/meta/lib/oeqa/selftest/cases/oelib/utils.py
index 275aeda74e..789c6f78d2 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/utils.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/utils.py
@@ -66,6 +66,9 @@ class TestMultiprocessLaunch(TestCase):
66 66
67 def dummyerror(msg): 67 def dummyerror(msg):
68 print("ERROR: %s" % msg) 68 print("ERROR: %s" % msg)
69 def dummyfatal(msg):
70 print("ERROR: %s" % msg)
71 raise bb.BBHandledException()
69 72
70 @contextmanager 73 @contextmanager
71 def captured_output(): 74 def captured_output():
@@ -79,6 +82,7 @@ class TestMultiprocessLaunch(TestCase):
79 82
80 d = bb.data_smart.DataSmart() 83 d = bb.data_smart.DataSmart()
81 bb.error = dummyerror 84 bb.error = dummyerror
85 bb.fatal = dummyfatal
82 86
83 # Assert the function returns the right results 87 # Assert the function returns the right results
84 result = multiprocess_launch(testfunction, ["3", "4", "5", "6"], d, extraargs=(d,)) 88 result = multiprocess_launch(testfunction, ["3", "4", "5", "6"], d, extraargs=(d,))