Upload test images to cdash

This commit is contained in:
Tim Sutton 2012-04-14 21:50:32 +02:00
parent ba003e6ee3
commit aab9976b55

View File

@ -22,6 +22,7 @@
#include <QTime>
#include <QCryptographicHash>
#include <QByteArray>
#include <QDebug>
QgsRenderChecker::QgsRenderChecker( ) :
mReport( "" ),
@ -205,6 +206,18 @@ bool QgsRenderChecker::compareImages( QString theTestName,
"\"></td><td><img src=\"file://" +
myResultDiffImage +
"\"></td>\n</tr>\n</table>";
//
// To get the images into CDash
//
QString myDashMessage = "<DartMeasurementFile name=\"Rendered Image\""
" type=\"image/png\">" + mRenderedImageFile +
"</DartMeasurementFile>"
"<DartMeasurementFile name=\"Expected Image\" type=\"image/png\">" +
mExpectedImageFile + "</DartMeasurementFile>"
"<DartMeasurementFile name=\"Difference Image\" type=\"image/png\">" +
myResultDiffImage + "</DartMeasurementFile>";
qDebug( ) << myDashMessage;
//
// Put the same info to debug too
//
@ -261,6 +274,14 @@ bool QgsRenderChecker::compareImages( QString theTestName,
QString::number( theMismatchCount ) + ")";
mReport += "</td></tr>";
//
// And send it to CDash
//
std::cout << "<DartMeasurement name=\"Mismatch Count "
<< "\" type=\"numeric/integer\">";
std::cout << mMismatchCount;
std::cout << "</DartMeasurement>" << std::endl;
bool myAnomalyMatchFlag = isKnownAnomaly( myDifferenceImage );
if ( myAnomalyMatchFlag )