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 {
29
29
[super setUp ];
30
30
FIRPerformance *performance = [FIRPerformance sharedInstance ];
31
31
[performance setDataCollectionEnabled: YES ];
32
+ #ifdef UNSWIZZLE_AVAILABLE
32
33
[[FPRClient sharedInstance ] disableInstrumentation ];
34
+ #endif // UNSWIZZLE_AVAILABLE
33
35
}
34
36
35
37
+ (void )tearDown {
36
38
[super tearDown ];
37
39
FIRPerformance *performance = [FIRPerformance sharedInstance ];
38
40
[performance setDataCollectionEnabled: NO ];
41
+ #ifdef UNSWIZZLE_AVAILABLE
39
42
[[FPRClient sharedInstance ] disableInstrumentation ];
43
+ #endif // UNSWIZZLE_AVAILABLE
40
44
}
41
45
42
46
/* * Validates counterlist object creation. */
Original file line number Diff line number Diff line change @@ -110,10 +110,12 @@ source scripts/check_secrets.sh
110
110
function RunXcodebuild() {
111
111
echo xcodebuild " $@ "
112
112
113
- xcbeautify_cmd=(xcbeautify --renderer github-actions)
113
+ xcbeautify_cmd=(xcbeautify --renderer github-actions --disable-logging )
114
114
115
115
result=0
116
- xcodebuild " $@ " | tee xcodebuild.log | " ${xcbeautify_cmd[@]} " || result=$?
116
+ xcodebuild " $@ " | tee xcodebuild.log | " ${xcbeautify_cmd[@]} " \
117
+ && CheckUnexpectedFailures xcodebuild.log \
118
+ || result=$?
117
119
118
120
if [[ $result == 65 ]]; then
119
121
ExportLogs " $@ "
@@ -122,7 +124,9 @@ function RunXcodebuild() {
122
124
sleep 5
123
125
124
126
result=0
125
- xcodebuild " $@ " | tee xcodebuild.log | " ${xcbeautify_cmd[@]} " || result=$?
127
+ xcodebuild " $@ " | tee xcodebuild.log | " ${xcbeautify_cmd[@]} " \
128
+ && CheckUnexpectedFailures xcodebuild.log \
129
+ || result=$?
126
130
fi
127
131
128
132
if [[ $result != 0 ]]; then
@@ -138,6 +142,15 @@ function ExportLogs() {
138
142
python " ${scripts_dir} /xcresult_logs.py" " $@ "
139
143
}
140
144
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
+
141
154
if [[ " $xcode_major " -lt 15 ]]; then
142
155
ios_flags=(
143
156
-sdk ' iphonesimulator'
You can’t perform that action at this time.
0 commit comments