mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-21 05:00:59 +00:00
36a3cca3ea
Suppose, we want to test a key sequence which should produce logs in defined sequence. ATM, we use pcregrep to see, if a pattern occurs in the log-file. This is OK, if using only single tests with only one message to care about. But it is not OK for combined tests. As an example, the file 'findadv-combine-in.txt' is combining tests findadv-re-01-in.txt, findadv-re-02-in.txt and findadv-re-03-in.txt. This test runns here about 25 seconds, while the time for the other three is about 144 secs. (Most time is with starting/stopping lyx)
44 lines
1.0 KiB
Bash
Executable File
44 lines
1.0 KiB
Bash
Executable File
#!/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
|
|
|
|
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
|
|
|
|
export MAX_DROP=0
|
|
if [ "$(pidof lyx)" != "" ]; then
|
|
export LYX_PID=$(pidof lyx)
|
|
export LYX_WINDOW_NAME=$(wmctrl -l -p | grep " $LYX_PID " | cut -d ' ' -f 1);
|
|
fi
|
|
|
|
echo LYX_PID=$LYX_PID
|
|
echo LYX_WINDOW_NAME=$LYX_WINDOW_NAME
|
|
|
|
export MAX_LOOPS=1
|
|
export LYX_EXE=${LYX_EXE:-../../src/lyx}
|
|
export EXTRA_PATH=`pwd`
|
|
|
|
if [ "$XVKBD_HACKED" != "" ]; then
|
|
export XVKBD_EXE=${XVKBD_EXE:-./xvkbd/xvkbd};
|
|
else
|
|
export XVKBD_EXE=${XVKBD_EXE:-xvkbd};
|
|
fi
|
|
|
|
python -m trace --trace $KEYTEST
|