Skip to content

Commit

Permalink
Upload test images to cdash
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Apr 14, 2012
1 parent ba003e6 commit aab9976
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/src/core/qgsrenderchecker.cpp
Expand Up @@ -22,6 +22,7 @@
#include <QTime>
#include <QCryptographicHash>
#include <QByteArray>
#include <QDebug>

QgsRenderChecker::QgsRenderChecker( ) :
mReport( "" ),
Expand Down Expand Up @@ -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
//
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit aab9976

Please sign in to comment.