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 export LYX_EXE=../../../src/lyx
8 export KEYTEST=../keytest.py
9 export LYX_USERDIR=$(pwd)/home/.lyx
11 if [ "$#" -eq 0 ]; then
12 TESTS=$(ls *-in.txt | sed -e 's/hello-world-in.txt\|first-time-in.txt//');
19 if [ ! -d home ]; then
22 echo "Initializing testing environment . . ."
23 if ! ../single-test.sh "../first-time-in.txt" > keytest-log.txt 2>&1; then
24 echo "Some error occurred: check $(pwd)"
30 echo "Running test cases . . ."
32 for t in $(echo "$TESTS" | sed -e 's/-in.txt//g'); do
34 if [ ! -f "$t-in.txt" ]; then
35 echo "ERROR: File not found: $t-in.txt"
41 if ../single-test.sh "../$t-in.txt" > keytest-log.txt 2>&1; then
53 if [ $failed -eq 0 ]; then
54 echo "All tests SUCCESSFUL"
56 echo "There were $failed FAILED tests";