summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-16 03:47:31 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-16 03:47:31 (GMT)
commit0d950606bf2d4e8d63d552420c7517eea69b3a83 (patch)
tree8185c7deaff6173e878ed3a066471b827640462b /tests
parent13a880f23b01856770a3afc12b1a47121ef04349 (diff)
downloadQt-0d950606bf2d4e8d63d552420c7517eea69b3a83.zip
Qt-0d950606bf2d4e8d63d552420c7517eea69b3a83.tar.gz
Qt-0d950606bf2d4e8d63d552420c7517eea69b3a83.tar.bz2
Fix QNetworkSession unit test.
Make sure test can find lackey process. Always connect lackey to tests IPC socket.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qnetworksession/lackey/lackey.pro6
-rw-r--r--tests/auto/qnetworksession/lackey/main.cpp16
-rw-r--r--tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp2
3 files changed, 14 insertions, 10 deletions
diff --git a/tests/auto/qnetworksession/lackey/lackey.pro b/tests/auto/qnetworksession/lackey/lackey.pro
index 3ed9850..8fbdd58 100644
--- a/tests/auto/qnetworksession/lackey/lackey.pro
+++ b/tests/auto/qnetworksession/lackey/lackey.pro
@@ -1,8 +1,12 @@
SOURCES += main.cpp
-TARGET = qnetworksessionlackey
+TARGET = lackey
QT = core network
+DESTDIR = ./
+
+win32:CONFIG += console
+
symbian {
# Needed for interprocess communication and opening QNetworkSession
TARGET.CAPABILITY = NetworkControl NetworkServices
diff --git a/tests/auto/qnetworksession/lackey/main.cpp b/tests/auto/qnetworksession/lackey/main.cpp
index 1e40485..41e935a 100644
--- a/tests/auto/qnetworksession/lackey/main.cpp
+++ b/tests/auto/qnetworksession/lackey/main.cpp
@@ -59,6 +59,14 @@ int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
+ // Cannot read/write to processes on WinCE or Symbian.
+ // Easiest alternative is to use sockets for IPC.
+
+ QLocalSocket oopSocket;
+
+ oopSocket.connectToServer("tst_qnetworksession");
+ oopSocket.waitForConnected(-1);
+
QNetworkConfigurationManager manager;
QList<QNetworkConfiguration> discovered =
#if defined (Q_OS_SYMBIAN)
@@ -72,14 +80,6 @@ int main(int argc, char** argv)
return NO_DISCOVERED_CONFIGURATIONS_ERROR;
}
- // Cannot read/write to processes on WinCE or Symbian.
- // Easiest alternative is to use sockets for IPC.
-
- QLocalSocket oopSocket;
-
- oopSocket.connectToServer("tst_qnetworksession");
- oopSocket.waitForConnected(-1);
-
qDebug() << "Lackey started";
QNetworkSession *session = 0;
diff --git a/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp b/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp
index 1cafa47..4ef3a4f 100644
--- a/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp
+++ b/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp
@@ -836,7 +836,7 @@ void tst_QNetworkSession::outOfProcessSession()
qDebug() << "starting lackey";
QProcess lackey;
- lackey.start("qnetworksessionlackey");
+ lackey.start("lackey/lackey");
qDebug() << lackey.error() << lackey.errorString();
QVERIFY(lackey.waitForStarted());