summaryrefslogtreecommitdiffstats
path: root/src/testlib/testlib.pro
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2015-02-11 13:59:46 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-27 16:53:43 +0000
commit94ea7b71320ca409e2d8b1c701e3cc48912ebde3 (patch)
treeacfc8f3215feb7368271f17c3aa05571cddcaf17 /src/testlib/testlib.pro
parent595606fb027ea6bfd8f4fa01f44419e2b5b63608 (diff)
Add XCTest logger backend to QtTestLib
Will be active when running test apps through Xcode's 'test' action, and reports QtTestLib test objects and functions to Xcode as XCTest cases. This allows running tests on both iOS Simulator and iOS devices from the command line, through xcodebuild, without relying on any 3rd party tools. It also integrates Qt test failures and passes into the Xcode IDE, which may be useful for closer investigation of test failures. The feature is limited to Xcode 6.x. Change-Id: I33d39edbabdbaebef48d2d0eb7e08a1ffb72c397 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/testlib/testlib.pro')
-rw-r--r--src/testlib/testlib.pro19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index dbcc588d10..841d913105 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -76,6 +76,25 @@ wince*::LIBS += libcmt.lib \
mac {
LIBS += -framework Security
osx: LIBS += -framework ApplicationServices -framework IOKit
+
+ # XCTest support
+ !lessThan(QMAKE_XCODE_VERSION, "6.0") {
+ OBJECTIVE_SOURCES += qxctestlogger.mm
+ HEADERS += qxctestlogger_p.h
+
+ DEFINES += HAVE_XCTEST
+ LIBS += -framework Foundation
+
+ load(sdk)
+ platform_dev_frameworks_path = $${QMAKE_MAC_SDK_PLATFORM_PATH}/Developer/Library/Frameworks
+
+ # We can't put this path into LIBS (so that it propagates to the prl file), as we
+ # don't know yet if the target that links to testlib will build under Xcode or not.
+ # The corresponding flags for the target lives in xctest.prf, where we do know.
+ QMAKE_LFLAGS += -F$${platform_dev_frameworks_path} -weak_framework XCTest
+ QMAKE_OBJECTIVE_CFLAGS += -F$${platform_dev_frameworks_path}
+ MODULE_CONFIG += xctest
+ }
}
load(qt_module)