aboutsummaryrefslogtreecommitdiff
path: root/src/templating/dotest.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-03-18 13:14:51 +0100
committerChristian Grothoff <christian@grothoff.org>2024-03-18 13:30:24 +0100
commit9468d2a769c726c9612f383f785501933f330232 (patch)
tree7a4f0bedd2ed9ee18d56d2391991cf84f52bcbb7 /src/templating/dotest.sh
parent8a6d67a3178bad3ae0c0d01bed8c36b3a1e9b7b8 (diff)
downloadexchange-9468d2a769c726c9612f383f785501933f330232.tar.gz
exchange-9468d2a769c726c9612f383f785501933f330232.tar.bz2
exchange-9468d2a769c726c9612f383f785501933f330232.zip
-update mustach
Diffstat (limited to 'src/templating/dotest.sh')
-rwxr-xr-xsrc/templating/dotest.sh20
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
+