summaryrefslogtreecommitdiffstats
path: root/run-tests.sh
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-02-02 19:34:01 +0530
committerRaghavendra Talur <rtalur@redhat.com>2016-02-08 00:31:05 -0800
commit6d9a976e53136dd4acc3fb33384035af77dae24c (patch)
tree6f6638cd82bcd047482711d499830a7f4c7fc982 /run-tests.sh
parentfa9f05f8d6a74472b65a887b684448f8d5c3011d (diff)
tests: combine main and main_and_retry into run_tests
run_tests is now aware of retry option and will handle the re-run within itself. We don't need main_and_retry and main anymore. Change-Id: I0f8cad88e29c81588dc0af9f5de78177d0f4e828 BUG: 1251592 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13337 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh41
1 files changed, 1 insertions, 40 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 454d558..7ea6316 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -184,7 +184,6 @@ function is_bad_test ()
return 1 # bash: non-zero means false/failure
}
-
function run_tests()
{
RES=0
@@ -238,40 +237,6 @@ function run_tests()
return ${RES}
}
-function main()
-{
- if [ "x$tests" = "x" ]; then
- echo "Running all the regression test cases (new way)"
- #prove -rf --timer ${regression_testsdir}/tests;
- run_tests
- else
- run_tests "$tests"
- fi
-}
-
-function main_and_retry()
-{
- RESFILE=`mktemp /tmp/${0##*/}.XXXXXX` || exit 1
- main "$tests" | tee ${RESFILE}
- RET=$?
-
- FAILED=$( awk '/Failed: /{print $1}' ${RESFILE} )
- if [ "x${FAILED}" != "x" ] ; then
- echo ""
- echo " *********************************"
- echo " * REGRESSION FAILED *"
- echo " * Retrying failed tests in case *"
- echo " * we got some spurous failures *"
- echo " *********************************"
- echo ""
- main ${FAILED}
- RET=$?
- fi
-
- rm -f ${RESFILE}
- return ${RET}
-}
-
function parse_args () {
args=`getopt fr "$@"`
set -- $args
@@ -304,8 +269,4 @@ check_dependencies
check_location
# Run the tests
-if [ "x${retry}" = "xyes" ] ; then
- main_and_retry "$tests"
-else
- main "$tests"
-fi
+run_tests "$tests"