Home | History | Annotate | Line # | Download | only in libcurses
debug_test revision 1.1
      1 #!/bin/sh
      2 #
      3 # Set up the environment to run the test frame.  Option flags:
      4 #
      5 # -c : Set up curses tracing, assumes the curses lib has been built with
      6 #      debug enabled.  Default trace mask traces input, can be overridden
      7 #      by setting the trace mask in the environment before calling the
      8 #      script.
      9 # -s : Specify the slave command.  Defaults to "../slave/slave"
     10 # -v : Enable verbose output
     11 #
     12 BASEDIR="/usr/tests/lib/libcurses"
     13 CHECK_PATH="${BASEDIR}/check_files/"
     14 export CHECK_PATH
     15 INCLUDE_PATH="${BASEDIR}/tests/"
     16 export INCLUDE_PATH
     17 #
     18 SLAVE="${BASEDIR}/slave"
     19 #
     20 ARGS=""
     21 #
     22 while /usr/bin/true
     23 do
     24     case $1 in
     25 	-c)
     26 	    CURSES_TRACE_FILE="/tmp/ctrace"
     27 	    if [ "X$CURSES_TRACE_MASK" = "X" ]; then
     28 		CURSES_TRACE_MASK=0x00000082
     29 	    fi
     30 	    export CURSES_TRACE_FILE
     31 	    export CURSES_TRACE_MASK
     32 	    ;;
     33 
     34 	-s)
     35 	    SLAVE=$2
     36 	    shift
     37 	    ;;
     38 
     39 	-v)
     40 	    ARGS="-v"
     41 	    ;;
     42 
     43 	*)
     44 	    break
     45 	    ;;
     46     esac
     47 
     48     shift
     49 done
     50 #
     51 exec ${BASEDIR}/director ${ARGS} -s ${SLAVE} ${INCLUDE_PATH}/$@
     52