summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-03-18 23:31:02 +0100
committerChristian Grothoff <christian@grothoff.org>2024-03-18 23:31:02 +0100
commitf2d4ef798e68f1bf6ae0e158c6ccc13feeadbc33 (patch)
tree55150a03704c0ccba1e9e8d955ec012e5704e7ea
parent200bbfbefda8c67ec5196d7384b32e9fa33c4bb7 (diff)
downloadexchange-f2d4ef798e68f1bf6ae0e158c6ccc13feeadbc33.tar.gz
exchange-f2d4ef798e68f1bf6ae0e158c6ccc13feeadbc33.tar.bz2
exchange-f2d4ef798e68f1bf6ae0e158c6ccc13feeadbc33.zip
make mustach test suite more robust
-rwxr-xr-xsrc/templating/run-original-tests.sh21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/templating/run-original-tests.sh b/src/templating/run-original-tests.sh
index 09420c4e9..289ae8711 100755
--- a/src/templating/run-original-tests.sh
+++ b/src/templating/run-original-tests.sh
@@ -1,16 +1,25 @@
#!/bin/bash
+# This file is in the public domain.
set -eu
-# The build fails if libjson-c-dev is not installed.
-# That's OK, we don't otherwise need it and don't
-# even bother testing for it in configure.ac.
-# However, in that case, skip the test suite.
export CFLAGS="-g"
+function build()
+{
+ make clean
+ make
+}
+
+# Install rebuild-on-exit handler (except for kill -9)
+trap build EXIT
+
make clean
+
+# The build fails if libjson-c-dev is not installed.
+# That's OK, we don't otherwise need it and don't
+# even bother testing for it in configure.ac.
+# However, in that case, skip the test suite.
make -f mustach-original-Makefile mustach || exit 77
make -f mustach-original-Makefile clean || true
make -f mustach-original-Makefile basic-tests
make -f mustach-original-Makefile clean || true
-make clean
-make