File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
FirebasePerformance/Tests/Unit/Timer Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,18 @@ + (void)setUp {
2929 [super setUp ];
3030 FIRPerformance *performance = [FIRPerformance sharedInstance ];
3131 [performance setDataCollectionEnabled: YES ];
32+ #ifdef UNSWIZZLE_AVAILABLE
3233 [[FPRClient sharedInstance ] disableInstrumentation ];
34+ #endif // UNSWIZZLE_AVAILABLE
3335}
3436
3537+ (void )tearDown {
3638 [super tearDown ];
3739 FIRPerformance *performance = [FIRPerformance sharedInstance ];
3840 [performance setDataCollectionEnabled: NO ];
41+ #ifdef UNSWIZZLE_AVAILABLE
3942 [[FPRClient sharedInstance ] disableInstrumentation ];
43+ #endif // UNSWIZZLE_AVAILABLE
4044}
4145
4246/* * Validates counterlist object creation. */
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