diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-09-03 10:33:03 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-09-03 10:43:20 (GMT) |
commit | c6a8721bc87709dd60c68c67877f3fdc0f2d3300 (patch) | |
tree | d5a9398dd283886d1cc1a379acd40f65f8fff168 /tests/arthur/baselineserver | |
parent | 0d18809a78021709f024e85c5251815a5864a7e3 (diff) | |
download | Qt-c6a8721bc87709dd60c68c67877f3fdc0f2d3300.zip Qt-c6a8721bc87709dd60c68c67877f3fdc0f2d3300.tar.gz Qt-c6a8721bc87709dd60c68c67877f3fdc0f2d3300.tar.bz2 |
Add basic OpenGL testing support.
Diffstat (limited to 'tests/arthur/baselineserver')
-rw-r--r-- | tests/arthur/baselineserver/src/baselineserver.cpp | 22 | ||||
-rw-r--r-- | tests/arthur/baselineserver/src/baselineserver.h | 1 |
2 files changed, 20 insertions, 3 deletions
diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 0f95474..430d4af 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -194,14 +194,30 @@ QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline) QString storePath = BaselineServer::storagePath(); storePath += plat.buildKey.section(QLatin1Char(' '), 1, 1) + QLatin1String("_Qt-") + plat.qtVersion + QDir::separator(); - if (isBaseline) - storePath += QLatin1String("baselines") + QDir::separator(); - else + if (isBaseline) { + storePath += QLatin1String("baselines") + QDir::separator() + + engineForItem(item) + QDir::separator(); + } else { storePath += runId + QDir::separator(); + } //#? QString itemName = item.scriptName.replace(item.scriptName.lastIndexOf('.'), '_'); 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) { diff --git a/tests/arthur/baselineserver/src/baselineserver.h b/tests/arthur/baselineserver/src/baselineserver.h index 337b38c..2963fd1 100644 --- a/tests/arthur/baselineserver/src/baselineserver.h +++ b/tests/arthur/baselineserver/src/baselineserver.h @@ -66,6 +66,7 @@ private: QString pathForItem(const ImageItem &item, bool isBaseline = true); QString logtime(); QString computeMismatchScore(const QImage& baseline, const QImage& rendered); + QString engineForItem(const ImageItem &item); BaselineProtocol proto; PlatformInfo plat; |