summaryrefslogtreecommitdiffstats
path: root/mkspecs
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 /mkspecs
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 'mkspecs')
-rw-r--r--mkspecs/features/xctest.prf6
-rw-r--r--mkspecs/macx-xcode/QtTest.plist24
-rw-r--r--mkspecs/macx-xcode/default.xcscheme6
3 files changed, 33 insertions, 3 deletions
diff --git a/mkspecs/features/xctest.prf b/mkspecs/features/xctest.prf
new file mode 100644
index 0000000000..540c7590ad
--- /dev/null
+++ b/mkspecs/features/xctest.prf
@@ -0,0 +1,6 @@
+equals(TEMPLATE, app):macx-xcode {
+ load(sdk)
+ # Make the XCTest framework available. This is normally handled automatically
+ # by Xcode based on heuristics, but we need to explicitly link to XCTest.
+ QMAKE_LFLAGS += -F$${QMAKE_MAC_SDK_PLATFORM_PATH}/Developer/Library/Frameworks -weak_framework XCTest
+}
diff --git a/mkspecs/macx-xcode/QtTest.plist b/mkspecs/macx-xcode/QtTest.plist
new file mode 100644
index 0000000000..41dddb1a53
--- /dev/null
+++ b/mkspecs/macx-xcode/QtTest.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>io.qt.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>$(PRODUCT_NAME)</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-xcode/default.xcscheme b/mkspecs/macx-xcode/default.xcscheme
index ac21df17f3..4a16fefca0 100644
--- a/mkspecs/macx-xcode/default.xcscheme
+++ b/mkspecs/macx-xcode/default.xcscheme
@@ -32,9 +32,9 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "@TARGET_PBX_KEY@"
- BuildableName = "@QMAKE_ORIG_TARGET@"
- BlueprintName = "@QMAKE_ORIG_TARGET@"
+ BlueprintIdentifier = "@TEST_BUNDLE_PBX_KEY@"
+ BuildableName = "Qt Test"
+ BlueprintName = "Qt Test"
ReferencedContainer = "container:@QMAKE_ORIG_TARGET@.xcodeproj">
</BuildableReference>
</TestableReference>