summaryrefslogtreecommitdiff
path: root/tests/testctl
diff options
context:
space:
mode:
authorDodji <dodji@gnome.org>2004-03-15 22:56:28 +0000
committerDodji Seketeli <dodji@src.gnome.org>2004-03-15 22:56:28 +0000
commit722a570bd3d38db5376a81349001d9bbb15e3506 (patch)
treeedb7ee853f39934daa234b044cddf243fee44a45 /tests/testctl
parent934fa2ab35547bc858df7f769ef9a5362272580c (diff)
downloadlibcroco-722a570bd3d38db5376a81349001d9bbb15e3506.tar.gz
Merged with libcroco--mainline--0.1--patch-21
2004-03-15 Dodji <dodji@gnome.org> Merged with libcroco--mainline--0.1--patch-21
Diffstat (limited to 'tests/testctl')
-rwxr-xr-xtests/testctl30
1 files changed, 25 insertions, 5 deletions
diff --git a/tests/testctl b/tests/testctl
index 18ec9ed..88dba5e 100755
--- a/tests/testctl
+++ b/tests/testctl
@@ -12,6 +12,7 @@
#the directory that contains the tests
HERE=`dirname $0`
+
#the list of tests to be run
TEST_PROG_LIST=
@@ -32,6 +33,10 @@ if test x$RUN_VALGRIND = x ; then
else
RUN_VALGRIND=yes
fi
+if test "x$CHECKER" = "x" ; then
+ CHECKER="valgrind --tool=memcheck"
+fi
+
VALGRIND_LOGS_DIR=valgrind-logs
VALGRIND=
TEST_PROG=
@@ -137,12 +142,27 @@ run_test_prog ()
if test x$RUN_VALGRIND = xno ; then
VALGRIND=
else
- VALGRIND=`which valgrind`
- if test x$VALGRIND = x ; then
- echo "Could not find valgrind in your path"
+ if ! test -x $HERE/valgrind-version.sh ; then
+ echo "Argh! Could not find file $HERE/valgrind-version.sh"
+ exit -1 ;
+ fi
+ version=`$HERE/valgrind-version.sh`
+ if ! test "x$version" = "xokay" ; then
+ echo "You must install a valgrind versin greater than 2.1.1"
+ echo "version=$version"
+ exit -1
+ fi
+ if test "x$CHECKER" = "x" ; then
+ VALGRIND=`which valgrind`
+ if test "x$VALGRIND" = x ; then
+ echo "Could not find valgrind in your path"
+ else
+ VALGRIND="$VALGRIND $VALGRIND_OPTIONS"
+ echo "Gonna run the tests with valgrind, using the following options: $VALGRIND_OPTIONS"
+ fi
else
- VALGRIND="$VALGRIND $VALGRIND_OPTIONS"
- echo "Gonna run the tests with valgrind, using the following options: $VALGRIND_OPTIONS"
+ VALGRIND="$CHECKER $VALGRIND_OPTIONS"
+ echo "Gonna run the tests with valgrind, using the cmd line: $VALGRIND"
fi
fi
export VALGRIND