summaryrefslogtreecommitdiffstats
path: root/run-tests.sh.in
blob: a75b68171ffff13045ba2953b0d9c9a0e580941f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 "$@"