From 1287c134594cbb173857e62229eccefbefd2d412 Mon Sep 17 00:00:00 2001 From: aavit Date: Thu, 13 Jan 2011 15:21:33 +0100 Subject: Small improvements to host mapping and mismatch report --- tests/arthur/baselineserver/src/baselineserver.cpp | 13 +++++++------ tests/arthur/baselineserver/src/report.cpp | 5 +++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 64b50fd..d72f2e3 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -348,9 +348,8 @@ void BaselineHandler::mapPlatformInfo() const if (host.isEmpty() || host == QLS("localhost")) { host = plat.value(PI_HostAddress); } else { - //# Site specific, should be in a config file - if (!host.startsWith(QLS("oldhcp"))) { - // remove index postfix typical of vm hostnames + if (!plat.value(PI_PulseGitBranch).isEmpty()) { + // i.e. pulse run, so remove index postfix typical of vm hostnames host.remove(QRegExp(QLS("\\d+$"))); if (host.endsWith(QLC('-'))) host.chop(1); @@ -366,7 +365,7 @@ void BaselineHandler::mapPlatformInfo() const // Map Qt version QString ver = plat.value(PI_QtVersion); - mapped.insert(PI_QtVersion, ver.prepend(QLS("Qt-"))); //### TBD: remove patch version + mapped.insert(PI_QtVersion, ver.prepend(QLS("Qt-"))); } QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline, bool absolute) const @@ -479,7 +478,8 @@ void BaselineHandler::testPathMapping() << QLS("macbuilder-02.test.troll.no") << QLS("bqvm1164") << QLS("chimera") - << QLS("localhost"); + << QLS("localhost") + << QLS(""); ImageItem item; item.testFunction = QLS("testPathMapping"); @@ -489,7 +489,8 @@ void BaselineHandler::testPathMapping() plat.insert(PI_QtVersion, QLS("4.8.0")); plat.insert(PI_BuildKey, QLS("(nobuildkey)")); - plat.insert(PI_QMakeSpec, "linux-g++"); + plat.insert(PI_QMakeSpec, QLS("linux-g++")); + plat.insert(PI_PulseGitBranch, QLS("somebranch")); foreach(const QString& host, hosts) { mapped.clear(); plat.insert(PI_HostName, host); diff --git a/tests/arthur/baselineserver/src/report.cpp b/tests/arthur/baselineserver/src/report.cpp index 505fd62..c85f144 100644 --- a/tests/arthur/baselineserver/src/report.cpp +++ b/tests/arthur/baselineserver/src/report.cpp @@ -138,8 +138,9 @@ void Report::writeHeader() QString title = plat.value(PI_TestCase) + QLS(" Qt Baseline Test Report"); out << "" << title << "\n" << "

" << title << "

\n" - << "

Run Id: " << runId << "

\n" - << "

Summary: " << numMismatches << " of " << numItems << " items reported mismatching

\n\n"; + << "

Note: This is a static page, generated at " << QDateTime::currentDateTime().toString() + << " for the test run with id " << runId << "

\n" + << "

Summary: " << numMismatches << " of " << numItems << " items reported mismatching

\n\n"; out << "

Platform Info:

\n" << "\n"; foreach (QString key, plat.keys()) -- cgit v0.12