diff options
author | Jason Wray <jason@mapbox.com> | 2019-06-11 14:55:05 -0700 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2019-06-14 15:23:16 -0700 |
commit | 1cfb0ed10d9678169976d574e8c1c3322337fceb (patch) | |
tree | 123f1ed887119b0f80d85c64e056e546279ef1e0 | |
parent | 823670ea35df7d35f68a9d3cb5a42dbc823b66ea (diff) | |
download | qtlocation-mapboxgl-1cfb0ed10d9678169976d574e8c1c3322337fceb.tar.gz |
[ios, build] Add MORE_SIMULATORS option to iOS make commandsupstream/friedbunny-adds-more-simulators
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | platform/ios/DEVELOPING.md | 11 |
2 files changed, 32 insertions, 3 deletions
@@ -213,10 +213,26 @@ IOS_XCODEBUILD_SIM = xcodebuild \ ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES \ -derivedDataPath $(IOS_OUTPUT_PATH) \ -configuration $(BUILDTYPE) -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' \ + -destination 'platform=iOS Simulator,OS=latest,name=iPhone 8' \ -workspace $(IOS_WORK_PATH) \ -jobs $(JOBS) +ifneq ($(MORE_SIMULATORS),) + IOS_XCODEBUILD_SIM += -parallel-testing-enabled YES \ + -destination 'platform=iOS Simulator,OS=latest,name=iPhone Xs Max' \ + -destination 'platform=iOS Simulator,OS=latest,name=iPhone Xr' \ + -destination 'platform=iOS Simulator,OS=latest,name=iPad Pro (11-inch)' \ + -destination 'platform=iOS Simulator,OS=11.4,name=iPhone 7' \ + -destination 'platform=iOS Simulator,OS=11.4,name=iPhone X' \ + -destination 'platform=iOS Simulator,OS=11.4,name=iPad Air 2,' \ + -destination 'platform=iOS Simulator,OS=10.3.1,name=iPhone SE' \ + -destination 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7 Plus' \ + -destination 'platform=iOS Simulator,OS=10.3.1,name=iPad Air' \ + -destination 'platform=iOS Simulator,OS=9.3,name=iPhone 6s Plus' \ + -destination 'platform=iOS Simulator,OS=9.3,name=iPhone 6s' \ + -destination 'platform=iOS Simulator,OS=9.3,name=iPad 2' +endif + ifneq ($(CI),) IOS_XCODEBUILD_SIM += -xcconfig platform/darwin/ci.xcconfig endif @@ -265,6 +281,12 @@ ios-sanitize-address: $(IOS_PROJ_PATH) ios-static-analyzer: $(IOS_PROJ_PATH) set -o pipefail && $(IOS_XCODEBUILD_SIM) analyze -scheme 'CI' test $(XCPRETTY) +.PHONY: ios-install-simulators +ios-install-simulators: + xcversion simulators --install="iOS 11.4" || true + xcversion simulators --install="iOS 10.3.1" || true + xcversion simulators --install="iOS 9.3" || true + .PHONY: ios-check-events-symbols ios-check-events-symbols: ./platform/ios/scripts/check-events-symbols.sh diff --git a/platform/ios/DEVELOPING.md b/platform/ios/DEVELOPING.md index d31ceccafa..88583b2502 100644 --- a/platform/ios/DEVELOPING.md +++ b/platform/ios/DEVELOPING.md @@ -146,9 +146,16 @@ You can provide an optional and custom [`xcconfig`](https://help.apple.com/xcode ## Testing -`make ios-test` builds and runs unit tests of cross-platform code as well as the SDK. +`make ios-test` builds and runs unit tests of cross-platform code and of the SDK. Other types of tests available include: -To instead run the cross-platform tests in Xcode instead of on the command line: +* `make ios-integration-test` runs UI tests from the "Integration Test Harness" scheme. +* `make ios-sanitize` runs unit tests from the "CI" scheme with the Thread Sanitizer and Undefined Behavior Sanitizer enabled. +* `make ios-sanitize-address` runs unit tests from the "CI" scheme with the Address Sanitizer enabled. +* `make ios-static-analyzer` runs unit tests from the "CI" scheme with the Static Analyzer enabled. + +These commands are run by default on a single Simulator. To enable legacy iOS versions and more device types, add `MORE_SIMULATORS=1`. + +To run the cross-platform tests in Xcode instead of on the command line: 1. Run `make iproj` to set up the workspace. 1. Change the scheme to “test (platform project)” and press Command-R to run core unit tests. |