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 From 3f0ff810e448253e6da0c4716e6ed1819786349f Mon Sep 17 00:00:00 2001 From: aavit Date: Mon, 25 Oct 2010 13:04:44 +0200 Subject: Preparations for running on actual server --- tests/arthur/baselineserver/src/baselineserver.cpp | 11 ++++++++--- tests/arthur/common/baselineprotocol.cpp | 3 +-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 86554fd..bef6e41 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -23,9 +23,14 @@ BaselineServer::BaselineServer(QObject *parent) QString BaselineServer::storagePath() { if (storage.isEmpty()) { - QDir dir(QCoreApplication::applicationDirPath()); - dir.cdUp(); - storage = dir.path() + QLS("/storage/"); + QByteArray envDir = qgetenv("QT_LANCELOT_DIR"); + if (!envDir.isEmpty()) { + storage = QLS(envDir.append('/')); + } else { + QDir dir(QCoreApplication::applicationDirPath()); + dir.cdUp(); + storage = dir.path() + QLS("/storage/"); + } } return storage; } diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index 78c80f1..a7fb5be 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -168,10 +168,9 @@ BaselineProtocol::~BaselineProtocol() bool BaselineProtocol::connect() { errMsg.clear(); - //###TBD: determine server address; for now local devhost QByteArray serverName(qgetenv("QT_LANCELOT_SERVER")); if (serverName.isNull()) - serverName = "chimera.europe.nokia.com"; + serverName = "lancelot.test.qt.nokia.com"; socket.connectToHost(serverName, ServerPort); if (!socket.waitForConnected(Timeout)) { -- cgit v0.12 From 8188942adf7745923d058cdad025af2054b8e5c8 Mon Sep 17 00:00:00 2001 From: aavit Date: Mon, 25 Oct 2010 15:51:33 +0200 Subject: Another change for running on actual server --- tests/arthur/baselineserver/src/baselineserver.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index bef6e41..1e241c1 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -24,13 +24,10 @@ QString BaselineServer::storagePath() { if (storage.isEmpty()) { QByteArray envDir = qgetenv("QT_LANCELOT_DIR"); - if (!envDir.isEmpty()) { + if (!envDir.isEmpty()) storage = QLS(envDir.append('/')); - } else { - QDir dir(QCoreApplication::applicationDirPath()); - dir.cdUp(); - storage = dir.path() + QLS("/storage/"); - } + else + storage = QLS("/var/www/"); } return storage; } -- cgit v0.12 From 0a2309a401184dfd4adb3e941d390fe7a625806c Mon Sep 17 00:00:00 2001 From: aavit Date: Mon, 25 Oct 2010 16:20:12 +0200 Subject: Testing auto-rebuild on server --- tests/arthur/baselineserver/src/baselineserver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/arthur/baselineserver/src/baselineserver.h b/tests/arthur/baselineserver/src/baselineserver.h index ba71ce5..95f40de 100644 --- a/tests/arthur/baselineserver/src/baselineserver.h +++ b/tests/arthur/baselineserver/src/baselineserver.h @@ -13,7 +13,7 @@ #include "htmlpage.h" // #seconds between update checks -#define HEARTBEAT 5 +#define HEARTBEAT 10 class BaselineServer : public QTcpServer { -- cgit v0.12 From 499b864a4bebb3176ba44141714e18687e9000bd Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 26 Oct 2010 12:38:56 +0200 Subject: Remove historic remains of qt3 testing --- tests/auto/lancelot/scripts/sizes.qps | 122 +++++++++++++++++----------------- tests/auto/lancelot/tst_lancelot.cpp | 11 ++- 2 files changed, 65 insertions(+), 68 deletions(-) diff --git a/tests/auto/lancelot/scripts/sizes.qps b/tests/auto/lancelot/scripts/sizes.qps index b923881..268808e 100644 --- a/tests/auto/lancelot/scripts/sizes.qps +++ b/tests/auto/lancelot/scripts/sizes.qps @@ -17,16 +17,16 @@ drawRect 120 0 16 16 drawRect 140 0 17 17 drawRect 160 0 18 18 drawRect 180 0 19 19 -qt3_drawRect 200 0 10 10 -qt3_drawRect 220 0 11 11 -qt3_drawRect 240 0 12 12 -qt3_drawRect 260 0 13 13 -qt3_drawRect 280 0 14 14 -qt3_drawRect 300 0 15 15 -qt3_drawRect 320 0 16 16 -qt3_drawRect 340 0 17 17 -qt3_drawRect 360 0 18 18 -qt3_drawRect 380 0 19 19 +# qt3_drawRect 200 0 10 10 +# qt3_drawRect 220 0 11 11 +# qt3_drawRect 240 0 12 12 +# qt3_drawRect 260 0 13 13 +# qt3_drawRect 280 0 14 14 +# qt3_drawRect 300 0 15 15 +# qt3_drawRect 320 0 16 16 +# qt3_drawRect 340 0 17 17 +# qt3_drawRect 360 0 18 18 +# qt3_drawRect 380 0 19 19 drawEllipse 0 20 10 10 drawEllipse 20 20 11 11 @@ -38,16 +38,16 @@ drawEllipse 120 20 16 16 drawEllipse 140 20 17 17 drawEllipse 160 20 18 18 drawEllipse 180 20 19 19 -qt3_drawEllipse 200 20 10 10 -qt3_drawEllipse 220 20 11 11 -qt3_drawEllipse 240 20 12 12 -qt3_drawEllipse 260 20 13 13 -qt3_drawEllipse 280 20 14 14 -qt3_drawEllipse 300 20 15 15 -qt3_drawEllipse 320 20 16 16 -qt3_drawEllipse 340 20 17 17 -qt3_drawEllipse 360 20 18 18 -qt3_drawEllipse 380 20 19 19 +# qt3_drawEllipse 200 20 10 10 +# qt3_drawEllipse 220 20 11 11 +# qt3_drawEllipse 240 20 12 12 +# qt3_drawEllipse 260 20 13 13 +# qt3_drawEllipse 280 20 14 14 +# qt3_drawEllipse 300 20 15 15 +# qt3_drawEllipse 320 20 16 16 +# qt3_drawEllipse 340 20 17 17 +# qt3_drawEllipse 360 20 18 18 +# qt3_drawEllipse 380 20 19 19 drawRoundRect 0 40 10 10 drawRoundRect 20 40 11 11 @@ -59,16 +59,16 @@ drawRoundRect 120 40 16 16 drawRoundRect 140 40 17 17 drawRoundRect 160 40 18 18 drawRoundRect 180 40 19 19 -qt3_drawRoundRect 200 40 10 10 -qt3_drawRoundRect 220 40 11 11 -qt3_drawRoundRect 240 40 12 12 -qt3_drawRoundRect 260 40 13 13 -qt3_drawRoundRect 280 40 14 14 -qt3_drawRoundRect 300 40 15 15 -qt3_drawRoundRect 320 40 16 16 -qt3_drawRoundRect 340 40 17 17 -qt3_drawRoundRect 360 40 18 18 -qt3_drawRoundRect 380 40 19 19 +# qt3_drawRoundRect 200 40 10 10 +# qt3_drawRoundRect 220 40 11 11 +# qt3_drawRoundRect 240 40 12 12 +# qt3_drawRoundRect 260 40 13 13 +# qt3_drawRoundRect 280 40 14 14 +# qt3_drawRoundRect 300 40 15 15 +# qt3_drawRoundRect 320 40 16 16 +# qt3_drawRoundRect 340 40 17 17 +# qt3_drawRoundRect 360 40 18 18 +# qt3_drawRoundRect 380 40 19 19 drawPie 0 60 10 10 0 4320 drawPie 20 60 11 11 0 4320 @@ -80,16 +80,16 @@ drawPie 120 60 16 16 0 4320 drawPie 140 60 17 17 0 4320 drawPie 160 60 18 18 0 4320 drawPie 180 60 19 19 0 4320 -qt3_drawPie 200 60 10 10 0 4320 -qt3_drawPie 220 60 11 11 0 4320 -qt3_drawPie 240 60 12 12 0 4320 -qt3_drawPie 260 60 13 13 0 4320 -qt3_drawPie 280 60 14 14 0 4320 -qt3_drawPie 300 60 15 15 0 4320 -qt3_drawPie 320 60 16 16 0 4320 -qt3_drawPie 340 60 17 17 0 4320 -qt3_drawPie 360 60 18 18 0 4320 -qt3_drawPie 380 60 19 19 0 4320 +# qt3_drawPie 200 60 10 10 0 4320 +# qt3_drawPie 220 60 11 11 0 4320 +# qt3_drawPie 240 60 12 12 0 4320 +# qt3_drawPie 260 60 13 13 0 4320 +# qt3_drawPie 280 60 14 14 0 4320 +# qt3_drawPie 300 60 15 15 0 4320 +# qt3_drawPie 320 60 16 16 0 4320 +# qt3_drawPie 340 60 17 17 0 4320 +# qt3_drawPie 360 60 18 18 0 4320 +# qt3_drawPie 380 60 19 19 0 4320 drawArc 0 80 10 10 0 4320 drawArc 20 80 11 11 0 4320 @@ -101,16 +101,16 @@ drawArc 120 80 16 16 0 4320 drawArc 140 80 17 17 0 4320 drawArc 160 80 18 18 0 4320 drawArc 180 80 19 19 0 4320 -qt3_drawArc 200 80 10 10 0 4320 -qt3_drawArc 220 80 11 11 0 4320 -qt3_drawArc 240 80 12 12 0 4320 -qt3_drawArc 260 80 13 13 0 4320 -qt3_drawArc 280 80 14 14 0 4320 -qt3_drawArc 300 80 15 15 0 4320 -qt3_drawArc 320 80 16 16 0 4320 -qt3_drawArc 340 80 17 17 0 4320 -qt3_drawArc 360 80 18 18 0 4320 -qt3_drawArc 380 80 19 19 0 4320 +# qt3_drawArc 200 80 10 10 0 4320 +# qt3_drawArc 220 80 11 11 0 4320 +# qt3_drawArc 240 80 12 12 0 4320 +# qt3_drawArc 260 80 13 13 0 4320 +# qt3_drawArc 280 80 14 14 0 4320 +# qt3_drawArc 300 80 15 15 0 4320 +# qt3_drawArc 320 80 16 16 0 4320 +# qt3_drawArc 340 80 17 17 0 4320 +# qt3_drawArc 360 80 18 18 0 4320 +# qt3_drawArc 380 80 19 19 0 4320 drawChord 0 100 10 10 0 4320 drawChord 20 100 11 11 0 4320 @@ -122,16 +122,16 @@ drawChord 120 100 16 16 0 4320 drawChord 140 100 17 17 0 4320 drawChord 160 100 18 18 0 4320 drawChord 180 100 19 19 0 4320 -qt3_drawChord 200 100 10 10 0 4320 -qt3_drawChord 220 100 11 11 0 4320 -qt3_drawChord 240 100 12 12 0 4320 -qt3_drawChord 260 100 13 13 0 4320 -qt3_drawChord 280 100 14 14 0 4320 -qt3_drawChord 300 100 15 15 0 4320 -qt3_drawChord 320 100 16 16 0 4320 -qt3_drawChord 340 100 17 17 0 4320 -qt3_drawChord 360 100 18 18 0 4320 -qt3_drawChord 380 100 19 19 0 4320 +# qt3_drawChord 200 100 10 10 0 4320 +# qt3_drawChord 220 100 11 11 0 4320 +# qt3_drawChord 240 100 12 12 0 4320 +# qt3_drawChord 260 100 13 13 0 4320 +# qt3_drawChord 280 100 14 14 0 4320 +# qt3_drawChord 300 100 15 15 0 4320 +# qt3_drawChord 320 100 16 16 0 4320 +# qt3_drawChord 340 100 17 17 0 4320 +# qt3_drawChord 360 100 18 18 0 4320 +# qt3_drawChord 380 100 19 19 0 4320 end_block @@ -147,4 +147,4 @@ repeat_block testblock setPen red translate 0 150 -repeat_block testblock \ No newline at end of file +repeat_block testblock diff --git a/tests/auto/lancelot/tst_lancelot.cpp b/tests/auto/lancelot/tst_lancelot.cpp index 21044d4..799aba7 100644 --- a/tests/auto/lancelot/tst_lancelot.cpp +++ b/tests/auto/lancelot/tst_lancelot.cpp @@ -135,7 +135,7 @@ void tst_Lancelot::initTestCase() void tst_Lancelot::testRasterARGB32PM_data() { - QStringList localBlacklist = QStringList() << QLatin1String("sizes.qps"); + QStringList localBlacklist; if (!setupTestSuite(ImageItem::Raster, QImage::Format_ARGB32_Premultiplied, localBlacklist)) QSKIP("Communication with baseline image server failed.", SkipAll); } @@ -149,7 +149,7 @@ void tst_Lancelot::testRasterARGB32PM() void tst_Lancelot::testRasterRGB32_data() { - QStringList localBlacklist = QStringList() << QLatin1String("sizes.qps"); + QStringList localBlacklist; if (!setupTestSuite(ImageItem::Raster, QImage::Format_RGB32, localBlacklist)) QSKIP("Communication with baseline image server failed.", SkipAll); } @@ -163,7 +163,7 @@ void tst_Lancelot::testRasterRGB32() void tst_Lancelot::testRasterRGB16_data() { - QStringList localBlacklist = QStringList() << QLatin1String("sizes.qps"); + QStringList localBlacklist; if (!setupTestSuite(ImageItem::Raster, QImage::Format_RGB16, localBlacklist)) QSKIP("Communication with baseline image server failed.", SkipAll); } @@ -177,10 +177,7 @@ void tst_Lancelot::testRasterRGB16() void tst_Lancelot::testOpenGL_data() { -#if defined(Q_OS_MAC) - QSKIP("OpenGL testing not supported on this platform.", SkipAll); -#endif - QStringList localBlacklist = QStringList() << QLatin1String("sizes.qps") << QLatin1String("rasterops.qps"); + QStringList localBlacklist = QStringList() << QLatin1String("rasterops.qps"); if (!setupTestSuite(ImageItem::OpenGL, QImage::Format_RGB32, localBlacklist)) QSKIP("Communication with baseline image server failed.", SkipAll); } -- cgit v0.12 From 789ae99928f96a7fc66ff9dacf6bbf5826d24cac Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 26 Oct 2010 12:39:47 +0200 Subject: Fix getting git info on Win --- tests/arthur/common/baselineprotocol.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index a7fb5be..6a35115 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -32,7 +32,16 @@ PlatformInfo::PlatformInfo(bool useLocal) #endif QProcess git; - git.start(QLS("git"), QStringList() << QLS("log") << QLS("--max-count=1") << QLS("--pretty=%H")); + QString cmd; + QStringList args; +#if defined(Q_OS_WIN) + cmd = QLS("cmd.exe"); + args << QLS("/c") << QLS("git"); +#else + cmd = QLS("git"); +#endif + args << QLS("log") << QLS("--max-count=1") << QLS("--pretty=%H"); + git.start(cmd, args); git.waitForFinished(3000); if (!git.exitCode()) gitCommit = QString::fromLocal8Bit(git.readAllStandardOutput().constData()).trimmed(); -- cgit v0.12