Suppose, we want to test a key sequence which should produce
logs in defined sequence. ATM, we use pcregrep to see, if
a pattern occurs in the log-file. This is OK, if using only single
tests with only one message to care about.
But it is not OK for combined tests.
As an example, the file 'findadv-combine-in.txt' is combining
tests findadv-re-01-in.txt, findadv-re-02-in.txt and findadv-re-03-in.txt.
This test runns here about 25 seconds, while the time for the other three
is about 144 secs.
(Most time is with starting/stopping lyx)
Before, the keytests would run infinitely if the
tests were run, e.g. through SSH without X forwarding.
To reproduce that problem, run
DISPLAY='' ctest -R hello
This commit causes the test to correctly fail in such situations.
(Collaboration with Scott Kostyshak)
The tests are now more robust if ctest uses '-j' (number of threads) parameter.
a.) keytests are running in sequence and in one thread only, no other thread running
b.) tex2lyx tests are locking in respect to each other
c.) Test gets one or more labels, so that we can select
ctest -L url
to run tests labeled url
d.) New macro settestlabel() to add labels to a test
a) test export/templates/ectaart_pdf5 removed, because
of incompatibility between ectart.cls and luatex.sty
b) renamed some tests to reflect their purpose
tex2lyx2lyx/roundtrip/ => tex2lyx/cmplyx/
# the tests are comparing files written by lyx (not by tex2lyx)
autotests/ => keytest/
# we are testing reactions of lyx to some key strokes
c) add tests for lyx2lyx. This is rather rudimental, in that it only
checks for created output, error codes and error output.
d) use correct environment variable to set up the userdir for testing
If the test opens an existing .lyx file and crashes, it will leave
around a .emergency file. If a test with that same name is run again,
LyX will try to recover the .emergency file, which could throw
off the test.
This is implemented for both CMake and autotools.
To reproduce some bugs, tests need to open an existing LyX file. This
is now possible with CMake and is consistent with testing under
autotools in the sense that the .lyx file is referred to in the test
by being in the parent directory.
If the test is named bug-XXXX-in.txt and there exists a file
bug-XXXX.lyx, that file will be copied to the parent directory of
out-home in the build directory.
Many test are not running, but if changed the '-dbg xxx' to '-dbg any'
then all of sudden they pass ...
(The buffered output of lyx is often disrupted too early with 'kill -9',
so the expected data are not available for the appropriate test)