allow specifying a maximum allowed difference in the info json

This commit is contained in:
Konstantin Käfer
2014-07-09 15:17:51 -07:00
parent 440eb6ffd0
commit f2ee02d3ca

View File

@@ -60,9 +60,12 @@ function processFiles() {
function writeResult(base, info, error, difference) {
var color = 'green';
if (difference > 0.01 && exitCode < 1) {
exitCode = 1;
var allowedDifference = ('diff' in info) ? info.diff : 0.01;
if (difference > allowedDifference) {
color = 'red';
if (exitCode < 1) {
exitCode = 1;
}
}
html +=