diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-04-27 22:47:18 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-04-27 22:47:18 +0000 |
| commit | 3672059f7c649a0b86bc79c536f67022cee1b469 (patch) | |
| tree | bc0af7d5fa07ca64ed955a8c0a3d16603e66b88d /tools/run-test.sh | |
| parent | 46758817953e51d0b71a81b0c3f960366803f0b6 (diff) | |
| download | s6-portable-utils-3672059f7c649a0b86bc79c536f67022cee1b469.tar.gz | |
Upgrade to new system, prepare for 2.3.1.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 |
