Skip to content

Commit

Permalink
[MOB-3028] Update snapshot tests script to continue running after fai…
Browse files Browse the repository at this point in the history
…lure
  • Loading branch information
d4r1091 committed Dec 16, 2024
1 parent 770504c commit f132f56
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions perform_snapshot_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,15 @@ for device_set_key in "${!device_set_tests[@]}"; do

echo " - Running xcodebuild Command: $xcodebuild_cmd"

# Disable 'set -e' temporarily to ensure the script continues even if the test fails
set +e

# Run the xcodebuild command
eval $xcodebuild_cmd

# Re-enable 'set -e'
set -e

# Increment xcodebuild execution counter
xcodebuild_count=$((xcodebuild_count + 1))
done
Expand Down Expand Up @@ -446,14 +452,7 @@ if [ "${#xcresult_files[@]}" -eq 0 ]; then
exit 1
fi

# Merge the xcresult files
# Merge the xcresult files into one
$xcresulttool_path merge "${xcresult_files[@]}" --output-path "$combined_result_path"

echo "Combined xcresult created at: $combined_result_path"

# ================================
# Final Output
# ================================

# Print the total number of times xcodebuild was executed
echo "Total xcodebuild commands executed: $xcodebuild_count"
echo "Combined xcresult created at: $combined_result_path"

0 comments on commit f132f56

Please sign in to comment.