diff options
Diffstat (limited to 'src/templating/dotest.sh')
-rwxr-xr-x | src/templating/dotest.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/templating/dotest.sh b/src/templating/dotest.sh new file mode 100755 index 000000000..99ff8b201 --- /dev/null +++ b/src/templating/dotest.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +mustach=${mustach:-../mustach} +echo starting test +if test "$NOVALGRIND" = 1 +then + $mustach "$@" > resu.last +else + valgrind $mustach "$@" > resu.last 2> vg.last + sed -i 's:^==[0-9]*== ::' vg.last + awk '/^ *total heap usage: .* allocs, .* frees,.*/{if($$4-$$6)exit(1)}' vg.last || echo "ERROR! Alloc/Free issue" +fi +if diff -w resu.ref resu.last +then + echo "result ok" +else + echo "ERROR! Result differs" +fi +echo + |