Bug 1452432 - Convert 'test' field to a string in assertionCount StructuredLog.jsm messages, r?gbrown
For messages that have a test field (like testStart/testStatus/testEnd/etc),
the StructuredLog.jsm module converts the field to a string if it was an Array
(as used by reftest). It looks like the assertionCount message accidentally got
left out.
I don't believe this conversion should be happening in StructuredLog.jsm. It
should either happen in the formatters, or in reftest.jsm. But for now it's
better to be consistent. Another bug for another time.
MozReview-Commit-ID: DjdoEqxoujT
--- a/testing/modules/StructuredLog.jsm
+++ b/testing/modules/StructuredLog.jsm
@@ -83,20 +83,20 @@ StructuredLogger.prototype = {
if (extra !== null) {
data.extra = extra;
}
this._logData("test_end", data);
},
assertionCount(test, count, minExpected = 0, maxExpected = 0) {
- var data = {test,
- min_expected: minExpected,
- max_expected: maxExpected,
- count};
+ var data = {test: this._testId(test),
+ min_expected: minExpected,
+ max_expected: maxExpected,
+ count};
this._logData("assertion_count", data);
},
suiteStart(tests, name = null, runinfo = null, versioninfo = null, deviceinfo = null, extra = null) {
var data = {tests: tests.map(x => this._testId(x))};
if (name !== null) {
data.name = name;