summaryrefslogtreecommitdiff
path: root/samples/run_test.sh
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2018-10-20 20:32:57 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2018-10-20 20:32:57 +0000
commit4dccdce4191d6e2bc3ba9f782b0fe1aa46b743e3 (patch)
tree3f3f729ef0455b62fba0c60263ba2c0180f4b4ec /samples/run_test.sh
parent42c10d5d7d5ba2fde22838d594f29d2f73b3ead2 (diff)
Notes
Diffstat (limited to 'samples/run_test.sh')
-rwxr-xr-xsamples/run_test.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/samples/run_test.sh b/samples/run_test.sh
new file mode 100755
index 000000000000..ea9da2935293
--- /dev/null
+++ b/samples/run_test.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+# $Id: run_test.sh,v 1.4 2017/02/01 01:50:09 tom Exp $
+# vile:ts=4 sw=4
+THIS=`basename $0`
+
+if [ -z "$DIALOG" ]
+then
+ have=
+ want=dialog
+ for p in . .. ../bin
+ do
+ prog=$p/$want
+ [ -f $prog ] || continue
+ if [ -x $prog ]
+ then
+ have=$prog
+ break
+ fi
+ done
+
+ if [ -z "$have" ]
+ then
+ echo "? did not find $want" >&2
+ exit
+ fi
+
+ DIALOG=$have
+ export DIALOG
+fi
+
+want=`basename $DIALOG`
+
+DIALOGOPTS="$DIALOGOPTS --trace $want.log"
+export DIALOGOPTS
+
+mylog=run_test.log
+cat >$mylog <<EOF
+** `date`
+EOF
+
+for name in "$@"
+do
+ [ -f "$name" ] || continue
+ [ -x "$name" ] || continue
+ # skip this script and known utility-scripts
+ case `basename $name` in
+ $THIS|dft-*|killall|listing|rotated-data|shortlist|with-*)
+ echo "** skipping $name" >>$mylog
+ continue
+ ;;
+ esac
+ rm -f trace $want.log $name.log
+ echo "** running $name" >>$mylog
+ $name
+ [ -f $want.log ] && cp $want.log $name.log
+done