Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions FirebasePerformance/Tests/Unit/Timer/FPRCounterListTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ + (void)setUp {
[super setUp];
FIRPerformance *performance = [FIRPerformance sharedInstance];
[performance setDataCollectionEnabled:YES];
#ifdef UNSWIZZLE_AVAILABLE
[[FPRClient sharedInstance] disableInstrumentation];
#endif // UNSWIZZLE_AVAILABLE
}

+ (void)tearDown {
[super tearDown];
FIRPerformance *performance = [FIRPerformance sharedInstance];
[performance setDataCollectionEnabled:NO];
#ifdef UNSWIZZLE_AVAILABLE
[[FPRClient sharedInstance] disableInstrumentation];
#endif // UNSWIZZLE_AVAILABLE
}

/** Validates counterlist object creation. */
Expand Down
19 changes: 16 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ source scripts/check_secrets.sh
function RunXcodebuild() {
echo xcodebuild "$@"

xcbeautify_cmd=(xcbeautify --renderer github-actions)
xcbeautify_cmd=(xcbeautify --renderer github-actions --disable-logging)

result=0
xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" || result=$?
xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" \
&& CheckUnexpectedFailures xcodebuild.log \
|| result=$?

if [[ $result == 65 ]]; then
ExportLogs "$@"
Expand All @@ -122,7 +124,9 @@ function RunXcodebuild() {
sleep 5

result=0
xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" || result=$?
xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" \
&& CheckUnexpectedFailures xcodebuild.log \
|| result=$?
fi

if [[ $result != 0 ]]; then
Expand All @@ -138,6 +142,15 @@ function ExportLogs() {
python "${scripts_dir}/xcresult_logs.py" "$@"
}

function CheckUnexpectedFailures() {
local log_file=$1

if grep -Eq "[1-9]\d* failures \([1-9]\d* unexpected\)" "$log_file"; then
echo "xcodebuild failed with unexpected failures." 1>&2
return 65
fi
}

if [[ "$xcode_major" -lt 15 ]]; then
ios_flags=(
-sdk 'iphonesimulator'
Expand Down
Loading