This repository was archived by the owner on Dec 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +29
-13
lines changed Expand file tree Collapse file tree 3 files changed +29
-13
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ config ()
1010{
1111 # A whitespace-separated list of executables that must be present and locatable.
1212 : ${REQUIRED_TOOLS=" xctool" }
13-
13+
1414 export REQUIRED_TOOLS
1515}
1616
@@ -28,7 +28,14 @@ main ()
2828 check_deps
2929 fi
3030
31- local submodules=$( git submodule status 2> /dev/null)
31+ local submodules=$( git submodule status)
32+ local result=$?
33+
34+ if [ " $result " -ne " 0" ]
35+ then
36+ exit $result
37+ fi
38+
3239 if [ -n " $submodules " ]
3340 then
3441 echo " *** Updating submodules..."
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ config ()
3939 # A whitespace-separated list of default schemes to build.
4040 #
4141 # Individual names can be quoted to avoid word splitting.
42- : ${SCHEMES:= $(xcodebuild -list 2>/ dev/ null | awk -f " $SCRIPT_DIR /schemes.awk" )}
43-
42+ : ${SCHEMES:= $(xcodebuild -list -project " $XCODEPROJ " 2>/ dev/ null | awk -f " $SCRIPT_DIR /schemes.awk" )}
43+
4444 export XCWORKSPACE
4545 export XCODEPROJ
4646 export BOOTSTRAP
@@ -120,16 +120,27 @@ build_scheme ()
120120
121121 local awkstatus=$?
122122
123- if [ " $awkstatus " -ne " 0 " ]
123+ if [ " $awkstatus " -eq " 1 " ]
124124 then
125- # Unit tests aren't supported.
126- action=build
125+ # SDK not found, try for iphonesimulator.
126+ sdkflag=" -sdk iphonesimulator"
127+
128+ # Determine whether the unit tests will run with iphonesimulator
129+ run_xctool $sdkflag -scheme " $scheme " run-tests | parse_build
130+
131+ awkstatus=$?
132+
133+ if [ " $awkstatus " -ne " 0" ]
134+ then
135+ # Unit tests will not run on iphonesimulator.
136+ sdkflag=" "
137+ fi
127138 fi
128139
129- if [ " $awkstatus " -eq " 1 " ]
140+ if [ " $awkstatus " -ne " 0 " ]
130141 then
131- # Build for iOS .
132- sdkflag= " -sdk iphonesimulator "
142+ # Unit tests aren't supported .
143+ action=build
133144 fi
134145
135146 run_xctool $sdkflag -scheme " $scheme " $action
Original file line number Diff line number Diff line change 22 FS = " \n " ;
33}
44
5- /Targets : / {
5+ /Schemes : / {
66 while (getline && $0 != " " ) {
7- if ($0 ~ /Test /) continue ;
8-
97 sub (/^ + /, " " );
108 print " '" $0 " '" ;
119 }
You can’t perform that action at this time.
0 commit comments