fixes #830, #880: bring back iOS functional tests

This commit is contained in:
Justin R. Miller
2015-04-23 17:54:08 -07:00
parent 75980a8905
commit b528d7cc03
19 changed files with 329 additions and 261 deletions

View File

@@ -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

View File

@@ -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 \

16
scripts/test_ios.sh Executable file
View File

@@ -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

View File

@@ -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