From abd4cd782759c717ea8eb1f5a9ea9a558ac191d7 Mon Sep 17 00:00:00 2001 From: Salvatore Sanfilippo Date: Wed, 13 Jul 2011 03:00:28 -0700 Subject: [PATCH] Added a 'runtest' script that is responsible to check if Tcl is available and run the test. This is invoked from Makefile as well. --- runtest | 9 +++++++++ src/Makefile | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 runtest diff --git a/runtest b/runtest new file mode 100755 index 000000000..2ea4d39be --- /dev/null +++ b/runtest @@ -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 $* diff --git a/src/Makefile b/src/Makefile index 135795818..31a87505d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -195,8 +195,8 @@ clean: dep: $(CC) -MM *.c -I ../deps/hiredis -I ../deps/linenoise -test: redis-server - (cd ..; tclsh8.5 tests/test_helper.tcl --tags "${TAGS}") +test: redis-server redis-check-aof + @(cd ..; ./runtest) bench: ./redis-benchmark