[oe-commits] Stefan Stanacar : testimage: include traceback when loading a test fails

git at git.openembedded.org git at git.openembedded.org
Fri Dec 20 12:24:15 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: 0c30a25c3d5f7fb1087dff45e01595329620235f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0c30a25c3d5f7fb1087dff45e01595329620235f

Author: Stefan Stanacar <stefanx.stanacar at intel.com>
Date:   Wed Dec 18 20:31:55 2013 +0200

testimage: include traceback when loading a test fails

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

Signed-off-by: Stefan Stanacar <stefanx.stanacar at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/classes/testimage.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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()
 



More information about the Openembedded-commits mailing list