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

--HG--
extra : rebase_source : 533dfef4318961d72682a42097cc8511e4198a13
This commit is contained in:
Andreas Tolfsen 2018-05-30 18:37:13 +01:00
Родитель 6808e58482
Коммит de2f3011e4
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -195,7 +195,12 @@ min-width: 600px; min-height: 600px; max-width: 600px; max-height: 600px`;
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;
})();