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>
This commit is contained in:
parent
285f4daa47
commit
6a2e965a34
@ -1,9 +1,17 @@
|
|||||||
QT = core testlib
|
QT = core testlib
|
||||||
|
|
||||||
DESTDIR = ./
|
|
||||||
|
|
||||||
win32: CONFIG += console
|
win32: CONFIG += console
|
||||||
mac:CONFIG -= app_bundle
|
mac:CONFIG -= app_bundle
|
||||||
|
|
||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
|
TARGET = helperbinary
|
||||||
|
|
||||||
|
CONFIG(debug_and_release) {
|
||||||
|
CONFIG(debug, debug|release) {
|
||||||
|
DESTDIR = ../debug
|
||||||
|
} else {
|
||||||
|
DESTDIR = ../release
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DESTDIR = ..
|
||||||
|
}
|
||||||
|
@ -7,4 +7,12 @@ mac:CONFIG -= app_bundle
|
|||||||
SOURCES += tst_qsystemsemaphore.cpp
|
SOURCES += tst_qsystemsemaphore.cpp
|
||||||
TARGET = tst_qsystemsemaphore
|
TARGET = tst_qsystemsemaphore
|
||||||
|
|
||||||
DESTDIR = ../
|
CONFIG(debug_and_release) {
|
||||||
|
CONFIG(debug, debug|release) {
|
||||||
|
DESTDIR = ../debug
|
||||||
|
} else {
|
||||||
|
DESTDIR = ../release
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DESTDIR = ..
|
||||||
|
}
|
||||||
|
@ -264,11 +264,11 @@ void tst_QSystemSemaphore::initialValue()
|
|||||||
|
|
||||||
QString tst_QSystemSemaphore::helperBinary()
|
QString tst_QSystemSemaphore::helperBinary()
|
||||||
{
|
{
|
||||||
QString binary = QStringLiteral("systemsemaphorehelper/systemsemaphorehelper");
|
QString binary = QStringLiteral("helperbinary");
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
binary += QStringLiteral(".exe");
|
binary += QStringLiteral(".exe");
|
||||||
#endif
|
#endif
|
||||||
return binary;
|
return QFINDTESTDATA(binary);
|
||||||
}
|
}
|
||||||
QTEST_MAIN(tst_QSystemSemaphore)
|
QTEST_MAIN(tst_QSystemSemaphore)
|
||||||
#include "tst_qsystemsemaphore.moc"
|
#include "tst_qsystemsemaphore.moc"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user