Skip to content

Commit cb7c27f

Browse files
committed
Add fix to retry mechanism for NV/FV online tests.
Add echo about last return code for debug online tests Relates-to: OLPEDGE-1144 Signed-off-by: Yaroslav Stefinko <[email protected]>
1 parent 4cf085c commit cb7c27f

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,22 @@ do
3434
set -e
3535
done
3636

37+
result=0
3738
echo ">>> Functional Test ... >>>"
3839
source $FV_HOME/olp-cpp-sdk-functional-test.variables
3940
$REPO_HOME/build/tests/functional/olp-cpp-sdk-functional-tests \
4041
--gtest_output="xml:$REPO_HOME/reports/olp-functional-test-report.xml" \
41-
--gtest_filter="-ArcGisAuthenticationTest.SignInArcGis":"FacebookAuthenticationTest.SignInFacebook"
42+
--gtest_filter="-ArcGisAuthenticationTest.SignInArcGis":"FacebookAuthenticationTest.SignInFacebook" || result=1
4243

4344
# Add retry to functional/online tests. Some online tests are flaky due to third party reason.
44-
result=$?
45+
echo "Last return code in $result"
4546
count=0
4647
while [[ ${result} -ne 0 ]];
4748
do
48-
count=count+1
49-
echo "This is ${count} time retry ..."
49+
count=$((count+1)) && echo "This is ${count} time retry ..."
5050
$REPO_HOME/build/tests/functional/olp-cpp-sdk-functional-tests \
5151
--gtest_output="xml:$REPO_HOME/reports/olp-functional-test-report.xml" \
52-
--gtest_filter="-ArcGisAuthenticationTest.SignInArcGis":"FacebookAuthenticationTest.SignInFacebook"
53-
result=$?
52+
--gtest_filter="-ArcGisAuthenticationTest.SignInArcGis":"FacebookAuthenticationTest.SignInFacebook" || result=1
5453

5554
# Stop after 3 retry
5655
if [[ ${count} = 3 ]]; then

scripts/linux/nv/gitlab_test_valgrind.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ do
5656
set -e
5757
done
5858
echo ">>> Local Server started for further functional test ... >>>"
59+
result=0
5960

6061
### Running two auto-test groups
6162
for test_group_name in integration functional
@@ -80,19 +81,16 @@ do
8081
test_command="export GLIBCXX_FORCE_NEW=; ${valgrind_command} ${test_command}"
8182

8283
echo "-----> Calling \"${test_command}\" for ${test_group_name} : "
83-
eval "${test_command}"
84-
result=$?
84+
eval "${test_command}" || result=1
8585
echo "-----> Finished ${test_group_name} - Result=${result}"
8686

8787
# Add retry to functional/online tests. Some online tests are flaky due to third party reason.
8888
count=0
8989
while [[ ${result} -ne 0 && ${test_group_name} == "functional" ]];
9090
do
91-
count=count+1
92-
echo "This is ${count} time retry ..."
91+
count=$((count+1)) && echo "This is ${count} time retry ..."
9392
echo "-----> Calling \"${test_command}\" for ${test_group_name} : "
94-
eval "${test_command}"
95-
result=$?
93+
eval "${test_command}" || result=1
9694
echo "-----> Finished ${test_group_name} - Result=${result}"
9795

9896
# Stop after 3 retry
@@ -126,8 +124,7 @@ do
126124
test_command="export GLIBCXX_FORCE_NEW=; $valgrind_command $test_command"
127125

128126
echo "-----> Calling $test_command for $test_name : "
129-
eval "${test_command}"
130-
result=$?
127+
eval "${test_command}" || result=1
131128
echo "-----> Finished $test_name - Result=$result"
132129
}
133130
done

0 commit comments

Comments
 (0)