Added a 'runtest' script that is responsible to check if Tcl is available and run the test. This is invoked from Makefile as well.

This commit is contained in:
antirez 2011-07-15 17:20:57 +02:00
parent 319bb48c01
commit f790bd028c
2 changed files with 10 additions and 1 deletions

9
runtest Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
TCL=tclsh8.5
which $TCL
if [ "$?" != "0" ]
then
echo "You need '$TCL' in order to run the Redis test"
exit 1
fi
$TCL tests/test_helper.tcl $*

View File

@ -207,7 +207,7 @@ dep:
$(CC) -MM *.c -I ../deps/hiredis -I ../deps/linenoise
test: redis-server redis-check-aof
@(cd ..; (which tclsh8.5 >/dev/null && tclsh8.5 tests/test_helper.tcl --tags "${TAGS}") || echo "You need to install Tcl (tclsh8.5) in order to run tests.")
@(cd ..; ./runtest)
bench:
./redis-benchmark