]> git.lyx.org Git - lyx.git/blob - development/autotests/single-test.sh
Reset dim width when computing MathRow metrics
[lyx.git] / development / autotests / single-test.sh
1 #!/bin/bash
2
3 # This script invokes the keytest.py script with the simple set-up needed
4 # to re-run deterministic regression tests that one would like to have.
5 #
6 # Usage: run-test.sh <test-in.txt>
7 #
8 # See the hello-world-in.txt for an example syntax and description
9
10 KEYTEST=${KEYTEST:-./keytest.py}
11
12 export KEYTEST_OUTFILE=out.txt
13 export KEYTEST_INFILE=in-sample.txt
14 if [ "$1" != "" ]; then
15     KEYTEST_INFILE="$1";
16 fi
17
18 BASE=$( echo $KEYTEST_INFILE | sed 's/-in\.\(txt\|sh\)$//')
19 if [ -e $BASE.lyx.emergency ]; then
20         echo "removing $BASE.lyx.emergency"
21         rm $BASE.lyx.emergency
22 fi
23
24 export MAX_DROP=0
25 if [ "$(pidof lyx)" != "" ]; then
26     export LYX_PID=$(pidof lyx)
27     export LYX_WINDOW_NAME=$(wmctrl -l -p | grep " $LYX_PID " | cut -d ' ' -f 1);
28 fi
29
30 echo LYX_PID=$LYX_PID
31 echo LYX_WINDOW_NAME=$LYX_WINDOW_NAME
32
33 export MAX_LOOPS=1
34 export LYX_EXE=${LYX_EXE:-../../src/lyx}
35 export EXTRA_PATH=`pwd`
36
37 if [ "$XVKBD_HACKED" != "" ]; then
38     export XVKBD_EXE=${XVKBD_EXE:-./xvkbd/xvkbd};
39 else
40     export XVKBD_EXE=${XVKBD_EXE:-xvkbd};
41 fi
42
43 python -m trace --trace $KEYTEST