summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-04-23 17:54:08 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-04-23 17:54:08 -0700
commitb528d7cc039f2a0abbf1eb6c77a7fc2099bc3a19 (patch)
treef7f585c1e3795f3746e8cafc76a4cf3ab933e788 /scripts
parent75980a8905b9130ef7a87eb65c66c8a98437c081 (diff)
downloadqtlocation-mapboxgl-b528d7cc039f2a0abbf1eb6c77a7fc2099bc3a19.tar.gz
fixes #830, #880: bring back iOS functional tests
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ios_travis/upload_screenshots.sh13
-rwxr-xr-xscripts/package_ios.sh4
-rwxr-xr-xscripts/test_ios.sh16
-rwxr-xr-xscripts/travis_script.sh21
4 files changed, 47 insertions, 7 deletions
diff --git a/scripts/ios_travis/upload_screenshots.sh b/scripts/ios_travis/upload_screenshots.sh
new file mode 100755
index 0000000000..88a6427f75
--- /dev/null
+++ b/scripts/ios_travis/upload_screenshots.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+ls $KIF_SCREENSHOTS/
+
+REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
+
+aws s3 cp $KIF_SCREENSHOTS/ s3://mapbox/$REPO_NAME/ios/tests/$TRAVIS_JOB_NUMBER/ --acl public-read --recursive > /dev/null
+
+echo http://mapbox.s3.amazonaws.com/$REPO_NAME/ios/tests/$TRAVIS_JOB_NUMBER/index.html
diff --git a/scripts/package_ios.sh b/scripts/package_ios.sh
index da55b297ae..a651d27342 100755
--- a/scripts/package_ios.sh
+++ b/scripts/package_ios.sh
@@ -33,9 +33,10 @@ export BUILDTYPE=${BUILDTYPE:-Release}
export HOST=ios
make Xcode/mbgl
-step "Building iOS targets..."
+step "Building iOS device targets..."
xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
ARCHS="arm64 armv7 armv7s" \
+ ONLY_ACTIVE_ARCH=NO \
-project ./build/ios/mbgl.xcodeproj \
-configuration ${BUILDTYPE} \
-target everything \
@@ -45,6 +46,7 @@ xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
step "Building iOS Simulator targets..."
xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
ARCHS="x86_64 i386" \
+ ONLY_ACTIVE_ARCH=NO \
-project ./build/ios/mbgl.xcodeproj \
-configuration ${BUILDTYPE} \
-target everything \
diff --git a/scripts/test_ios.sh b/scripts/test_ios.sh
new file mode 100755
index 0000000000..77d4d90ad3
--- /dev/null
+++ b/scripts/test_ios.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+xcodebuild \
+ -project ./test/ios/ios-tests.xcodeproj \
+ -scheme 'Mapbox GL Tests' \
+ -sdk iphonesimulator \
+ -destination 'platform=iOS Simulator,name=iPhone 5s,OS=7.1' \
+ -destination 'platform=iOS Simulator,name=iPhone 5s,OS=latest' \
+ -destination 'platform=iOS Simulator,name=iPad 2,OS=7.1' \
+ -destination 'platform=iOS Simulator,name=iPad 2,OS=latest' \
+ test \
+ | xcpretty
diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh
index 0351f94144..093b31273d 100755
--- a/scripts/travis_script.sh
+++ b/scripts/travis_script.sh
@@ -48,15 +48,24 @@ elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "osx" ]]; then
elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "ios" ]]; then
#
- # build & package iOS
- #
- mapbox_time "package_ios"
- make ipackage
- #
- # conditionally deploy iOS build
+ # conditionally publish or test
#
if [[ -n "$PUBLISH_TAG" ]]; then
+ #
+ # build & package iOS
+ #
+ mapbox_time "package_ios"
+ make ipackage
+ #
+ # publish iOS build
+ #
mapbox_time "deploy_ios"
./scripts/publish_ios.sh "$PUBLISH_VERSION"
+ else
+ #
+ # build & test iOS
+ #
+ mapbox_time "run_ios_tests"
+ make itest
fi
fi