Sun May 19 22:34:23 2019 UTC ()
Add option to specify an alternate library location to allow testing
a development library version without installing it.


(blymn)
diff -r1.2 -r1.3 src/tests/lib/libcurses/debug_test

cvs diff -r1.2 -r1.3 src/tests/lib/libcurses/debug_test (expand / switch to unified diff)

--- src/tests/lib/libcurses/debug_test 2019/01/21 21:21:13 1.2
+++ src/tests/lib/libcurses/debug_test 2019/05/19 22:34:23 1.3
@@ -10,49 +10,55 @@ export INCLUDE_PATH @@ -10,49 +10,55 @@ export INCLUDE_PATH
10CURSES_TRACE_FILE="/tmp/ctrace" 10CURSES_TRACE_FILE="/tmp/ctrace"
11SLAVE="${BASEDIR}/slave" 11SLAVE="${BASEDIR}/slave"
12 12
13usage() { 13usage() {
14 echo "Set up the environment to run the test frame. Option flags:" 14 echo "Set up the environment to run the test frame. Option flags:"
15 echo 15 echo
16 echo " -c : Set up curses tracing, assumes the curses lib has been built with" 16 echo " -c : Set up curses tracing, assumes the curses lib has been built with"
17 echo " debug enabled. Default trace mask traces input, can be overridden" 17 echo " debug enabled. Default trace mask traces input, can be overridden"
18 echo " by setting the trace mask in the environment before calling the" 18 echo " by setting the trace mask in the environment before calling the"
19 echo " The trace file output goes to /tmp/ctrace" 19 echo " The trace file output goes to /tmp/ctrace"
20 echo " script." 20 echo " script."
21 echo " -f : Specify the file name for curses tracing the default is" 21 echo " -f : Specify the file name for curses tracing the default is"
22 echo " ${CURSES_TRACE_FILE}" 22 echo " ${CURSES_TRACE_FILE}"
 23 echo " -L : Add the argument as a prefix to LD_LIBRARY_PATH to"
 24 echo " use an alternate libcurses version"
23 echo " -s : Specify the slave command. Defaults to \"../slave/slave\"" 25 echo " -s : Specify the slave command. Defaults to \"../slave/slave\""
24 echo " -v : Enable verbose output" 26 echo " -v : Enable verbose output"
25 echo 27 echo
26} 28}
27 29
28# 30#
29ARGS="" 31ARGS=""
30# 32#
31while getopts cf:s:v opt 33while getopts cf:L:s:v opt
32do 34do
33 case "${opt}" in 35 case "${opt}" in
34 c) 36 c)
35 if [ "X$CURSES_TRACE_MASK" = "X" ]; then 37 if [ "X$CURSES_TRACE_MASK" = "X" ]; then
36 CURSES_TRACE_MASK=0x00000082 38 CURSES_TRACE_MASK=0x00000082
37 fi 39 fi
38 export CURSES_TRACE_FILE 40 export CURSES_TRACE_FILE
39 export CURSES_TRACE_MASK 41 export CURSES_TRACE_MASK
40 ;; 42 ;;
41 43
42 f) 44 f)
43 CURSES_TRACE_FILE=${OPTARG} 45 CURSES_TRACE_FILE=${OPTARG}
44 ;; 46 ;;
45 47
 48 L)
 49 LD_LIBRARY_PATH=${OPTARG}:${LD_LIBRARY_PATH}
 50 ;;
 51
46 s) 52 s)
47 SLAVE=${OPTARG} 53 SLAVE=${OPTARG}
48 ;; 54 ;;
49 55
50 v) 56 v)
51 ARGS="-v" 57 ARGS="-v"
52 ;; 58 ;;
53 59
54 \?) 60 \?)
55 usage 61 usage
56 exit 1 62 exit 1
57 ;; 63 ;;
58 esac 64 esac