Bug 1465527 - Return structured stacktrace from Marionette reftest harness. r=jgraham
authorAndreas Tolfsen <ato@sny.no>
Wed, 30 May 2018 18:37:13 +0100
changeset 475068 8fd817cc95a7dc611539856eabde846c7446a80f
parent 475067 2492931ce122e95206ce2653f8adf107c99019f5
child 475069 0a2f54ae94caf3c686e5be9b98ed367bf4336eb4
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1465527
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1465527 - Return structured stacktrace from Marionette reftest harness. r=jgraham The reftest harness embedded in Marionette previously only included the stacktrace of the error in the "message" field to wptrunner. Now that wptrunner supports logging parent test stacktraces, this patch changes the "message" field to include the stringified error message (including the error type information) and adds a new "stack" field with the stacktrace previously logged as the error message. MozReview-Commit-ID: KlrCZi01XWC
testing/marionette/reftest.js
--- a/testing/marionette/reftest.js
+++ b/testing/marionette/reftest.js
@@ -190,17 +190,22 @@ min-width: 600px; min-height: 600px; max
       }, timeout);
     });
 
     let testRunner = (async () => {
       let result;
       try {
         result = await this.runTest(testUrl, references, expected, timeout);
       } catch (e) {
-        result = {status: STATUS.ERROR, message: e.stack, extra: {}};
+        result = {
+          status: STATUS.ERROR,
+          message: String(e),
+          stack: e.stack,
+          extra: {},
+        };
       }
       return result;
     })();
 
     let result = await Promise.race([testRunner, timeoutPromise]);
     this.parentWindow.clearTimeout(timeoutHandle);
     if (result.status === STATUS.TIMEOUT) {
       this.abort();