## -*- sh -*- ## ## rt_test - Testing Reactor handling Timer ## ## $Id: rt.test,v 1.3 2005/03/06 17:12:24 vlg Exp $ # Common definitions if test -z "$srcdir" ; then srcdir=`echo "$0" | sed 's,[^/]*$,,'` test "$srcdir" = "$0" && srdir=. test -z "$srcdir" && srcdir=. test "${VERBOSE+set}" != set && VERBOSE=1 fi . $srcdir/defs # this is the output we should expect to see cat <<\EOF >ok = Running rt_test Test = TEST 1: Testing registration of different Timers. TEST 2: Testing multiple registration the same Timer. TEST 3: Testing Timer rescheduling. TEST 4: Testing Timer cancellation by TimerId. Test passed EOF # Unexpected output cat <<\EOF >errok EOF # You can specify command-line arguments here RUNTEST="${top_builddir}/tests/rt_test" # Run test $RUNTEST 2> err | tee -i out >&2 # Test against expected output if ${CMP} -s out ok; then : else echo "ok:" >&2 cat ok >&2 exit 1 fi # Mungle error output to remove leading directories, 'lt-' or # trailing '.exe' sed -e "s,^[^:]*[lt-]*rt_test[.ex]*:,rt_test;," err >sederr && mv sederr err # Show stderr if doesn't match expected output if VERBOSE=1 if "$CMP" -s err errok; then : else echo "err:" >&2 cat err >&2 echo "errok:" >&2 cat errok >&2 exit 1 fi