From e7f0288bd9a57c25a7e482f4b058769d7147270a Mon Sep 17 00:00:00 2001 From: aavit Date: Mon, 18 Oct 2010 15:37:59 +0200 Subject: Add OS and git data to PlatformInfo --- tests/arthur/baselineserver/src/baselineserver.cpp | 26 ++++++++------- tests/arthur/baselineserver/src/htmlpage.cpp | 8 ++--- tests/arthur/common/baselineprotocol.cpp | 38 +++++++++++++++++++--- tests/arthur/common/baselineprotocol.h | 11 ++++--- 4 files changed, 58 insertions(+), 25 deletions(-) diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 072e216..86554fd 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -105,8 +105,10 @@ void BaselineHandler::receiveRequest() return; } connectionEstablished = true; - qDebug() << runId << logtime() << "Connection established with" << plat.hostname << proto.socket.peerAddress().toString() << "Qt version:" << plat.qtVersion << plat.buildKey; - return; + qDebug() << runId << logtime() << "Connection established with" << plat.hostName << "[" << proto.socket.peerAddress().toString() << "]" + << "OS:" << plat.osName << "[" << plat.osVersion << "]" << "Qt version:" << plat.qtVersion << "[" << plat.buildKey << "]" + << "git commit:" << plat.gitCommit; + return; } QByteArray block; @@ -140,7 +142,7 @@ void BaselineHandler::provideBaselineChecksums(const QByteArray &itemListBlock) QDataStream ds(itemListBlock); ds >> itemList; qDebug() << runId << logtime() << "Received request for checksums for" << itemList.count() << "items, engine" - << itemList.at(0).engineAsString() << "pixel format" << itemList.at(0).formatAsString(); + << itemList.at(0).engineAsString() << "pixel format" << itemList.at(0).formatAsString(); for (ImageItemList::iterator i = itemList.begin(); i != itemList.end(); ++i) { i->imageChecksums.clear(); @@ -240,7 +242,7 @@ QString BaselineHandler::itemSubPath(const QString &engine, const QString &forma QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline, bool absolute) { if (pathForRun.isNull()) { - QString host = plat.hostname.section(QLC('.'), 0, 0); // Filter away domain, if any + QString host = plat.hostName.section(QLC('.'), 0, 0); // Filter away domain, if any if (host.isEmpty() || host == QLS("localhost")) { host = proto.socket.peerAddress().toString(); if (host.isEmpty()) @@ -379,13 +381,13 @@ void BaselineHandler::testPathMapping() QStringList hosts; hosts << QLS("bq-ubuntu910-x86-01") - << QLS("bq-ubuntu910-x86-15") - << QLS("osl-mac-master-5.test.qt.nokia.com") - << QLS("osl-mac-master-6.test.qt.nokia.com") - << QLS("sv-xp-vs-010") - << QLS("sv-xp-vs-011") - << QLS("chimera") - << QLS("localhost"); + << QLS("bq-ubuntu910-x86-15") + << QLS("osl-mac-master-5.test.qt.nokia.com") + << QLS("osl-mac-master-6.test.qt.nokia.com") + << QLS("sv-xp-vs-010") + << QLS("sv-xp-vs-011") + << QLS("chimera") + << QLS("localhost"); ImageItem item; item.scriptName = QLS("arcs.qps"); @@ -398,7 +400,7 @@ void BaselineHandler::testPathMapping() plat.buildKey = QLS("(nobuildkey)"); foreach(const QString& host, hosts) { pathForRun = QString(); - plat.hostname = host; + plat.hostName = host; qDebug() << "Baseline from" << host << "->" << pathForItem(item, true).remove(BaselineServer::storagePath()); qDebug() << "Mismatch from" << host << "->" << pathForItem(item, false).remove(BaselineServer::storagePath()); } diff --git a/tests/arthur/baselineserver/src/htmlpage.cpp b/tests/arthur/baselineserver/src/htmlpage.cpp index 7759c8e..14bcb0c 100644 --- a/tests/arthur/baselineserver/src/htmlpage.cpp +++ b/tests/arthur/baselineserver/src/htmlpage.cpp @@ -48,12 +48,12 @@ void HTMLPage::writeHeader(const ImageItem &item) out.setDevice(&file); out << "

Lancelot results from run " << id << "

\n\n"; - out << "

Host: " << plat.hostname << "

\n"; + out << "

Host: " << plat.hostName << "

\n"; out << "

Qt version: " << plat.qtVersion << "

\n"; out << "

Build key: " << plat.buildKey << "

\n"; out << "

Engine: " << item.engineAsString() << "

\n"; out << "

Format: " << item.formatAsString() << "

\n\n"; - out << "

Update all baselines
"; @@ -91,7 +91,7 @@ void HTMLPage::addItem(const QString &baseline, const QString &rendered, const I out << "Update baseline
" "Blacklist test\n"; out << "\n\n"; @@ -117,7 +117,7 @@ void HTMLPage::end() if (imageItems.at(i).status == ImageItem::IgnoreItem) { out << "Blacklisted
" "> (QDataStream& stream, PlatformInfo& pinfo) +QDataStream & operator>> (QDataStream& stream, PlatformInfo& p) { - stream >> pinfo.buildKey >> pinfo.qtVersion >> pinfo.hostname; + stream >> p.hostName >> p.osName >> p.osVersion >> p.qtVersion >> p.buildKey >> p.gitCommit; return stream; } diff --git a/tests/arthur/common/baselineprotocol.h b/tests/arthur/common/baselineprotocol.h index 6af4f22..42f9729 100644 --- a/tests/arthur/common/baselineprotocol.h +++ b/tests/arthur/common/baselineprotocol.h @@ -15,12 +15,15 @@ struct PlatformInfo { PlatformInfo(bool useLocal = false); - QString buildKey; + QString hostName; + QString osName; + int osVersion; QString qtVersion; - QString hostname; + QString buildKey; + QString gitCommit; }; -QDataStream & operator<< (QDataStream &stream, const PlatformInfo &pinfo); -QDataStream & operator>> (QDataStream& stream, PlatformInfo& pinfo); +QDataStream & operator<< (QDataStream &stream, const PlatformInfo &p); +QDataStream & operator>> (QDataStream& stream, PlatformInfo& p); struct ImageItem { -- cgit v0.12