Skip to content

Commit 8354621

Browse files
committed
Add small fix to retry mechanism for exit on success
Result variable was storing last failure so not needed for next retry in case we got 0. Fix minor echo messages for first run of test. Relates-To: OLPEDGE-1144 Signed-off-by: Yaroslav Stefinko <[email protected]>
1 parent fa2f20f commit 8354621

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

scripts/linux/fv/gitlab-olp-cpp-sdk-functional-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ export result=$?
4545
kill -15 ${SERVER_PID}
4646
# Waiter for server process to be exited correctly
4747
wait ${SERVER_PID}
48+
echo "Functional test finished with status: ${result}"
4849
exit ${result}

scripts/linux/fv/gitlab_test_fv.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ do
5555
break
5656
fi
5757

58-
RETRY_COUNT=$((RETRY_COUNT+1))
59-
echo "This is ${RETRY_COUNT} time retry ..."
58+
if [[ ${RETRY_COUNT} -eq 0 ]]; then
59+
echo "This is ${RETRY_COUNT} time run ..."
60+
else
61+
RETRY_COUNT=$((RETRY_COUNT+1))
62+
echo "This is ${RETRY_COUNT} time retry ..."
63+
fi
6064

6165
# Run functional tests
6266
${FV_HOME}/gitlab-olp-cpp-sdk-functional-test.sh 2>> errors.txt
63-
if [[ $? -eq 1 || ${result} -eq 1 ]]; then
67+
if [[ $? -eq 1 ]]; then
6468
TEST_FAILURE=1
6569
continue
6670
else

0 commit comments

Comments
 (0)