Skip to contentSkip to conversation

testimage: include traceback when loading a test fails

PATCH New Stefan Stanacar 1 participant 1 message Dec 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testimage: include traceback when loading a test fails

Makes it much easier to figure out where a syntax error is.

---
 meta/classes/testimage.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/testimage.bbclass +2 -1
index add8009..1161e59 100644
@@ -122,7 +122,8 @@ def testimage_main(d):
     try:
         loadTests(tc)
     except Exception as e:
-        bb.fatal("Loading tests failed:\n %s" % e)
+        import traceback
+        bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
 
     target.deploy()
 
Signature · 1 line
1.8.3.1