Skip to content

Commit 24fb3e2

Browse files
committed
Add condition to run retry in functional NV scripts
Currently functional tests run twice every time on NV because condition absent. Added more comments, added set +x to avoid dirty output at the end on logs. Relates-To: OLPEDGE-1144 Signed-off-by: Yaroslav Stefinko <[email protected]>
1 parent 7fef1a0 commit 24fb3e2

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

scripts/linux/fv/gitlab_test_fv.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ set -e
7777
${FV_HOME}/gitlab-olp-cpp-sdk-integration-test.sh 2>> errors.txt || TEST_FAILURE=1
7878

7979
# Lines below are added for pretty data sum-up and finalize results of this script is case of FAILURE
80+
set +x # to avoid dirty output at the end on logs
8081
if [[ ${TEST_FAILURE} == 1 ]]; then
8182
export REPORT_COUNT=$(ls ${REPO_HOME}/reports | wc -l)
8283
if [[ ${REPORT_COUNT} -ne ${EXPECTED_REPORT_COUNT} || ${REPORT_COUNT} == 0 ]]; then

scripts/linux/nv/gitlab_test_valgrind.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,26 @@ do
9898
RETRY_COUNT=$((RETRY_COUNT+1))
9999
echo "This is ${RETRY_COUNT} time retry ..."
100100

101-
# Run functional tests
102-
echo "-----> Calling \"${test_command}\" for ${test_group_name} : "
103-
eval "${test_command}"
104-
result=$?
105-
echo "-----> Finished ${test_group_name} - Result=${result}"
106101
if [[ ${result} -eq 1 ]]; then
102+
# Run functional tests if it failed above
103+
echo "-----> Calling \"${test_command}\" for ${test_group_name} : "
104+
eval "${test_command}"
105+
result=$?
106+
echo "-----> Finished ${test_group_name} - Result=${result}"
107+
fi
108+
if [[ ${result} -eq 1 ]]; then
109+
# Return to next loop and do retry
107110
TEST_FAILURE=1
108111
continue
109112
else
110-
# Return to success
113+
# Return to success and exit from loop
111114
TEST_FAILURE=0
112115
break
113116
fi
114117
fi
115118
break
116119
done
117-
# End of retry part. This part can be removed anytime.
120+
# End of retry part. This part can be removed anytime when online tests are stable.
118121
}
119122
done
120123

@@ -152,6 +155,7 @@ cd ..
152155
ls -la reports/
153156
ls -la reports/valgrind
154157

158+
set +x # to avoid dirty output at the end on logs
155159
for failreport in $(ls ${REPO_HOME}/reports/*.xml)
156160
do
157161
echo "Parsing ${failreport} ..."

0 commit comments

Comments
 (0)