Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libcurses Add script for assisting with debugging ...



details:   https://anonhg.NetBSD.org/src/rev/2677bf86503a
branches:  trunk
changeset: 994966:2677bf86503a
user:      blymn <blymn%NetBSD.org@localhost>
date:      Fri Nov 30 04:57:02 2018 +0000

description:
Add script for assisting with debugging curses tests.

diffstat:

 tests/lib/libcurses/debug_test |  51 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diffs (55 lines):

diff -r d1c2dedf98d0 -r 2677bf86503a tests/lib/libcurses/debug_test
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libcurses/debug_test    Fri Nov 30 04:57:02 2018 +0000
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Set up the environment to run the test frame.  Option flags:
+#
+# -c : Set up curses tracing, assumes the curses lib has been built with
+#      debug enabled.  Default trace mask traces input, can be overridden
+#      by setting the trace mask in the environment before calling the
+#      script.
+# -s : Specify the slave command.  Defaults to "../slave/slave"
+# -v : Enable verbose output
+#
+BASEDIR="/usr/tests/lib/libcurses"
+CHECK_PATH="${BASEDIR}/check_files/"
+export CHECK_PATH
+INCLUDE_PATH="${BASEDIR}/tests/"
+export INCLUDE_PATH
+#
+SLAVE="${BASEDIR}/slave"
+#
+ARGS=""
+#
+while /usr/bin/true
+do
+    case $1 in
+       -c)
+           CURSES_TRACE_FILE="/tmp/ctrace"
+           if [ "X$CURSES_TRACE_MASK" = "X" ]; then
+               CURSES_TRACE_MASK=0x00000082
+           fi
+           export CURSES_TRACE_FILE
+           export CURSES_TRACE_MASK
+           ;;
+
+       -s)
+           SLAVE=$2
+           shift
+           ;;
+
+       -v)
+           ARGS="-v"
+           ;;
+
+       *)
+           break
+           ;;
+    esac
+
+    shift
+done
+#
+exec ${BASEDIR}/director ${ARGS} -s ${SLAVE} ${INCLUDE_PATH}/$@



Home | Main Index | Thread Index | Old Index