3 # Try to run the given command in a pipe to the test meter, but if that
4 # fails, just dump it to stdout instead. Also make sure nobody *inside*
5 # us runs the testhelper script again.
8 if [ -z "$WVSTREAMS_SRC" ]; then
9 WVSTREAMS_SRC
="$(dirname $0)"
15 if [ "$CODE" = "0" ]; then
16 echo "! wvtesthelper Test program exited ok ok"
18 echo "! wvtesthelper Test program aborted (code $CODE) FAILED"
25 if [ -z "$DISPLAY" ]; then
28 WVTESTMETER
=$WVSTREAMS_SRC/wvtestmeter
29 if [ ! -e $WVSTREAMS_SRC/wvtestmeter
]; then
30 WVTESTMETER
=wvtestmeter
33 ( "$@"; reportcode $?
) \
34 |
tee /dev
/fd
/3 |
($WVTESTMETER ||
cat)