From 6d9a976e53136dd4acc3fb33384035af77dae24c Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Tue, 2 Feb 2016 19:34:01 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/13337 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- run-tests.sh | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 454d558b396..7ea6316f022 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" -- cgit