File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,12 @@ source scripts/check_secrets.sh
110110function  RunXcodebuild()  {
111111  echo  xcodebuild " $@ " 
112112
113-   xcbeautify_cmd=(xcbeautify --renderer github-actions)
113+   xcbeautify_cmd=(xcbeautify --renderer github-actions --disable-logging )
114114
115115  result=0
116-   xcodebuild " $@ "   |  tee xcodebuild.log |  " ${xcbeautify_cmd[@]} "   ||  result=$? 
116+   xcodebuild " $@ "   |  tee xcodebuild.log |  " ${xcbeautify_cmd[@]} "   \
117+     &&  CheckUnexpectedFailures xcodebuild.log \
118+     ||  result=$? 
117119
118120  if  [[ $result  ==  65 ]];  then 
119121    ExportLogs " $@ " 
@@ -122,7 +124,9 @@ function RunXcodebuild() {
122124    sleep 5
123125
124126    result=0
125-     xcodebuild " $@ "   |  tee xcodebuild.log |  " ${xcbeautify_cmd[@]} "   ||  result=$? 
127+     xcodebuild " $@ "   |  tee xcodebuild.log |  " ${xcbeautify_cmd[@]} "   \
128+       &&  CheckUnexpectedFailures xcodebuild.log \
129+       ||  result=$? 
126130  fi 
127131
128132  if  [[ $result  !=  0 ]];  then 
@@ -138,6 +142,15 @@ function ExportLogs() {
138142  python " ${scripts_dir} /xcresult_logs.py"   " $@ " 
139143}
140144
145+ function  CheckUnexpectedFailures()  {
146+   local  log_file=$1 
147+ 
148+   if  grep -Eq " [1-9]\d* failures \([1-9]\d* unexpected\)"   " $log_file " ;  then 
149+     echo  " xcodebuild failed with unexpected failures."   1>&2 
150+     return  65
151+   fi 
152+ }
153+ 
141154if  [[ " $xcode_major "   -lt  15 ]];  then 
142155  ios_flags=(
143156    -sdk ' iphonesimulator' 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments