File tree Expand file tree Collapse file tree 3 files changed +26
-21
lines changed
Expand file tree Collapse file tree 3 files changed +26
-21
lines changed Original file line number Diff line number Diff line change 3333 sleep 0.15
3434 set -e
3535done
36-
3736result=0
3837echo " >>> Functional Test ... >>>"
3938source $FV_HOME /olp-cpp-sdk-functional-test.variables
4039$REPO_HOME /build/tests/functional/olp-cpp-sdk-functional-tests \
4140 --gtest_output=" xml:$REPO_HOME /reports/olp-functional-test-report.xml" \
42- --gtest_filter=" -ArcGisAuthenticationTest.SignInArcGis" :" FacebookAuthenticationTest.SignInFacebook" || result=1
43-
44- # Add retry to functional/online tests. Some online tests are flaky due to third party reason.
41+ --gtest_filter=" -ArcGisAuthenticationTest.SignInArcGis" :" FacebookAuthenticationTest.SignInFacebook"
42+ result=$?
4543echo " Last return code in $result "
46- count=0
47- while [[ ${result} -ne 0 ]];
44+
45+ # Add retry to functional/online tests. Some online tests are flaky due to third party reason
46+ # Test failure should return code 1
47+ retry_count=0
48+ while [[ ${result} = 1 ]];
4849do
49- count =$(( count + 1 )) && echo " This is ${count } time retry ..."
50+ retry_count =$(( retry_count + 1 )) && echo " This is ${retry_count } time retry ..."
5051 $REPO_HOME /build/tests/functional/olp-cpp-sdk-functional-tests \
5152 --gtest_output=" xml:$REPO_HOME /reports/olp-functional-test-report.xml" \
52- --gtest_filter=" -ArcGisAuthenticationTest.SignInArcGis" :" FacebookAuthenticationTest.SignInFacebook" || result=1
53+ --gtest_filter=" -ArcGisAuthenticationTest.SignInArcGis" :" FacebookAuthenticationTest.SignInFacebook"
54+ result=$?
5355
5456 # Stop after 3 retry
55- if [[ ${count } = 3 ]]; then
57+ if [[ ${retry_count } = 3 ]]; then
5658 break
5759 fi
5860done
Original file line number Diff line number Diff line change @@ -41,12 +41,12 @@ ${FV_HOME}/gitlab-olp-cpp-sdk-core-test.sh 2>> errors.txt || TEST_FAILURE=1
4141${FV_HOME} /gitlab-olp-cpp-sdk-dataservice-read-test.sh 2>> errors.txt || TEST_FAILURE=1
4242${FV_HOME} /gitlab-olp-cpp-sdk-dataservice-write-test.sh 2>> errors.txt || TEST_FAILURE=1
4343
44- # Run integration tests
45- ${FV_HOME} /gitlab-olp-cpp-sdk-integration-test.sh 2>> errors.txt || TEST_FAILURE=1
46-
4744# Run functional tests
4845${FV_HOME} /gitlab-olp-cpp-sdk-functional-test.sh 2>> errors.txt || TEST_FAILURE=1
4946
47+ # Run integration tests
48+ ${FV_HOME} /gitlab-olp-cpp-sdk-integration-test.sh 2>> errors.txt || TEST_FAILURE=1
49+
5050# Lines below are added for pretty data sum-up and finalize results of this script is case of FAILURE
5151if [[ ${TEST_FAILURE} == 1 ]]; then
5252 export REPORT_COUNT=$( ls ${REPO_HOME} /reports | wc -l)
Original file line number Diff line number Diff line change 5656 set -e
5757done
5858echo " >>> Local Server started for further functional test ... >>>"
59- result=0
6059
6160# ## Running two auto-test groups
6261for test_group_name in integration functional
8180 test_command=" export GLIBCXX_FORCE_NEW=; ${valgrind_command} ${test_command} "
8281
8382 echo " -----> Calling \" ${test_command} \" for ${test_group_name} : "
84- eval " ${test_command} " || result=1
83+ eval " ${test_command} "
84+ result=$?
8585 echo " -----> Finished ${test_group_name} - Result=${result} "
8686
87- # Add retry to functional/online tests. Some online tests are flaky due to third party reason.
88- count=0
89- while [[ ${result} -ne 0 && ${test_group_name} == " functional" ]];
87+ # Add retry to functional/online tests. Some online tests are flaky due to third party reason
88+ # Test failure should return code 1
89+ retry_count=0
90+ while [[ ${result} = 1 && ${test_group_name} == " functional" ]];
9091 do
91- count =$(( count + 1 )) && echo " This is ${count } time retry ..."
92+ retry_count =$(( retry_count + 1 )) && echo " This is ${retry_count } time retry ..."
9293 echo " -----> Calling \" ${test_command} \" for ${test_group_name} : "
93- eval " ${test_command} " || result=1
94+ eval " ${test_command} "
95+ result=$?
9496 echo " -----> Finished ${test_group_name} - Result=${result} "
9597
9698 # Stop after 3 retry
97- if [[ ${count } = 3 ]]; then
99+ if [[ ${retry_count } = 3 ]]; then
98100 break
99101 fi
100102 done
124126 test_command=" export GLIBCXX_FORCE_NEW=; $valgrind_command $test_command "
125127
126128 echo " -----> Calling $test_command for $test_name : "
127- eval " ${test_command} " || result=1
129+ eval " ${test_command} "
130+ result=$?
128131 echo " -----> Finished $test_name - Result=$result "
129132}
130133done
You can’t perform that action at this time.
0 commit comments