Skip to content

Commit

Permalink
filter out broken results
Browse files Browse the repository at this point in the history
  • Loading branch information
darobin committed May 28, 2014
1 parent 612cf5b commit 6c9c205
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion index.js
Expand Up @@ -47,7 +47,7 @@ var fs = require("fs-extra")
process.exit(1);
}
, esc = function (str) {
if (str === undefined) return "-";
if (str === undefined || str === "ManualCheckNeeded") return "-";
if (!str) return str;
return str.replace(/&/g, "&")
.replace(/</g, "&lt;")
Expand Down Expand Up @@ -166,6 +166,13 @@ for (var test in out.results) {
, total: 0
};
for (var n in run.subtests) {
var haveResults = 0;
for (var i = 0, m = out.ua.length; i < m; i++) {
var res = run.subtests[n].byUA[out.ua[i]]
if (!res || res === "TIMEOUT" || res === "NOTRUN") continue;
haveResults++;
}
if (haveResults <= 1) continue; // skip tests with all but one undefined
result.total++;
totalSubtests++;
if (!run.subtests[n].totals.PASS || run.subtests[n].totals.PASS < 2) result.fails.push({ name: n, byUA: run.subtests[n].byUA });
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "wptreport"
, "version": "0.1.0"
, "version": "0.1.1"
, "license": "MIT"
, "dependencies": {
"nopt": "2.2.0"
Expand Down

0 comments on commit 6c9c205

Please sign in to comment.