Skip to content

Commit

Permalink
Show anomaly hashes in test reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Apr 15, 2012
1 parent 60f7b7d commit dca998f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/src/core/qgsrenderchecker.cpp
Expand Up @@ -69,6 +69,7 @@ bool QgsRenderChecker::isKnownAnomaly( QImage theDifferenceImage )
theDifferenceImage.numBytes());
QByteArray mySourceHash = QCryptographicHash::hash(
myData, QCryptographicHash::Md5);

for (int i = 0; i < myList.size(); ++i)
{
QString myFile = myList.at(i);
Expand All @@ -80,6 +81,14 @@ bool QgsRenderChecker::isKnownAnomaly( QImage theDifferenceImage )
myAnomalyImage.numBytes());
QByteArray myAnomolyHash = QCryptographicHash::hash(
myData, QCryptographicHash::Md5);
QString myHashMessage = QString("Source image hash %1 : Anomaly hash: %2").arg(
QString(mySourceHash.toHex())).arg(QString(myAnomolyHash.toHex()));
//fro CDash
QString myMeasureMessage = "<DartMeasurement name=\"Anomoly check"
"\" type=\"text/text\">" + myHashMessage +
"</DartMeasurement>";
qDebug() << myMeasureMessage;
mReport += "<tr><td colspan=3>" + myHashMessage + "</td></tr>";
if ( mySourceHash.toHex() == myAnomolyHash.toHex() )
{
mReport += "<tr><td colspan=3>"
Expand Down

0 comments on commit dca998f

Please sign in to comment.