diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-07 18:55:48 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-11 11:00:34 -0700 |
commit | 1c7c5af69df3edc19ba48697d350de087b9243cf (patch) | |
tree | c9538a61d974634db4aa6f3ae20d4ff9078ad75e /platform | |
parent | c507b8a693d91dea1b0018f9105553128a245146 (diff) | |
download | qtlocation-mapboxgl-1c7c5af69df3edc19ba48697d350de087b9243cf.tar.gz |
[ios] Run core unit tests in CI
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/INSTALL.md | 7 | ||||
-rw-r--r-- | platform/ios/bitrise.yml | 2 | ||||
-rw-r--r-- | platform/ios/platform.gyp | 35 | ||||
-rw-r--r-- | platform/linux/platform.gyp | 14 | ||||
-rw-r--r-- | platform/osx/platform.gyp | 13 |
5 files changed, 71 insertions, 0 deletions
diff --git a/platform/ios/INSTALL.md b/platform/ios/INSTALL.md index 416bbc6381..4c769cedc4 100644 --- a/platform/ios/INSTALL.md +++ b/platform/ios/INSTALL.md @@ -20,6 +20,13 @@ The Mapbox iOS SDK and iosapp demo application build against the iOS 7.0 SDK. Th [sudo] gem install jazzy ``` +1. Install ios-sim version 3.2.0 (not any other version) for running `make test-ios`: + + ``` + brew tap mapbox/homebrew-ios-sim-3 + brew install mapbox/homebrew-ios-sim-3/ios-sim + ``` + 1. Run `make ipackage`. The packaging script will produce a `build/ios/pkg/` folder containing: - a `dynamic` folder containing a dynamically-linked fat framework with debug symbols for devices and the iOS Simulator - a `static` folder containing a statically-linked framework with debug symbols for devices and the iOS Simulator diff --git a/platform/ios/bitrise.yml b/platform/ios/bitrise.yml index 83dba2239e..3d1e34ae47 100644 --- a/platform/ios/bitrise.yml +++ b/platform/ios/bitrise.yml @@ -29,6 +29,8 @@ workflows: - content: |- #!/bin/bash set -eu -o pipefail + brew tap mapbox/homebrew-ios-sim-3 + brew install mapbox/homebrew-ios-sim-3/ios-sim gem install jazzy --no-rdoc --no-ri export BUILDTYPE=Debug make ios diff --git a/platform/ios/platform.gyp b/platform/ios/platform.gyp index f182767b56..b4190d6fef 100644 --- a/platform/ios/platform.gyp +++ b/platform/ios/platform.gyp @@ -10,6 +10,7 @@ }, 'includes': [ '../../mbgl.gypi', + '../../test/test.gypi', ], 'target_defaults': { 'target_conditions': [ @@ -34,6 +35,40 @@ }, 'targets': [ { + 'target_name': 'test', + 'type': 'executable', + 'product_name': 'ios-test', + 'product_extension': 'app', + 'mac_bundle': 1, + + 'dependencies': [ + 'test-lib', + 'platform-lib', + ], + + 'sources': [ + '../../test/src/main.mm', +# '../../src/mbgl/util/premultiply.cpp', + ], + + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos', + 'INFOPLIST_FILE': '../../test/src/app-info.plist', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + 'TARGETED_DEVICE_FAMILY': '1,2', + 'COPY_PHASE_STRIP': 'NO', + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'CLANG_ENABLE_MODULES': 'YES', + 'CODE_SIGN_IDENTITY': 'iPhone Developer', + }, + + 'copies': [{ + 'destination': '<(PRODUCT_DIR)/$(WRAPPER_NAME)/test', + 'files': [ '../../test/fixtures' ], + }] + }, + { 'target_name': 'platform-lib', 'product_name': 'mbgl-platform-ios', 'type': 'static_library', diff --git a/platform/linux/platform.gyp b/platform/linux/platform.gyp index 0adbd2a2e6..557587d6e9 100644 --- a/platform/linux/platform.gyp +++ b/platform/linux/platform.gyp @@ -19,6 +19,20 @@ ], 'targets': [ { + 'target_name': 'test', + 'type': 'executable', + + 'dependencies': [ + 'test-lib', + 'platform-lib', + 'copy_certificate_bundle', + ], + + 'sources': [ + '../../test/src/main.cpp', + ], + }, + { 'target_name': 'platform-lib', 'product_name': 'mbgl-platform-linux', 'type': 'static_library', diff --git a/platform/osx/platform.gyp b/platform/osx/platform.gyp index 120e5c592d..657aa85286 100644 --- a/platform/osx/platform.gyp +++ b/platform/osx/platform.gyp @@ -17,6 +17,19 @@ ], 'targets': [ { + 'target_name': 'test', + 'type': 'executable', + + 'dependencies': [ + 'test-lib', + 'platform-lib', + ], + + 'sources': [ + '../../test/src/main.cpp', + ], + }, + { 'target_name': 'platform-lib', 'product_name': 'mbgl-platform-osx', 'type': 'static_library', |