Module Name:    src
Committed By:   blymn
Date:           Fri Nov 30 04:57:02 UTC 2018

Added Files:
        src/tests/lib/libcurses: debug_test

Log Message:
Add script for assisting with debugging curses tests.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/debug_test

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/tests/lib/libcurses/debug_test
diff -u /dev/null src/tests/lib/libcurses/debug_test:1.1
--- /dev/null	Fri Nov 30 04:57:02 2018
+++ src/tests/lib/libcurses/debug_test	Fri Nov 30 04:57:02 2018
@@ -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}/$@

Reply via email to