Hi, I am trying to make autotests run under cmake. So far I made some progress.
Until now, some of the tests are working. One has to make some prepares though. 1.) I could not find the place where the lyx (in automake) is started. This is needed, since the call to `pidof lyx` cannot work. I start lyx now manually before the tests ... 2.) The syntax of "wctrl" changed. 2a.) I have to use "wctrl -i -a xxxx" instead of "wctrl -a xxxx", because otherwise the xxx is interpreted as NAME of the window 2b.) For searching the window-id with known pid I had to use "wctrl -l -p" instead of "wmctrl -l", because otherwise there was no pid in the output 3.) Installation of missing "pcregrep" 4.) Setting preferences to use English for the lyx-gui while testing Now the tests first-time-in.txt, findadv-0[1-5]-in.txt are OK. Problems are with findadv-06-in.txt I am attaching the log-files, maybe someone can see, what’s wrong. (E.g. why are we expecting 'Putting selection at .*idx: 0 par: 2 pos: 0\n with len: 3' twice, and why is this string only once in log) There is also lyx-log.txt, I can attach it too, but it is somewhat lenghty (8644 bytes) Kornel
Start testing: Dec 11 11:49 CET ---------------------------------------------------------- 19/39 Testing: auto_findadv-06 19/39 Test: auto_findadv-06 Command: "/usr/bin/cmake" "-DAUTOTEST_ROOT=/usr/src/lyx/lyx-git/development/autotests" "-DKEYTEST_INFILE=findadv-06-in.txt" "-DBINDIR=/usr/BUILD/BuildLyxGit/bin/." "-DWORKDIR=/usr/BUILD/BuildLyxGit/autotests/out-home" "-DKEYTEST_OUTFILE=findadv-06-out.txt" "-P" "/usr/src/lyx/lyx-git/development/autotests/single-test.cmake" Directory: /usr/BUILD/BuildLyxGit/autotests/out-home "auto_findadv-06" start time: Dec 11 11:49 CET Output: ---------------------------------------------------------- -- pidres = 10632 -- Set LYX_WINDOW_NAME to 0x07600012 Beginning keytest.py lyx_pid: 10632 outfilename: /usr/BUILD/BuildLyxGit/autotests/out-home/findadv-06-out.txt max_drop: 1 infilename: /usr/src/lyx/lyx-git/development/autotests/findadv-06-in.txt probability_we_drop_a_command: 0.149873831556 0.149873831556 0.149873831556 self.p randomdrop_slice 3 3 4 ['\n', 'Lang it_IT.utf8\n', 'TestBegin test.lyx -dbg find > lyx-log.txt 2>&1\n', 'KK: foo\\[Return]\n', 'KK: \\Ap2\n', 'KK: foo\\[Return]\n', 'KK: \\Aps\n', 'KK: foo\\C\\[Home]\n', 'KK: \\Cs\n', 'KK: \\CF\n', '# Uncheck ignore format\n', 'KK: \\Az\\Ag\\Ae\n', 'KK: \\Ap2\n', 'KK: foo\\[Return]\n', 'TestEnd\n', "Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\\n with len: 3' lyx-log.txt\n", '#\n', 'TestBegin test.lyx -dbg find > lyx-log2.txt 2>&1\n', 'KK: \\C\\[Home]\n', 'KK: \\CF\n', '# Uncheck ignore format\n', 'KK: \\Az\\Ag\\Ae\n', 'KK: foo\\[Return]\\[Return]\n', 'TestEnd\n', "Assert pcregrep -M 'Putting selection at .*idx: 0 par: 2 pos: 0\\n with len: 3' lyx-log2.txt\n", '# Basic test for searching with par-style awareness\n'] ['\n', 'Lang it_IT.utf8\n', 'TestBegin test.lyx -dbg find > lyx-log.txt 2>&1\n', 'KK: \\Ap2\n', 'KK: foo\\[Return]\n', 'KK: \\Aps\n', 'KK: foo\\C\\[Home]\n', 'KK: \\Cs\n', 'KK: \\CF\n', '# Uncheck ignore format\n', 'KK: \\Az\\Ag\\Ae\n', 'KK: \\Ap2\n', 'KK: foo\\[Return]\n', 'TestEnd\n', "Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\\n with len: 3' lyx-log.txt\n", '#\n', 'TestBegin test.lyx -dbg find > lyx-log2.txt 2>&1\n', 'KK: \\C\\[Home]\n', 'KK: \\CF\n', '# Uncheck ignore format\n', 'KK: \\Az\\Ag\\Ae\n', 'KK: foo\\[Return]\\[Return]\n', 'TestEnd\n', "Assert pcregrep -M 'Putting selection at .*idx: 0 par: 2 pos: 0\\n with len: 3' lyx-log2.txt\n", '# Basic test for searching with par-style awareness\n'] Using x=CommandSourceFromFile Executing wmctrl -i -a '0x07600012' lyx: no process found Setting LANG=it_IT.utf8 Setting LANGUAGE=it_IT Found running instance(s) of LyX: 10632 : killing them all Executing killall lyx Executing killall -KILL lyx Starting LyX . . . Executing /usr/BUILD/BuildLyxGit/bin/./lyx test.lyx -dbg find > lyx-log.txt 2>&1& lyx_win: Waiting for LyX to show up . . . lyx_win: Waiting for LyX to show up . . . lyx_pid: 10702 lyx_win: 0x07600012 Ignoring comment line: # Uncheck ignore format Traceback (most recent call last): File "/usr/src/lyx/lyx-git/development/autotests/keytest.py", line 373, in <module> Terminating lyx instance: 10702 Executing kill -9 10702 Waiting for lyx to die... Executing Executing result=0, failed=False Executing pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' lyx-log.txt Executing pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' lyx-log.txt result = intr_system(cmd) File "/usr/src/lyx/lyx-git/development/autotests/keytest.py", line 178, in intr_system raise BaseException("command failed.") BaseException: command failed. CMake Error at /usr/src/lyx/lyx-git/development/autotests/single-test.cmake:57 (message): KEYTEST failed: KEYTEST_RES=1 <end of output> Test time = 8.46 sec ---------------------------------------------------------- Test Failed. "auto_findadv-06" end time: Dec 11 11:49 CET "auto_findadv-06" time elapsed: 00:00:08 ---------------------------------------------------------- End testing: Dec 11 11:49 CET
Lang it_IT.utf8 TestBegin test.lyx -dbg find > lyx-log.txt 2>&1 KK: \Ap2 KK: foo\[Return] KK: \Aps KK: foo\C\[Home] KK: \Cs KK: \CF # Uncheck ignore format KK: \Az\Ag\Ae KK: \Ap2 KK: foo\[Return] TestEnd Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' lyx-log.txt
test.lyx
Description: application/lyx
test.lyx.emergency
Description: application/lyx
signature.asc
Description: This is a digitally signed message part.