blob: aed0cd95942b15ef4757776b8109037f72466ab3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
#!/bin/sh
#
#
BASEDIR="/usr/tests/lib/libcurses"
CHECK_PATH="${BASEDIR}/check_files/"
export CHECK_PATH
INCLUDE_PATH="${BASEDIR}/tests/"
export INCLUDE_PATH
#
CURSES_TRACE_FILE="/tmp/ctrace"
SLAVE="${BASEDIR}/slave"
usage() {
echo "Set up the environment to run the test frame. Option flags:"
echo
echo " -c : Set up curses tracing, assumes the curses lib has been built with"
echo " debug enabled. Default trace mask traces input, can be overridden"
echo " by setting the trace mask in the environment before calling the"
echo " The trace file output goes to /tmp/ctrace"
echo " script."
echo " -f : Specify the file name for curses tracing the default is"
echo " ${CURSES_TRACE_FILE}"
echo " -L : Add the argument as a prefix to LD_LIBRARY_PATH to"
echo " use an alternate libcurses version"
echo " -s : Specify the slave command. Defaults to \"../slave/slave\""
echo " -v : Enable verbose output"
echo
}
#
ARGS=""
#
while getopts cf:L:s:v opt
do
case "${opt}" in
c)
if [ "X$CURSES_TRACE_MASK" = "X" ]; then
CURSES_TRACE_MASK=0x00000082
fi
export CURSES_TRACE_FILE
export CURSES_TRACE_MASK
;;
f)
CURSES_TRACE_FILE=${OPTARG}
;;
L)
LD_LIBRARY_PATH=${OPTARG}:${LD_LIBRARY_PATH}
;;
s)
SLAVE=${OPTARG}
;;
v)
ARGS="-v"
;;
\?)
usage
exit 1
;;
esac
done
#
shift $((OPTIND - 1))
#
if [ -z "${1}" ]
then
echo
echo "A test name needs to be specified."
echo
usage
echo
exit 1
fi
#
exec ${BASEDIR}/director ${ARGS} -s ${SLAVE} "${INCLUDE_PATH}/$1"
|