We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2db2a64 commit 8da92a5Copy full SHA for 8da92a5
1 file changed
scripts/run_test_in_devicefarm.sh
@@ -70,8 +70,19 @@ if [[ -z "$app_package_upload_arn" ]]; then
70
fi
71
curl -H "Content-Type:application/octet-stream" -T $file_name $app_package_url
72
73
-echo "Waiting for uploads to complete"
74
-sleep 10
+# Wait for uploads to complete
+for arn in "$test_package_upload_arn" "$app_package_upload_arn"; do
75
+ while true; do
76
+ upload_status=$(aws devicefarm get-upload --arn "$arn" --region="us-west-2" --query="upload.status" --output text)
77
+ if [ "$upload_status" = "SUCCEEDED" ]; then
78
+ break
79
+ elif [ "$upload_status" = "FAILED" ]; then
80
+ echo "Upload failed for $arn"
81
+ exit 1
82
+ fi
83
+ sleep 5
84
+ done
85
+done
86
87
# Get oldest device we can test against.
88
minDevice=$(aws devicefarm list-devices \
0 commit comments