File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ function RunXcodebuild() {
114114
115115 result=0
116116 xcodebuild " $@ " | tee xcodebuild.log | " ${xcbeautify_cmd[@]} " || result=$?
117+ result=$( CheckUnexpectedFailures $result xcodebuild.log)
117118
118119 if [[ $result == 65 ]]; then
119120 ExportLogs " $@ "
@@ -123,6 +124,7 @@ function RunXcodebuild() {
123124
124125 result=0
125126 xcodebuild " $@ " | tee xcodebuild.log | " ${xcbeautify_cmd[@]} " || result=$?
127+ result=$( CheckUnexpectedFailures $result xcodebuild.log)
126128 fi
127129
128130 if [[ $result != 0 ]]; then
@@ -138,6 +140,19 @@ function ExportLogs() {
138140 python " ${scripts_dir} /xcresult_logs.py" " $@ "
139141}
140142
143+ function CheckUnexpectedFailures() {
144+ local result=$1
145+ local log_file=$2
146+
147+ if [[ $result != 0 ]]; then
148+ return " $result "
149+ elif grep -Eq " [1-9]\d* failures \([1-9]\d* unexpected\)" " $log_file " ; then
150+ return 65
151+ else
152+ return 0
153+ fi
154+ }
155+
141156if [[ " $xcode_major " -lt 15 ]]; then
142157 ios_flags=(
143158 -sdk ' iphonesimulator'
You can’t perform that action at this time.
0 commit comments