Skip to content
Snippets Groups Projects
Commit 3421b7ee authored by David C. Lonie's avatar David C. Lonie
Browse files

Show the best matching image in CDash on test failure.

The first baseline was always used for comparison; now the best matched
image will be shown.
parent fa3eef53
No related branches found
No related tags found
No related merge requests found
......@@ -467,6 +467,10 @@ int vtkTesting::RegressionTest(vtkAlgorithm* imageSource,
validName = validName.substr(slashPos + 1);
}
// We want to print the filename of the best matching image for better
// comparisons in CDash:
string bestImageFileName = this->ValidImageFileName;
// check the valid image
FILE *rtFin = fopen(this->ValidImageFileName, "r");
if (rtFin)
......@@ -640,6 +644,7 @@ int vtkTesting::RegressionTest(vtkAlgorithm* imageSource,
{
errIndex = count;
minError = error;
bestImageFileName = newFileName;
}
}
++count;
......@@ -767,7 +772,7 @@ int vtkTesting::RegressionTest(vtkAlgorithm* imageSource,
}
os << "<DartMeasurementFile name=\"ValidImage\" type=\"image/png\">";
os << this->ValidImageFileName;
os << bestImageFileName;
os << "</DartMeasurementFile>";
return FAILED;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment