Bug 1407390 - [marionette] Log underlying exception message if harness execution fails. r=ato, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Mon, 20 May 2019 07:10:48 +0000
changeset 536551 a91455c1338ebd4b8bc70e151f773fcac43368a0
parent 536550 c9853f0ed69e76b3ab71072065fad8ec9a640974
child 536552 aed55b0dd6434e35229937f34238b3172fa7d800
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1407390
milestone68.0
Bug 1407390 - [marionette] Log underlying exception message if harness execution fails. r=ato, a=test-only Differential Revision: https://phabricator.services.mozilla.com/D31753
testing/marionette/harness/marionette_harness/runtests.py
--- a/testing/marionette/harness/marionette_harness/runtests.py
+++ b/testing/marionette/harness/marionette_harness/runtests.py
@@ -86,16 +86,16 @@ def cli(runner_class=MarionetteTestRunne
     """
     logger = mozlog.commandline.setup_logging('Marionette test runner', {})
     try:
         harness_instance = harness_class(runner_class, parser_class, testcase_class,
                                          args=args)
         failed = harness_instance.run()
         if failed > 0:
             sys.exit(10)
-    except Exception:
-        logger.error('Failure during harness execution', exc_info=True)
+    except Exception as e:
+        logger.error(e.message, exc_info=True)
         sys.exit(1)
     sys.exit(0)
 
 
 if __name__ == "__main__":
     cli()