Patchwork testimage: include traceback when loading a test fails

login
register
mail settings
Submitter Stanacar, StefanX
Date Dec. 18, 2013, 6:31 p.m.
Message ID <1387391515-10611-1-git-send-email-stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/63551/
State New
Headers show

Comments

Stanacar, StefanX - Dec. 18, 2013, 6:31 p.m.
Makes it much easier to figure out where a syntax error is.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 meta/classes/testimage.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index add8009..1161e59 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -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()