mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1278577 - Use simple strings as reftest test ids, r=ahal
The idea of mozlog ids being tuples unfortunately didn't work so well with external systems that found the tuple|string datatype difficult to work with. Convert reftests to use simple ids of the form "<test url> <comparison> <refurl>" e.g. "about:blank == data:text/html," instead of tuples. MozReview-Commit-ID: 18jufbssn4A --HG-- extra : rebase_source : 542888186fecf3671847d1fca307770c7a989ad3
This commit is contained in:
parent
7a5475e4a8
commit
bc68fdaad1
@ -567,8 +567,8 @@ class RefTest(object):
|
||||
def record_last_test(message):
|
||||
"""Records the last test seen by this harness for the benefit of crash logging."""
|
||||
if message['action'] == 'test_start':
|
||||
if isinstance(message['test'], tuple):
|
||||
self.lastTestSeen = message['test'][0]
|
||||
if " " in message['test']:
|
||||
self.lastTestSeen = message['test'].split(" ")[0]
|
||||
else:
|
||||
self.lastTestSeen = message['test']
|
||||
|
||||
|
@ -34,7 +34,7 @@ this.StructuredLogger = function(name, dumpFun=dump, mutators=[]) {
|
||||
*/
|
||||
StructuredLogger.prototype = {
|
||||
testStart: function (test) {
|
||||
var data = {test: test};
|
||||
var data = {test: this._testId(test)};
|
||||
this._logData("test_start", data);
|
||||
},
|
||||
|
||||
@ -47,7 +47,7 @@ StructuredLogger.prototype = {
|
||||
}
|
||||
|
||||
var data = {
|
||||
test: test,
|
||||
test: this._testId(test),
|
||||
subtest: subtest,
|
||||
status: status,
|
||||
};
|
||||
@ -69,7 +69,7 @@ StructuredLogger.prototype = {
|
||||
},
|
||||
|
||||
testEnd: function (test, status, expected="OK", message=null, stack=null, extra=null) {
|
||||
var data = {test: test, status: status};
|
||||
var data = {test: this._testId(test), status: status};
|
||||
|
||||
if (expected != status && status != "SKIP") {
|
||||
data.expected = expected;
|
||||
@ -88,7 +88,7 @@ StructuredLogger.prototype = {
|
||||
},
|
||||
|
||||
suiteStart: function (tests, runinfo=null, versioninfo=null, deviceinfo=null, extra=null) {
|
||||
var data = {tests: tests};
|
||||
var data = {tests: tests.map(x => this._testId(x))};
|
||||
if (runinfo !== null) {
|
||||
data.runinfo = runinfo;
|
||||
}
|
||||
@ -186,7 +186,14 @@ StructuredLogger.prototype = {
|
||||
}
|
||||
|
||||
this._dumpFun(allData);
|
||||
}
|
||||
},
|
||||
|
||||
_testId: function(test) {
|
||||
if (Array.isArray(test)) {
|
||||
return test.join(" ");
|
||||
}
|
||||
return test;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user