diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-04-28 07:34:38 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-04-28 07:34:38 +0000 |
| commit | 42b9e8a5008f5573b20749080fbcd9397a745a5d (patch) | |
| tree | 6a5d4ae5efe9bb6b46e42ae505bfb43a20713f7d /tools/run-test.sh | |
| parent | e7ebebcecbbc3ff03dcee49ee3eb9691a53c8763 (diff) | |
| download | dnsfunnel-42b9e8a5008f5573b20749080fbcd9397a745a5d.tar.gz | |
Prepare for 0.0.3.0; move to new system
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 |
