Bug 1452432 - Convert 'test' field to a string in assertionCount StructuredLog.jsm messages, r?gbrown draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 09 Apr 2018 11:50:05 -0400
changeset 779274 e4120cc6dcdcba7520efdf7a02ffe529e7dbbd1c
parent 779146 30d72755b1749953d438199456f1524ce84ab5e5
child 779450 ef3860489f639b9dbcdbc4dc4f947b5bbcee8db0
push id105730
push userahalberstadt@mozilla.com
push dateMon, 09 Apr 2018 15:59:02 +0000
reviewersgbrown
bugs1452432
milestone61.0a1
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
testing/modules/StructuredLog.jsm
--- 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;