summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-05-24 10:32:27 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-06-26 10:56:31 +0000
commit4d7137c4a0deca5ddcaa7c0965fbc61c7f23bec6 (patch)
tree69454f168fb51d4922fc173487cc38d09f866ee8 /tests/auto/corelib/kernel/qobject/tst_qobject.cpp
parent680038e2c14d5f83dcc1d0e15b5db216c1d81ea8 (diff)
tst_qobject: Fix execution in debug&release shadow builds
The previous approach of having the signalbug helper in a subdirectory did not work for shadow builds, as QFINDTESTDATA would not find that dir. By putting both test and helper into the same directory, the helper will be found in the test's current working directory. The second problem was that not putting executables into debug/release subdirectories might have lead to the WinRT AppxManifest being overwritten by the wrong configuration. When Qt is configured with -release for example, it was possible that the debug manifest (Manifest files are always created next to the target) is written last and thus contains debug VCLibs as a dependency. Change-Id: Ia39315432860405642542449296c16dd2ae9fa9f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tests/auto/corelib/kernel/qobject/tst_qobject.cpp')
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 43dcb241e4..fdacf83eb2 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -55,7 +55,6 @@ class tst_QObject : public QObject
{
Q_OBJECT
private slots:
- void initTestCase();
void disconnect();
void connectSlotsByName();
void connectSignalsToSignalsWithDefaultArguments();
@@ -283,14 +282,6 @@ static void playWithObjects()
}
}
-void tst_QObject::initTestCase()
-{
-#if QT_CONFIG(process)
- const QString testDataDir = QFileInfo(QFINDTESTDATA("signalbug")).absolutePath();
- QVERIFY2(QDir::setCurrent(testDataDir), qPrintable("Could not chdir to " + testDataDir));
-#endif
-}
-
void tst_QObject::disconnect()
{
SenderObject *s = new SenderObject;
@@ -3015,7 +3006,7 @@ void tst_QObject::recursiveSignalEmission()
#else
QProcess proc;
// signalbug helper app should always be next to this test binary
- const QString path = QStringLiteral("signalbug/signalbug");
+ const QString path = QStringLiteral("signalbug_helper");
proc.start(path);
QVERIFY2(proc.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, proc.errorString())));
QVERIFY(proc.waitForFinished());