summaryrefslogtreecommitdiffstats
path: root/run-tests.sh
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2017-12-06 20:16:09 +0530
committerNigel Babu <nigelb@redhat.com>2017-12-06 20:17:00 +0530
commit3fa4510fdb5d6858b788f64c069299b133edef0e (patch)
treebfd56b160e6682475909640c75268a4556edf9a0 /run-tests.sh
parente5e0d223ada35d6bdb1790054fcbf34273b7949c (diff)
Revert "run-tests.sh: provide retry count option"
This change was actually causing failures to be reported as passing. This reverts commit 4e798113229eab68e9e02364bb094a4ab8274c65. Change-Id: I02b06e7f2af03419d922de8ad7e6948ae8cb8d06
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh39
1 files changed, 12 insertions, 27 deletions
diff --git a/run-tests.sh b/run-tests.sh
index afeb350e899..dbf4a5e3b3c 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -6,7 +6,6 @@ export TZ=UTC
force="no"
head="yes"
retry="yes"
-retry_count=5
tests=""
exit_on_failure="yes"
skip_bad_tests="yes"
@@ -237,7 +236,6 @@ function run_tests()
# key = path of .t file; value = time taken to run the .t file
declare -A ELAPSEDTIMEMAP
- declare -A TESTS_NEEDED_RETRY
for t in $(find ${regression_testsdir}/tests -name '*.t' \
| LC_COLLATE=C sort) ; do
@@ -273,24 +271,18 @@ function run_tests()
prove -vfe '/bin/bash' $t
TMP_RES=$?
ELAPSEDTIMEMAP[$t]=`expr $(date +%s) - $starttime`
- cnt=0
- while [ $cnt -lt $retry_count ];
- do
- cnt=$((cnt+1))
- if [ ${TMP_RES} -ne 0 ] && [ "x${retry}" = "xyes" ] ; then
- echo "$t: bad status $TMP_RES (count: $cnt)"
- echo ""
- echo " *********************************"
- echo " * REGRESSION FAILED *"
- echo " * Retrying failed tests in case *"
- echo " * we got some spurious failures *"
- echo " *********************************"
- echo ""
- prove -vfe '/bin/bash' $t
- TESTS_NEEDED_RETRY[$t]=$cnt
- TMP_RES=$?
- fi
- done
+ if [ ${TMP_RES} -ne 0 ] && [ "x${retry}" = "xyes" ] ; then
+ echo "$t: bad status $TMP_RES"
+ echo ""
+ echo " *********************************"
+ echo " * REGRESSION FAILED *"
+ echo " * Retrying failed tests in case *"
+ echo " * we got some spurious failures *"
+ echo " *********************************"
+ echo ""
+ prove -vfe '/bin/bash' $t
+ TMP_RES=$?
+ fi
if [ ${TMP_RES} -ne 0 ] ; then
RES=${TMP_RES}
FAILED="${FAILED}${t} "
@@ -337,13 +329,6 @@ function run_tests()
fi
echo
- echo "tests which needed retry, ordered on the number of times they needed to be retried"
- for key in "${!TESTS_NEEDED_RETRY[@]}"
- do
- echo "$key - ${TESTS_NEEDED_RETRY["$key"]} times"
- done | sort -rn -k3
-
- echo
echo "Result is $RES"
echo
return ${RES}