Skip to content

Commit dfc1f13

Browse files
Update gptdriverrunscript.sh
1 parent 24da6ef commit dfc1f13

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/gptdriverrunscript.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ readonly TEST_TAGS="${TEST_TAGS:-}"
1313
post_data() {
1414
local url=$1
1515
local body=$2
16-
if ! response=$(curl -s -f -X POST -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d "$body" "$url"); then
16+
# ADD -v FLAG HERE for debugging, you can remove it later
17+
if ! response=$(curl -s -f -v -X POST -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d "$body" "$url" 2>&1); then # 2>&1 captures stderr too
1718
echo "Error: Network request failed with error $response" >&2
1819
exit 1
1920
fi
@@ -43,14 +44,15 @@ fi
4344

4445
# Upload build file
4546
echo -n "Uploading build from $buildFilename for $buildPlatform: "
46-
if ! uploadedBuildResponse=$(curl -s -f -X POST \
47+
# ADD -v FLAG HERE for debugging, you can remove it later
48+
if ! uploadedBuildResponse=$(curl -s -f -v -X POST \
4749
-H "Authorization: Bearer $API_TOKEN" \
4850
-H "Content-Type: multipart/form-data" \
4951
-F "build=@$buildFilename" \
5052
-F "organisation_key=$API_ORG_KEY" \
5153
-F "platform=$buildPlatform" \
5254
-F "metadata={}" \
53-
"$API_URL/uploadBuild/"); then
55+
"$API_URL/uploadBuild/" 2>&1); then # 2>&1 captures stderr too
5456
echo "Error: Failed to upload build" >&2
5557
exit 1
5658
fi
@@ -80,7 +82,8 @@ fi
8082
echo -n "Waiting for test suite to finish..."
8183
startTime=$(date +%s)
8284
while true; do
83-
if ! testSuiteData=$(curl -s -f "$API_URL/testSuiteRuns/$testSuiteRunId/gh"); then
85+
# ADD -v FLAG HERE for debugging, you can remove it later
86+
if ! testSuiteData=$(curl -s -f -v "$API_URL/testSuiteRuns/$testSuiteRunId/gh" 2>&1); then # 2>&1 captures stderr too
8487
echo "Error: Failed to retrieve test suite data" >&2
8588
exit 1
8689
fi
@@ -121,4 +124,4 @@ if [[ "$testSuiteResult" == "succeeded" ]]; then
121124
else
122125
echo "Test suite did not pass, result: $testSuiteResult" >&2
123126
exit 1
124-
fi
127+
fi

0 commit comments

Comments
 (0)