diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-04-27 01:36:39 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-04-27 01:36:39 +0000 |
| commit | 83115bc06793c68f460ea05fc2d8182751e86c35 (patch) | |
| tree | 9910ad3babb43525b706f2ee291760efaef8a360 /tools/run-test.sh | |
| parent | 9d79ca45023c6e24534386ef7a52a0bad0396275 (diff) | |
| download | execline-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/run-test.sh')
| -rwxr-xr-x | tools/run-test.sh | 22 |
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 |
