Skip to content

Commit aab9976

Browse files
committedApr 14, 2012
Upload test images to cdash
1 parent ba003e6 commit aab9976

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎tests/src/core/qgsrenderchecker.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <QTime>
2323
#include <QCryptographicHash>
2424
#include <QByteArray>
25+
#include <QDebug>
2526

2627
QgsRenderChecker::QgsRenderChecker( ) :
2728
mReport( "" ),
@@ -205,6 +206,18 @@ bool QgsRenderChecker::compareImages( QString theTestName,
205206
"\"></td><td><img src=\"file://" +
206207
myResultDiffImage +
207208
"\"></td>\n</tr>\n</table>";
209+
//
210+
// To get the images into CDash
211+
//
212+
QString myDashMessage = "<DartMeasurementFile name=\"Rendered Image\""
213+
" type=\"image/png\">" + mRenderedImageFile +
214+
"</DartMeasurementFile>"
215+
"<DartMeasurementFile name=\"Expected Image\" type=\"image/png\">" +
216+
mExpectedImageFile + "</DartMeasurementFile>"
217+
"<DartMeasurementFile name=\"Difference Image\" type=\"image/png\">" +
218+
myResultDiffImage + "</DartMeasurementFile>";
219+
qDebug( ) << myDashMessage;
220+
208221
//
209222
// Put the same info to debug too
210223
//
@@ -261,6 +274,14 @@ bool QgsRenderChecker::compareImages( QString theTestName,
261274
QString::number( theMismatchCount ) + ")";
262275
mReport += "</td></tr>";
263276

277+
//
278+
// And send it to CDash
279+
//
280+
std::cout << "<DartMeasurement name=\"Mismatch Count "
281+
<< "\" type=\"numeric/integer\">";
282+
std::cout << mMismatchCount;
283+
std::cout << "</DartMeasurement>" << std::endl;
284+
264285
bool myAnomalyMatchFlag = isKnownAnomaly( myDifferenceImage );
265286

266287
if ( myAnomalyMatchFlag )

0 commit comments

Comments
 (0)
Please sign in to comment.