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