summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/onnode/run_tests.sh
blob: e5fa7e28c291bd62bd83cda093a9e7bc7b867edc (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/sh

# Run some onnode unit tests.

cd $(dirname "$0")
export ONNODE_TESTS_DIR=$(pwd)

test_dir=$(dirname "$ONNODE_TESTS_DIR")

opts="-d"

for i ; do
    case "$i" in
	-*)
	    opts="$opts $i"
	    shift
	    ;;
	*)
	    break
    esac
done

tests=""
if [ -z "$*" ] ; then
    tests=$(ls ./[0-9][0-9][0-9][0-9].sh ./[0-9][0-9][0-9][0-9]/run_test.sh 2>/dev/null)
fi

"$test_dir/scripts/run_tests" $opts "$@" $tests || exit 1

echo "All OK"
exit 0