diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2012-02-13 16:45:13 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-15 02:34:38 +0100 |
commit | 78a6447e311e55320ab3acd5f1035f3c295bf5f8 (patch) | |
tree | 938b06db237973f350c36c93ee4f79713412d402 /tests/auto/network/bearer | |
parent | 960f246ffc37141101952757bc0234183a6163a9 (diff) |
Windows: Fixed helper process finding in network tests
Helper processes were not found properly on all network tests
when the test was run with "nmake check":
- tst_qtcpsocket
- tst_qtcpserver
- tst_qnetworksession
- tst_qnetworkreply
Task-number: QTBUG-24199
Task-number: QTBUG-24203
Task-number: QTBUG-24226
Task-number: QTBUG-24231
Task-number: QTBUG-24232
Change-Id: Ia4451b5a5e3fe9f81aba3837baf8292411f995d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Diffstat (limited to 'tests/auto/network/bearer')
-rw-r--r-- | tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp index a51b4e5632..27e1e7f013 100644 --- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp +++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp @@ -96,6 +96,7 @@ private slots: private: QNetworkConfigurationManager manager; int inProcessSessionManagementCount; + QString lackeyDir; #endif }; @@ -117,6 +118,10 @@ void tst_QNetworkSession::initTestCase() QSignalSpy spy(&manager, SIGNAL(updateCompleted())); manager.updateConfigurations(); QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); + + lackeyDir = QFINDTESTDATA("lackey"); + QVERIFY2(!lackeyDir.isEmpty(), qPrintable( + QString::fromLatin1("Couldn't find lackey dir starting from %1.").arg(QDir::currentPath()))); } void tst_QNetworkSession::cleanupTestCase() @@ -916,10 +921,10 @@ void tst_QNetworkSession::outOfProcessSession() oopServer.listen("tst_qnetworksession"); QProcess lackey; - lackey.start("lackey/lackey"); - qDebug() << lackey.error() << lackey.errorString(); - QVERIFY(lackey.waitForStarted()); - + QString lackeyExe = lackeyDir + "/lackey"; + lackey.start(lackeyExe); + QVERIFY2(lackey.waitForStarted(), qPrintable( + QString::fromLatin1("Could not start %1: %2").arg(lackeyExe, lackey.errorString()))); QVERIFY(oopServer.waitForNewConnection(-1)); QLocalSocket *oopSocket = oopServer.nextPendingConnection(); |