diff options
author | Oliver Wolff <oliver.wolff@digia.com> | 2012-11-07 10:05:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-07 14:19:00 +0100 |
commit | 6a2e965a3413636d7ed2b68ea084f9853a8d1e26 (patch) | |
tree | 437e9dfa6e982cb0569816e52caea4f5415bc4ad /tests/auto/corelib/kernel | |
parent | 285f4daa4757dfb88a27c6570861e8b9f453eaf4 (diff) |
Fixed QSystemSemaphore autotest for "check" target
As CI runs autotests using the "check" target the approach using
DESTDIR = ../ does not work for the test. Instead the binaries are just
moved one directory up and QFINDTESTDATA is used to find the path of the
helper binary.
Change-Id: If1ed2b60821f1de4ac62f238c8af5e09cf0f444a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tests/auto/corelib/kernel')
3 files changed, 21 insertions, 5 deletions
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/systemsemaphorehelper.pro b/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/systemsemaphorehelper.pro index d1a4e04567..389015d504 100644 --- a/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/systemsemaphorehelper.pro +++ b/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/systemsemaphorehelper.pro @@ -1,9 +1,17 @@ QT = core testlib -DESTDIR = ./ - win32: CONFIG += console mac:CONFIG -= app_bundle SOURCES += main.cpp +TARGET = helperbinary +CONFIG(debug_and_release) { + CONFIG(debug, debug|release) { + DESTDIR = ../debug + } else { + DESTDIR = ../release + } +} else { + DESTDIR = .. +} diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/test/test.pro b/tests/auto/corelib/kernel/qsystemsemaphore/test/test.pro index cc76b2c233..a0f63741d3 100644 --- a/tests/auto/corelib/kernel/qsystemsemaphore/test/test.pro +++ b/tests/auto/corelib/kernel/qsystemsemaphore/test/test.pro @@ -7,4 +7,12 @@ mac:CONFIG -= app_bundle SOURCES += tst_qsystemsemaphore.cpp TARGET = tst_qsystemsemaphore -DESTDIR = ../ +CONFIG(debug_and_release) { + CONFIG(debug, debug|release) { + DESTDIR = ../debug + } else { + DESTDIR = ../release + } +} else { + DESTDIR = .. +} diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp index 85f7d2a4b2..297955366c 100644 --- a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp +++ b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp @@ -264,11 +264,11 @@ void tst_QSystemSemaphore::initialValue() QString tst_QSystemSemaphore::helperBinary() { - QString binary = QStringLiteral("systemsemaphorehelper/systemsemaphorehelper"); + QString binary = QStringLiteral("helperbinary"); #ifdef Q_OS_WIN binary += QStringLiteral(".exe"); #endif - return binary; + return QFINDTESTDATA(binary); } QTEST_MAIN(tst_QSystemSemaphore) #include "tst_qsystemsemaphore.moc" |