зеркало из https://github.com/mozilla/gecko-dev.git
bug 379327 - have mochitest print test filename in FAIL lines. r=sayrer
This commit is contained in:
Родитель
98f86293af
Коммит
2734931499
|
@ -65,9 +65,13 @@ SimpleTest.todo = function(condition, name, diag) {
|
|||
SimpleTest._logResult = function(test, passString, failString) {
|
||||
var msg = test.result ? passString : failString;
|
||||
msg += " | " + test.name;
|
||||
var url = "";
|
||||
if (parentRunner.currentTestURL)
|
||||
url = " | " + parentRunner.currentTestURL;
|
||||
|
||||
if (test.result) {
|
||||
if (test.todo)
|
||||
parentRunner.logger.error(msg)
|
||||
parentRunner.logger.error(msg + url)
|
||||
else
|
||||
parentRunner.logger.log(msg);
|
||||
} else {
|
||||
|
@ -75,7 +79,7 @@ SimpleTest._logResult = function(test, passString, failString) {
|
|||
if (test.todo)
|
||||
parentRunner.logger.log(msg)
|
||||
else
|
||||
parentRunner.logger.error(msg);
|
||||
parentRunner.logger.error(msg + url);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
var TestRunner = {};
|
||||
TestRunner.logEnabled = false;
|
||||
TestRunner._currentTest = 0;
|
||||
TestRunner.currentTestURL = "";
|
||||
TestRunner._urls = [];
|
||||
|
||||
/**
|
||||
|
@ -86,6 +87,8 @@ TestRunner.runTests = function (/*url...*/) {
|
|||
TestRunner.runNextTest = function() {
|
||||
if (TestRunner._currentTest < TestRunner._urls.length) {
|
||||
var url = TestRunner._urls[TestRunner._currentTest];
|
||||
TestRunner.currentTestURL = url;
|
||||
|
||||
$("current-test-path").innerHTML = url;
|
||||
|
||||
if (TestRunner.logEnabled)
|
||||
|
|
Загрузка…
Ссылка в новой задаче