aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@digia.com>2013-04-15 17:27:24 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-16 17:05:30 +0200
commit4b1cab696842572ff333ef1f17d2fa2a2fc31831 (patch)
tree7efd8dc146a4aec84104cf3ffccd9ed7759baf0a /tests/auto
parentb90699ac82fc624d59d8c967927d2561419a58a3 (diff)
QmlDebugging: Auto tests use port range
Change-Id: I715f50a696283d2a2af0f54409de02289637bf78 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp5
-rw-r--r--tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp4
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp9
-rw-r--r--tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp9
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp11
5 files changed, 21 insertions, 17 deletions
diff --git a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
index 363efeabbc..e6cbd41b8e 100644
--- a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
+++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
@@ -48,7 +48,7 @@
#include <QtCore/QString>
#include <QtTest/QtTest>
-const char *NORMALMODE = "-qmljsdebugger=port:3777,block";
+const char *NORMALMODE = "-qmljsdebugger=port:3777,3787,block";
const char *QMLFILE = "test.qml";
class QQmlDebugMsgClient;
@@ -186,7 +186,8 @@ void tst_QDebugMessageService::init()
QVERIFY2(m_process->waitForSessionStart(),
"Could not launch application, or did not get 'Waiting for connection'.");
- m_connection->connectToHost("127.0.0.1", 3777);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost("127.0.0.1", port);
QVERIFY(m_connection->waitForConnected());
if (m_client->state() != QQmlDebugClient::Enabled)
diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
index dd4dd003ec..1c1d84f37b 100644
--- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
@@ -104,7 +104,7 @@ void tst_QQmlDebugService::checkPortRange()
QQmlDebugConnection *connection1 = new QQmlDebugConnection();
QQmlDebugProcess *process1 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
- process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3772, 3774 ") << testFile("test.qml"));
+ process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
if (!process1->waitForSessionStart())
QFAIL("could not launch application, or did not get 'Waiting for connection'.");
@@ -118,7 +118,7 @@ void tst_QQmlDebugService::checkPortRange()
QQmlDebugConnection *connection2 = new QQmlDebugConnection();
QQmlDebugProcess *process2 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
- process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3772,3774") << testFile("test.qml"));
+ process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
if (!process2->waitForSessionStart())
QFAIL("could not launch application, or did not get 'Waiting for connection'.");
diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
index 6f99afd917..5badcaa3ae 100644
--- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
@@ -52,8 +52,8 @@
#include "qqmlinspectorclient.h"
#include "qqmlenginedebugclient.h"
-#define PORT 3776
-#define STR_PORT "3776"
+#define STR_PORT_FROM "3776"
+#define STR_PORT_TO "3786"
class tst_QQmlEngineDebugInspectorIntegration : public QQmlDataTest
{
@@ -105,7 +105,7 @@ QmlDebugObjectReference tst_QQmlEngineDebugInspectorIntegration::findRootObject(
void tst_QQmlEngineDebugInspectorIntegration::init()
{
- const QString argument = "-qmljsdebugger=port:" STR_PORT ",block";
+ const QString argument = "-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO ",block";
m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
+ "/qmlscene", this);
@@ -117,7 +117,8 @@ void tst_QQmlEngineDebugInspectorIntegration::init()
m_inspectorClient = new QQmlInspectorClient(m_connection);
m_engineDebugClient = new QQmlEngineDebugClient(m_connection);
- m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost(QLatin1String("127.0.0.1"), port);
bool ok = m_connection->waitForConnected();
QVERIFY(ok);
}
diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
index f1fbdd20a9..e430875355 100644
--- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
+++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
@@ -50,8 +50,8 @@
#include "../../../shared/util.h"
#include "qqmlinspectorclient.h"
-#define PORT 3772
-#define STR_PORT "3772"
+#define STR_PORT_FROM "3772"
+#define STR_PORT_TO "3782"
@@ -87,7 +87,7 @@ private slots:
void tst_QQmlInspector::startQmlsceneProcess(const char * /* qmlFile */)
{
- const QString argument = "-qmljsdebugger=port:" STR_PORT ",block";
+ const QString argument = "-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO ",block";
m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
@@ -97,7 +97,8 @@ void tst_QQmlInspector::startQmlsceneProcess(const char * /* qmlFile */)
QQmlDebugConnection *m_connection = new QQmlDebugConnection();
m_client = new QQmlInspectorClient(m_connection);
- m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost(QLatin1String("127.0.0.1"), port);
}
void tst_QQmlInspector::init()
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index 3a925e2905..9982e5d629 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -46,8 +46,8 @@
#include "qqmldebugclient.h"
#include "../../../shared/util.h"
-#define PORT 13773
-#define STR_PORT "13773"
+#define STR_PORT_FROM "13773"
+#define STR_PORT_TO "13783"
struct QQmlProfilerData
{
@@ -234,9 +234,9 @@ void tst_QQmlProfilerService::connect(bool block, const QString &testFile)
QStringList arguments;
if (block)
- arguments << QString("-qmljsdebugger=port:" STR_PORT ",block");
+ arguments << QString("-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO ",block");
else
- arguments << QString("-qmljsdebugger=port:" STR_PORT);
+ arguments << QString("-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO );
arguments << QQmlDataTest::instance()->testFile(testFile);
@@ -247,7 +247,8 @@ void tst_QQmlProfilerService::connect(bool block, const QString &testFile)
QQmlDebugConnection *m_connection = new QQmlDebugConnection();
m_client = new QQmlProfilerClient(m_connection);
- m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost(QLatin1String("127.0.0.1"), port);
}
void tst_QQmlProfilerService::cleanup()