aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-04-27 01:36:39 +0000
committerLaurent Bercot <ska@appnovation.com>2025-04-27 01:36:39 +0000
commit83115bc06793c68f460ea05fc2d8182751e86c35 (patch)
tree9910ad3babb43525b706f2ee291760efaef8a360 /tools
parent9d79ca45023c6e24534386ef7a52a0bad0396275 (diff)
downloadexecline-83115bc06793c68f460ea05fc2d8182751e86c35.tar.gz
Document pkg-config options in INSTALL; a few small changes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run-test.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/run-test.sh b/tools/run-test.sh
new file mode 100755
index 0000000..d651b09
--- /dev/null
+++ b/tools/run-test.sh
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+prog="$1"
+
+if test -x "./src/tests/${prog}.wrapper" ; then
+ cmd="./src/tests/${prog}.wrapper $prog"
+else
+ cmd="./$prog"
+fi
+
+if test -r "./src/tests/${prog}.expected" ; then
+ cp -f "./src/tests/${prog}.expected" "./${prog}.expected"
+elif test -x "./src/tests/${prog}.baseline" ; then
+ "./src/tests/${prog}.baseline" > "./${prog}.expected"
+else
+ echo "run-test.sh: fatal: missing baseline for $prog" 1>&2 ; exit 100
+fi
+
+$cmd | diff "./${prog}.expected" -
+
+rm -f "./${prog}.expected"
+echo "run-test.sh: info: $prog: pass" 1>&2