2011-01-29 14:42:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This script invokes the keytest.py script with the simple set-up needed
|
|
|
|
# to re-run deterministic regression tests that one would like to have.
|
|
|
|
#
|
|
|
|
# Usage: run-test.sh <test-in.txt>
|
|
|
|
#
|
|
|
|
# See the hello-world-in.txt for an example syntax and description
|
|
|
|
|
|
|
|
KEYTEST=${KEYTEST:-./keytest.py}
|
|
|
|
|
|
|
|
export KEYTEST_OUTFILE=out.txt
|
|
|
|
export KEYTEST_INFILE=in-sample.txt
|
|
|
|
if [ "$1" != "" ]; then
|
|
|
|
KEYTEST_INFILE="$1";
|
|
|
|
fi
|
|
|
|
|
2013-01-27 11:21:18 +00:00
|
|
|
BASE=$( echo $KEYTEST_INFILE | sed 's/-in\.\(txt\|sh\)$//')
|
|
|
|
if [ -e $BASE.lyx.emergency ]; then
|
|
|
|
echo "removing $BASE.lyx.emergency"
|
|
|
|
rm $BASE.lyx.emergency
|
|
|
|
fi
|
|
|
|
|
2011-01-29 14:42:53 +00:00
|
|
|
export MAX_DROP=0
|
2011-02-01 22:57:10 +00:00
|
|
|
if [ "$(pidof lyx)" != "" ]; then
|
|
|
|
export LYX_PID=$(pidof lyx)
|
2012-12-12 19:21:36 +00:00
|
|
|
export LYX_WINDOW_NAME=$(wmctrl -l -p | grep " $LYX_PID " | cut -d ' ' -f 1);
|
2011-02-01 22:57:10 +00:00
|
|
|
fi
|
2017-01-25 01:08:28 +00:00
|
|
|
|
|
|
|
echo LYX_PID=$LYX_PID
|
|
|
|
echo LYX_WINDOW_NAME=$LYX_WINDOW_NAME
|
|
|
|
|
2011-01-29 14:42:53 +00:00
|
|
|
export MAX_LOOPS=1
|
|
|
|
export LYX_EXE=${LYX_EXE:-../../src/lyx}
|
2011-02-06 22:50:07 +00:00
|
|
|
|
|
|
|
if [ "$XVKBD_HACKED" != "" ]; then
|
|
|
|
export XVKBD_EXE=${XVKBD_EXE:-./xvkbd/xvkbd};
|
|
|
|
else
|
|
|
|
export XVKBD_EXE=${XVKBD_EXE:-xvkbd};
|
|
|
|
fi
|
2011-01-29 14:42:53 +00:00
|
|
|
|
2017-01-25 01:08:28 +00:00
|
|
|
python -m trace --trace $KEYTEST
|