1
1
#! /bin/bash -exu -o pipefail
2
2
3
+ if [[ -f " /usr/local/bin/xcpretty" ]]; then
4
+ PRETTYFIER=" xcpretty"
5
+ else
6
+ PRETTYFIER=" tee" # Passthrough stdout
7
+ fi
8
+
3
9
OSX_SDK=" macosx"
4
10
IOS_SDK=" iphonesimulator"
5
11
TVOS_SDK=" appletvsimulator"
@@ -45,7 +51,7 @@ xcodebuild test -scheme "$OSX_TEST_SCHEME" "SYMROOT=$BUILD_DIR"
45
51
46
52
# Build for OS X for oldest supported deployment target
47
53
rm -rf " $BUILD_DIR "
48
- xcodebuild build -sdk " $OSX_SDK " -target " $OSX_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " MACOSX_DEPLOYMENT_TARGET=10.7" > /dev/null
54
+ xcodebuild build -sdk " $OSX_SDK " -target " $OSX_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " MACOSX_DEPLOYMENT_TARGET=10.7" | $PRETTYFIER
49
55
50
56
# Run tests
51
57
runTests $PRODUCT " htmlForm" " Tests/HTMLForm"
@@ -59,19 +65,19 @@ runTests $PRODUCT "webServer" "Tests/WebServer-Sample-Movie" "Tests/Sample-Movie
59
65
60
66
# Build for OS X for current deployment target
61
67
rm -rf " $BUILD_DIR "
62
- xcodebuild build -sdk " $OSX_SDK " -target " $OSX_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " MACOSX_DEPLOYMENT_TARGET=$OSX_SDK_VERSION " > /dev/null
68
+ xcodebuild build -sdk " $OSX_SDK " -target " $OSX_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " MACOSX_DEPLOYMENT_TARGET=$OSX_SDK_VERSION " | $PRETTYFIER
63
69
64
70
# Build for iOS for oldest supported deployment target
65
71
rm -rf " $BUILD_DIR "
66
- xcodebuild build -sdk " $IOS_SDK " -target " $IOS_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " IPHONEOS_DEPLOYMENT_TARGET=8.0" > /dev/null
72
+ xcodebuild build -sdk " $IOS_SDK " -target " $IOS_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " IPHONEOS_DEPLOYMENT_TARGET=8.0" | $PRETTYFIER
67
73
68
74
# Build for iOS for current deployment target
69
75
rm -rf " $BUILD_DIR "
70
- xcodebuild build -sdk " $IOS_SDK " -target " $IOS_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " IPHONEOS_DEPLOYMENT_TARGET=$IOS_SDK_VERSION " > /dev/null
76
+ xcodebuild build -sdk " $IOS_SDK " -target " $IOS_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " IPHONEOS_DEPLOYMENT_TARGET=$IOS_SDK_VERSION " | $PRETTYFIER
71
77
72
78
# Build for tvOS for current deployment target
73
79
rm -rf " $BUILD_DIR "
74
- xcodebuild build -sdk " $TVOS_SDK " -target " $TVOS_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " TVOS_DEPLOYMENT_TARGET=$TVOS_SDK_VERSION " > /dev/null
80
+ xcodebuild build -sdk " $TVOS_SDK " -target " $TVOS_TARGET " -configuration " $CONFIGURATION " " SYMROOT=$BUILD_DIR " " TVOS_DEPLOYMENT_TARGET=$TVOS_SDK_VERSION " | $PRETTYFIER
75
81
76
82
# Done
77
83
echo " \nAll tests completed successfully!"
0 commit comments