diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-04-28 06:12:35 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-04-28 06:12:35 +0000 |
| commit | c107434fe4c6a6494ba1bed0f65c8176cedaba79 (patch) | |
| tree | 880436a1fa732367f6e2a0cbc323c10b66778188 /tools/run-test.sh | |
| parent | d99666ce62cff37b6204a8635d489d5dbf298a2f (diff) | |
| download | smtpd-starttls-proxy-c107434fe4c6a6494ba1bed0f65c8176cedaba79.tar.gz | |
Move to new system, prepare for 0.0.2.0
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 |
