diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-04-01 14:56:24 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-04-01 14:56:24 +0200 |
commit | 7e5ab53a78beb172cba18005e2370904c653e3df (patch) | |
tree | a822a56dd3d49bbb3ad6c48e553ee674c4d30d20 /src | |
parent | e9a2f156f10b06dbc763f6dba0e33afe9c720ed1 (diff) | |
download | exchange-7e5ab53a78beb172cba18005e2370904c653e3df.tar.gz exchange-7e5ab53a78beb172cba18005e2370904c653e3df.tar.bz2 exchange-7e5ab53a78beb172cba18005e2370904c653e3df.zip |
-fix mustach valgrind detection
Diffstat (limited to 'src')
-rwxr-xr-x | src/templating/dotest.sh | 6 | ||||
-rw-r--r-- | src/templating/mustach-original-Makefile | 8 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/templating/dotest.sh b/src/templating/dotest.sh index 2dcc25f81..32f575c2e 100755 --- a/src/templating/dotest.sh +++ b/src/templating/dotest.sh @@ -6,14 +6,12 @@ exit_fail() { exit 1 } -mustach="../mustach" +mustach="${mustach:-../mustach}" echo "starting test" -if test "$NOVALGRIND" = 1 +if ! valgrind --version 2> /dev/null then - strace -f $mustach "$@" $mustach "$@" > resu.last || exit_fail "ERROR! mustach command failed ($?)!" else - valgrind $mustach "$@" valgrind $mustach "$@" > resu.last 2> vg.last || exit_fail "ERROR! valgrind + mustach command failed ($?)!" sed -i 's:^==[0-9]*== ::' vg.last awk '/^ *total heap usage: .* allocs, .* frees,.*/{if($$4-$$6)exit(1)}' vg.last || exit_fail "ERROR! Alloc/Free issue" diff --git a/src/templating/mustach-original-Makefile b/src/templating/mustach-original-Makefile index a45bd5fa1..aee827583 100644 --- a/src/templating/mustach-original-Makefile +++ b/src/templating/mustach-original-Makefile @@ -237,14 +237,6 @@ uninstall: rm -f $(DESTDIR)$(LIBDIR)/libmustach*.so* rm -rf $(DESTDIR)$(INCLUDEDIR)/mustach -# testing -ifeq ($(valgrind),no) - NOVALGRIND := 1 -else - NOVALGRIND := $(valgrind --version > /dev/null && echo 0 || echo 1) -endif -export NOVALGRIND - .PHONY: test test-basic test-specs test: basic-tests spec-tests |