mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Added the creation of a custom .lyx folder inside pwd
/home/.lyx at
the beginning of the tests (which reconfigures LyX and takes some time), followed by all of the tests using it. This way, we get only the default configuration of LyX as a base, without being affected by individual users custom configurations. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37408 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cfc81ea3d7
commit
705759d678
4
development/autotests/first-time-in.txt
Normal file
4
development/autotests/first-time-in.txt
Normal file
@ -0,0 +1,4 @@
|
||||
Lang en_US.utf8
|
||||
TestBegin test.lyx > lyx-log.txt 2>&1
|
||||
KK: \[Left]\[Return]
|
||||
TestEnd
|
@ -234,6 +234,7 @@ outfilename = os.environ.get('KEYTEST_OUTFILE')
|
||||
max_drop = os.environ.get('MAX_DROP')
|
||||
lyx_window_name = os.environ.get('LYX_WINDOW_NAME')
|
||||
screenshot_out = os.environ.get('SCREENSHOT_OUT')
|
||||
lyx_userdir = os.environ.get('LYX_USERDIR')
|
||||
|
||||
max_loops = os.environ.get('MAX_LOOPS')
|
||||
if max_loops is None:
|
||||
@ -299,10 +300,13 @@ while not failed:
|
||||
os.system("killall lyx")
|
||||
time.sleep(0.2)
|
||||
print "Starting LyX . . ."
|
||||
os.system(lyx_exe + c[9:] + "&")
|
||||
if lyx_userdir is None:
|
||||
os.system(lyx_exe + c[9:] + "&")
|
||||
else:
|
||||
os.system(lyx_exe + " -userdir " + lyx_userdir + " " + c[9:] + "&")
|
||||
while True:
|
||||
lyx_pid=os.popen("pidof lyx").read().rstrip()
|
||||
lyx_window_name=os.popen("wmctrl -l | grep 'lyx$\\|LyX:' | sed -e 's/.*\\([Ll]y[Xx].*\\)$/\\1/'").read().rstrip()
|
||||
lyx_window_name=os.popen("wmctrl -l -p | grep ' " + str(lyx_pid) + " ' | cut -d ' ' -f 1").read().rstrip()
|
||||
if lyx_window_name != "":
|
||||
break
|
||||
print 'lyx_win: ' + lyx_window_name + '\n'
|
||||
|
@ -6,21 +6,38 @@
|
||||
|
||||
export LYX_EXE=../../../src/lyx
|
||||
export KEYTEST=../keytest.py
|
||||
export LYX_USERDIR=$(pwd)/home/.lyx
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
TESTS=$(ls *-in.txt);
|
||||
TESTS=$(ls *-in.txt | sed -e 's/hello-world-in.txt\|first-time-in.txt//');
|
||||
else
|
||||
TESTS=$*
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
if [ ! -d home ]; then
|
||||
mkdir home
|
||||
cd home
|
||||
echo "Initializing testing environment . . ."
|
||||
if ! ../single-test.sh "../first-time-in.txt" > keytest-log.txt 2>&1; then
|
||||
echo "Some error occurred: check $(pwd)"
|
||||
exit -1;
|
||||
fi
|
||||
cd ..
|
||||
fi
|
||||
|
||||
echo "Running test cases . . ."
|
||||
failed=0
|
||||
for t in $(echo "$TESTS" | sed -e 's/-in.txt//g'); do
|
||||
printf "%40s: " $t
|
||||
if [ ! -f "$t-in.txt" ]; then
|
||||
echo "ERROR: File not found: $t-in.txt"
|
||||
exit -1;
|
||||
fi
|
||||
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 ..
|
||||
|
Loading…
Reference in New Issue
Block a user