diff options
Diffstat (limited to 'tools/test')
-rwxr-xr-x | tools/test | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -7,13 +7,30 @@ DEFINE=TEST_$UPPER SCRIPTDIR=`dirname $0` -COMPILE="g++ -DHAVE_CONFIG_H -I$SCRIPTDIR -g -Wall -Werror -D$DEFINE -o $OUTPUT $*" +INFILE=$1 +shift +OBJFILES="" +for f in $TEST_DEPS +do + of=`echo -n $f | cut -d'.' -f1`.o; + OBJFILES="$OBJFILES $of" +done + +COMMON_FLAGS="-DHAVE_CONFIG_H -I$SCRIPTDIR -g -D$DEFINE $TEST_LIBS $TEST_CFLAGS" +CLEAN="rm -f $OBJFILES" +PRECOMPILE="g++ -c $TEST_DEPS $COMMON_FLAGS" +COMPILE="g++ -fprofile-arcs -ftest-coverage -Wall -Werror $COMMON_FLAGS -o $OUTPUT $INFILE $OBJFILES" echo -e "\033[0;2mTesting $TEST:" echo Testing $TEST: > $OUTPUT.log echo -n "* Compiling $TEST test" echo Compiling $TEST test: > $OUTPUT.log + +echo ${CLEAN} >> $OUTPUT.log +${CLEAN} >> ${OUTPUT}.log 2>&1 +echo ${PRECOMPILE} >> $OUTPUT.log +${PRECOMPILE} >> ${OUTPUT}.log 2>&1 echo ${COMPILE} >> $OUTPUT.log if ${COMPILE} >> ${OUTPUT}.log 2>&1; then |