macOS: Don't build auto-tests as application bundles unless explicitly requested
Consistent with other Unix platforms, and internally consistent between tests, as a lot of tests were already applying CONFIG -= app_bundle manually. Change-Id: Icd2b7e1c08015b26137af60ff82fddbc753f0ff4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>bb10
parent
9cac65bc66
commit
7437ede145
|
|
@ -80,6 +80,8 @@ CONFIG += \
|
|||
# resolved), nor functional (.res files end up in .prl files and break things).
|
||||
unix: CONFIG += explicitlib
|
||||
|
||||
# By default we want tests on macOS to be built as standalone executables
|
||||
macos: CONFIG += testcase_no_bundle
|
||||
|
||||
defineTest(qtBuildPart) {
|
||||
bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ have_target {
|
|||
# qt_build_config tells us to re-enable exceptions here.
|
||||
testcase_exceptions: CONFIG += exceptions
|
||||
|
||||
# Set in qt_build_config.prf
|
||||
testcase_no_bundle: CONFIG -= app_bundle
|
||||
|
||||
benchmark: type = benchmark
|
||||
else: type = check
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT -= gui
|
|||
|
||||
TARGET = tst_qglobalstatic
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += exceptions
|
||||
|
||||
SOURCES += tst_qglobalstatic.cpp
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= debug_and_release_target
|
||||
qtConfig(c++11): CONFIG += c++11
|
||||
qtConfig(c++14): CONFIG += c++14
|
||||
TARGET = ../tst_qlogging
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= debug_and_release_target
|
||||
QT = core-private core testlib
|
||||
qtHaveModule(network): QT += network
|
||||
else: DEFINES += QT_NO_NETWORK
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle
|
||||
TARGET = tst_qlockfile
|
||||
SOURCES += tst_qlockfile.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= debug_and_release_target
|
||||
QT = core testlib
|
||||
SOURCES = tst_qprocessnoapplication.cpp
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= debug_and_release_target
|
||||
QT = core-private testlib network
|
||||
SOURCES = ../tst_qprocess.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
TARGET = tst_json
|
||||
QT = core-private testlib
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += testcase
|
||||
|
||||
!android:TESTDATA += bom.json test.json test.bjson test3.json test2.json
|
||||
|
|
|
|||
|
|
@ -2,4 +2,3 @@ CONFIG += testcase
|
|||
TARGET = tst_qmetamethod
|
||||
QT = core testlib
|
||||
SOURCES = tst_qmetamethod.cpp
|
||||
mac:CONFIG -= app_bundle
|
||||
|
|
|
|||
|
|
@ -2,4 +2,3 @@ CONFIG += testcase
|
|||
TARGET = tst_qmetaobjectbuilder
|
||||
QT = core-private testlib
|
||||
SOURCES = tst_qmetaobjectbuilder.cpp
|
||||
mac:CONFIG -= app_bundle
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ CONFIG += testcase
|
|||
|
||||
QT = core-private testlib
|
||||
|
||||
mac:CONFIG -= app_bundle
|
||||
linux:LIBS += -lrt
|
||||
|
||||
SOURCES += tst_qsharedmemory.cpp
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ CONFIG += testcase
|
|||
QT = core testlib
|
||||
|
||||
win32: CONFIG += console
|
||||
mac:CONFIG -= app_bundle
|
||||
|
||||
SOURCES += tst_qsystemsemaphore.cpp
|
||||
TARGET = tst_qsystemsemaphore
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ win32 {
|
|||
}
|
||||
}
|
||||
|
||||
mac: CONFIG -= app_bundle
|
||||
|
||||
!qtConfig(library) {
|
||||
LIBS += -L ../bin/ -lplugin1 -lplugin2
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle
|
||||
TARGET = ../tst_qlibrary
|
||||
QT = core testlib
|
||||
SOURCES = ../tst_qlibrary.cpp
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ QT = core testlib
|
|||
qtConfig(private_tests): QT += core-private
|
||||
SOURCES = ../tst_qpluginloader.cpp ../fakeplugin.cpp
|
||||
HEADERS = ../theplugin/plugininterface.h
|
||||
CONFIG -= app_bundle
|
||||
|
||||
win32 {
|
||||
CONFIG(debug, debug|release) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
CONFIG += testcase
|
||||
TARGET = ../tst_qthreadstorage
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= debug_and_release_target
|
||||
CONFIG += console
|
||||
QT = core testlib
|
||||
SOURCES = ../tst_qthreadstorage.cpp
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG += console testcase
|
||||
CONFIG -= app_bundle
|
||||
QT = core testlib core-private
|
||||
embedded: QT += gui
|
||||
SOURCES = ../tst_qlocale.cpp
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
CONFIG += testcase
|
||||
testcase.timeout = 600 # this test is slow
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= debug_and_release_target
|
||||
SOURCES += ../tst_qnetworkreply.cpp
|
||||
TARGET = ../tst_qnetworkreply
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG += testcase console
|
||||
CONFIG -= app_bundle
|
||||
TARGET = tst_qnetworkdatagram
|
||||
SOURCES += tst_qnetworkdatagram.cpp
|
||||
QT = core network testlib
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle
|
||||
TARGET = tst_lancelot
|
||||
QT += xml testlib
|
||||
|
||||
|
|
|
|||
|
|
@ -155,9 +155,12 @@ void tst_MacPlist::test_plist()
|
|||
|
||||
QString infoPlist = QLatin1String("Info.plist");
|
||||
QDir dir(QCoreApplication::applicationDirPath());
|
||||
#ifndef Q_OS_MACOS
|
||||
// macOS builds tests as single executables, iOS/tvOS/watchOS does not
|
||||
QVERIFY(dir.cdUp());
|
||||
QVERIFY(dir.cdUp());
|
||||
QVERIFY(dir.cdUp());
|
||||
#endif
|
||||
QVERIFY(dir.cd(QLatin1String("app")));
|
||||
QVERIFY(dir.cd(QLatin1String("app.app")));
|
||||
QVERIFY(dir.cd(QLatin1String("Contents")));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
QT += widgets widgets-private testlib
|
||||
QT += core-private gui-private
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG += testcase
|
||||
mac:CONFIG -= app_bundle
|
||||
TARGET = tst_qwindowcontainer
|
||||
QT += widgets testlib
|
||||
SOURCES += tst_qwindowcontainer.cpp
|
||||
|
|
|
|||
Loading…
Reference in New Issue