mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
5f50ae8f08
As of now, I plan to add a few regression tests for the Advanced Find & Replace using this engine. It can be used for automated testing of other LyX subsystems as well. Just write your own *-in.txt scripts and add them into the autotests/ folder. TODOs: - perhaps simplify keytest.py - check how this behaves under various types of failure of the test (e.g., LyX crashing, hanging, ...) just to be sure it goes on with the other tests anyway. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37364 a592a061-630c-0410-9148-cb99ea01b6c8
43 lines
821 B
Bash
Executable File
43 lines
821 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script runs all the test scripts it finds in the current folder
|
|
# Tests are identified as having a file name of *-in.txt
|
|
# For failed tests, the collected output is kept in the corresponding folder
|
|
|
|
export LYX_EXE=../../../src/lyx
|
|
export KEYTEST=../keytest.py
|
|
|
|
if [ "$#" -eq 0 ]; then
|
|
TESTS=$(ls *-in.txt);
|
|
else
|
|
TESTS=$*
|
|
fi
|
|
|
|
echo
|
|
echo "Running test cases . . ."
|
|
failed=0
|
|
for t in $(echo "$TESTS" | sed -e 's/-in.txt//g'); do
|
|
rm -rf "out-$t"
|
|
mkdir "out-$t"
|
|
cd "out-$t"
|
|
printf "%40s: " $t
|
|
if ../single-test.sh "../$t-in.txt" > keytest-log.txt 2>&1; then
|
|
echo Ok
|
|
cd ..
|
|
rm -rf "out-$t";
|
|
else
|
|
echo FAILED
|
|
cd ..
|
|
failed=$[$failed+1];
|
|
fi;
|
|
done
|
|
|
|
echo
|
|
if [ $failed -eq 0 ]; then
|
|
echo "All tests SUCCESSFUL"
|
|
else
|
|
echo "There were $failed FAILED tests";
|
|
fi
|
|
|
|
echo
|