@@ -46,7 +46,7 @@ ulimit -c unlimited
46
46
# Stop after 2nd retry.
47
47
source ${FV_HOME} /olp-cpp-sdk-functional-test.variables
48
48
set +e
49
- for RETRY_COUNT in 1 2
49
+ for RETRY_COUNT in 1 2 3
50
50
do
51
51
echo " This is (${RETRY_COUNT} ) time run ..."
52
52
55
55
56
56
if [[ $? -eq 1 ]]; then
57
57
# Functional test failed with exit code 1 means some tests failed
58
+ # But we handle flacky test and repeat up to 3 times
58
59
TEST_FAILURE=1
59
60
sleep 10
61
+ elif [[ $? -gt 1 ]]; then
62
+ # Functional test crashed
63
+ result=$?
64
+ set -e
65
+ exit $result
60
66
else
61
67
# Return to success
62
68
TEST_FAILURE=0
63
69
break
64
70
fi
65
71
done
66
- set -e
67
72
# End of retry part. This part can be removed any time later or after all online tests are stable.
68
73
69
74
# Run functional tests with Mock Server
@@ -88,19 +93,18 @@ ${FV_HOME}/gitlab-olp-cpp-sdk-dataservice-write-test.sh || TEST_FAILURE=1
88
93
89
94
90
95
# Lines below are added for pretty data sum-up and finalize results of this script is case of FAILURE
91
- set +x # to avoid dirty output at the end on logs
92
- if [[ ${TEST_FAILURE} == 1 ]] ; then
93
- export REPORT_COUNT=$( ls ${REPO_HOME} /reports | wc -l)
94
- if [[ ${REPORT_COUNT} -ne ${EXPECTED_REPORT_COUNT} || ${REPORT_COUNT} == 0 ]]; then
95
- echo " ##################################################################################################"
96
- echo " CRASH ERROR. One of test groups contains crash. Report was not generated for that group ! "
97
- echo " ##################################################################################################"
98
- fi
96
+ # set +x to avoid dirty output at the end on logs
97
+ set +x
98
+ export REPORT_COUNT=$( ls ${REPO_HOME} /reports | wc -l)
99
+ if [[ ${REPORT_COUNT} -ne ${EXPECTED_REPORT_COUNT} || ${REPORT_COUNT} == 0 ]]; then
100
+ echo " ##################################################################################################"
101
+ echo " CRASH ERROR. One of test groups contains crash. Report was not generated for that group ! "
102
+ echo " ##################################################################################################"
103
+ TEST_FAILURE=1
99
104
else
100
105
echo " OK. Full list of test reports was generated. "
101
106
fi
102
107
103
-
104
108
for failreport in $( ls ${REPO_HOME} /reports/* .xml)
105
109
do
106
110
echo " Parsing ${failreport} ..."
0 commit comments