Commit 6cf083ba authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

testharnessreport: Enable counter-printing for /html/dom/reflection*.

Change-Id: If1e1ad4b48d3b97a209c8fe3727d885c64fdc8bd
Reviewed-on: https://chromium-review.googlesource.com/599136
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491686}
parent 0b2d71b0
This is a testharness.js-based test.
Found 6750 tests; 6552 PASS, 198 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS img.title: 32 tests
PASS img.lang: 32 tests
PASS img.dir: 62 tests
......
This is a testharness.js-based test.
Found 7074 tests; 6624 PASS, 450 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS form.title: 32 tests
PASS form.lang: 32 tests
PASS form.dir: 62 tests
......
This is a testharness.js-based test.
Found 2458 tests; 2344 PASS, 114 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS head.title: 32 tests
PASS head.lang: 32 tests
PASS head.dir: 62 tests
......
This is a testharness.js-based test.
Found 3089 tests; 3075 PASS, 14 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS html.title: 32 tests
PASS html.lang: 32 tests
PASS html.dir: 62 tests
......
This is a testharness.js-based test.
Found 2809 tests; 2351 PASS, 458 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS applet.title: 32 tests
PASS applet.lang: 32 tests
PASS applet.dir: 62 tests
......
This is a testharness.js-based test.
Found 4830 tests; 4820 PASS, 10 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS table.title: 32 tests
PASS table.lang: 32 tests
PASS table.dir: 62 tests
......
This is a testharness.js-based test.
Found 7799 tests; 7755 PASS, 44 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS a.title: 32 tests
PASS a.lang: 32 tests
PASS a.dir: 62 tests
......
......@@ -175,6 +175,11 @@
harness_status.message +
"\n";
}
// Iterate through tests array and build string that contains
// results for all tests.
let testResults = "";
let resultCounter = [0, 0, 0, 0];
// reflection tests contain huge number of tests, and Chromium code
// review tool has the 1MB diff size limit. We merge PASS lines.
if (output_document.URL.indexOf("/html/dom/reflection") >= 0) {
......@@ -188,40 +193,39 @@
if (!tests[j].name.startsWith(prefix) || tests[j].status != 0)
break;
}
if ((j - i) > 1) {
resultStr += convertResult(tests[i].status) +
" " + sanitize(prefix) + " " + (j - i) + " tests\n"
const numPasses = j - i;
if (numPasses > 1) {
resultCounter[0] += numPasses;
testResults += convertResult(tests[i].status) +
` ${sanitize(prefix)} ${numPasses} tests\n`;
i = j - 1;
continue;
}
}
}
resultStr += convertResult(tests[i].status) + " " +
resultCounter[tests[i].status]++;
testResults += convertResult(tests[i].status) + " " +
sanitize(tests[i].name) + " " +
sanitize(tests[i].message) + "\n";
}
} else {
// Iterate through tests array and build string that contains
// results for all tests.
let testResults = "";
let resultCounter = [0, 0, 0, 0];
for (var i = 0; i < tests.length; ++i) {
resultCounter[tests[i].status]++;
testResults += convertResult(tests[i].status) + " " +
sanitize(tests[i].name) + " " +
sanitize(tests[i].message) + "\n";
}
if (output_document.URL.indexOf("http://web-platform.test") >= 0 &&
tests.length >= 50 && (resultCounter[1] || resultCounter[2] || resultCounter[3])) {
// Output failure metrics if there are many.
resultStr += `Found ${tests.length} tests;` +
` ${resultCounter[0]} PASS,` +
` ${resultCounter[1]} FAIL,` +
` ${resultCounter[2]} TIMEOUT,` +
` ${resultCounter[3]} NOTRUN.\n`;
}
resultStr += testResults;
}
if (output_document.URL.indexOf("http://web-platform.test") >= 0 &&
tests.length >= 50 && (resultCounter[1] || resultCounter[2] || resultCounter[3])) {
// Output failure metrics if there are many.
resultStr += `Found ${tests.length} tests;` +
` ${resultCounter[0]} PASS,` +
` ${resultCounter[1]} FAIL,` +
` ${resultCounter[2]} TIMEOUT,` +
` ${resultCounter[3]} NOTRUN.\n`;
}
resultStr += testResults;
resultStr += "Harness: the test ran to completion.\n";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment