3 # This script runs all the test scripts it finds in the current folder
4 # Tests are identified as having a file name of *-in.txt
5 # For failed tests, the collected output is kept in the corresponding folder
7 if [ ! -x xvkbd/xvkbd ]; then
8 echo "You need to build XVKBD first, try: cd xvkbd && xmkmf && make"
12 export LYX_EXE=../../../src/lyx
14 if [ "$XVKBD_HACKED" != "" ]; then
15 export XVKBD_EXE=${XVKBD:-../xvkbd/xvkbd};
18 export KEYTEST=../keytest.py
20 export LYX_USERDIR=$(pwd)/$LYX_HOME/.lyx
22 if [ "$#" -eq 0 ]; then
23 TESTS=$(ls *-in.txt | sed -e 's/hello-world-in.txt\|first-time-in.txt//');
30 if [ ! -d $LYX_HOME ]; then
33 echo "Initializing testing environment . . ."
34 if ! ../single-test.sh "../first-time-in.txt" > keytest-log.txt 2>&1; then
35 echo "Some error occurred: check $(pwd)"
41 # Launch the emergency STOP button
42 ./stop_autotests.tcl &
44 echo "Running test cases . . ."
46 for t in $(echo "$TESTS" | sed -e 's/-in.txt//g'); do
48 if [ ! -f "$t-in.txt" ]; then
49 echo "ERROR: File not found: $t-in.txt"
55 if ../single-test.sh "../$t-in.txt" > keytest-log.txt 2>&1; then
66 killall stop_autotests.tcl > /dev/null 2>&1
69 if [ $failed -eq 0 ]; then
70 echo "All tests SUCCESSFUL"
72 echo "There were $failed FAILED tests";