diff options
-rw-r--r-- | tests/arthur/baselineserver/src/baselineserver.cpp | 17 | ||||
-rw-r--r-- | tests/arthur/common/baselineprotocol.cpp | 15 | ||||
-rw-r--r-- | tests/arthur/common/baselineprotocol.h | 1 |
3 files changed, 17 insertions, 16 deletions
diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 430d4af..ec5793f 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -196,7 +196,7 @@ QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline) + plat.qtVersion + QDir::separator(); if (isBaseline) { storePath += QLatin1String("baselines") + QDir::separator() - + engineForItem(item) + QDir::separator(); + + item.engineAsString() + QDir::separator(); } else { storePath += runId + QDir::separator(); } @@ -204,21 +204,6 @@ QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline) return storePath + item.scriptName + QLatin1Char('.'); } -QString BaselineHandler::engineForItem(const ImageItem &item) -{ - switch (item.engine) { - case ImageItem::Raster: - return QLatin1String("Raster"); - break; - case ImageItem::OpenGL: - return QLatin1String("OpenGL"); - break; - default: - break; - } - return QLatin1String("Unknown"); -} - QString BaselineHandler::computeMismatchScore(const QImage &baseline, const QImage &rendered) { if (baseline.size() != rendered.size() || baseline.format() != rendered.format()) diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index a6306b9..881c9cc 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -44,6 +44,21 @@ quint64 ImageItem::computeChecksum(const QImage &image) return qChecksum((const char *)image.constScanLine(50), image.bytesPerLine()); } +QString ImageItem::engineAsString() +{ + switch (engine) { + case Raster: + return QLatin1String("Raster"); + break; + case OpenGL: + return QLatin1String("OpenGL"); + break; + default: + break; + } + return QLatin1String("Unknown"); +} + QDataStream & operator<< (QDataStream &stream, const ImageItem &ii) { stream << ii.scriptName << ii.scriptChecksum << quint8(ii.status) << quint8(ii.renderFormat) diff --git a/tests/arthur/common/baselineprotocol.h b/tests/arthur/common/baselineprotocol.h index 749b623..70cb227 100644 --- a/tests/arthur/common/baselineprotocol.h +++ b/tests/arthur/common/baselineprotocol.h @@ -31,6 +31,7 @@ public: {} ImageItem &operator=(const ImageItem &other); static quint64 computeChecksum(const QImage& image); + QString engineAsString(); enum ItemStatus { Ok = 0, |