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 ()
10
10
{
11
11
# A whitespace-separated list of executables that must be present and locatable.
12
12
: ${REQUIRED_TOOLS=" xctool" }
13
-
13
+
14
14
export REQUIRED_TOOLS
15
15
}
16
16
@@ -28,7 +28,14 @@ main ()
28
28
check_deps
29
29
fi
30
30
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
+
32
39
if [ -n " $submodules " ]
33
40
then
34
41
echo " *** Updating submodules..."
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ config ()
39
39
# A whitespace-separated list of default schemes to build.
40
40
#
41
41
# 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
+
44
44
export XCWORKSPACE
45
45
export XCODEPROJ
46
46
export BOOTSTRAP
@@ -120,16 +120,27 @@ build_scheme ()
120
120
121
121
local awkstatus=$?
122
122
123
- if [ " $awkstatus " -ne " 0 " ]
123
+ if [ " $awkstatus " -eq " 1 " ]
124
124
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
127
138
fi
128
139
129
- if [ " $awkstatus " -eq " 1 " ]
140
+ if [ " $awkstatus " -ne " 0 " ]
130
141
then
131
- # Build for iOS .
132
- sdkflag= " -sdk iphonesimulator "
142
+ # Unit tests aren't supported .
143
+ action=build
133
144
fi
134
145
135
146
run_xctool $sdkflag -scheme " $scheme " $action
Original file line number Diff line number Diff line change 2
2
FS = " \n " ;
3
3
}
4
4
5
- /Targets : / {
5
+ /Schemes : / {
6
6
while (getline && $0 != " " ) {
7
- if ($0 ~ /Test /) continue ;
8
-
9
7
sub (/^ + /, " " );
10
8
print " '" $0 " '" ;
11
9
}
You can’t perform that action at this time.
0 commit comments