diff options
Diffstat (limited to 'run-tests.sh.in')
| -rwxr-xr-x | run-tests.sh.in | 31 | 
1 files changed, 31 insertions, 0 deletions
diff --git a/run-tests.sh.in b/run-tests.sh.in new file mode 100755 index 00000000000..a75b68171ff --- /dev/null +++ b/run-tests.sh.in @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com> +# + +function _init() +{ +    prefix="@prefix@"; +    exec_prefix="@exec_prefix@"; +    regression_testsdir="@datarootdir@/glusterfs"; +    if [ ! -f ${regression_testsdir}/tests/include.rc ]; then +        echo "Seems like GlusterFS quality tests are corrupted..aborting!!" +        exit 1 +    fi +} + +function main() +{ +    if [ $# -lt 1 ]; then +        echo "Running all the regression test cases" +        prove -rf --timer ${regression_testsdir}/tests; +    else +        ## TODO +        echo "Running single regression test.." +        echo "WARNING: yet to be implemented.. exiting safely" +        exit 0 +        #export DEBUG=1; +        #echo "Automatically setting up DEBUG=1 for this test $1"; +    fi +} + +_init "$@" && main "$@"  | 
