Commit Graph

18 Commits

Author SHA1 Message Date
Kornel Benko
36a3cca3ea keytests: New script to replace 'pcregrep' in more complex cases.
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)
2017-05-14 18:58:55 +02:00
Kornel Benko
48ecf06d9b Cmake keytests: Don't care for lyx still not finished.
The called script keytest.py already takes care of that.
2017-05-07 13:49:10 +02:00
Kornel Benko
4436431ea5 Remove xvkbd from cmake build.
The directory still exists because automake build refers it.
2017-04-28 11:42:50 +02:00
Kornel Benko
034d5632a2 Make tests for QT5 and QT4 work.
Changing *-in.txt due to erroneous shortcuts in it.po
keytest.py, single-test.cmake and CMakeLists.txt now
provide a frontend hint for xvkbd.
2015-03-17 17:36:47 +01:00
Kornel Benko
f2937e676a Fix stalling of keytests when invalid DISPLAY
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)
2014-08-25 13:45:32 +02:00
Kornel Benko
f2553ebf6c Cmake build tests: Threadsafety and test-labeling
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
2013-09-07 09:25:02 +02:00
Kornel Benko
788e2b1ac8 Cmake build tests: Unify use of userdir
While some test runns lyx-exe, we need userdir be
different from default. All relevant tests should use the same directory.
2013-08-25 11:41:10 +02:00
Kornel Benko
fc33092fd8 Cmake build: modify some tests
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
2013-08-21 13:34:26 +02:00
Scott Kostyshak
12a4b3aee9 autotests: clean up .emergency file of input .lyx
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.
2013-01-29 16:18:08 -05:00
Scott Kostyshak
e77c0dfcf3 CMake: tests can now use an existing .lyx file
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.
2013-01-27 05:29:50 -05:00
Kornel Benko
e6e28f189a Cmake build: autotests: Remove "session"-file before starting tests 2013-01-25 10:47:31 +01:00
Kornel Benko
dae22baf0b Cmake build: Forgot to set the environment XVKBD_HACKED
to select the correct parameters for xvkbd.
2013-01-25 09:16:34 +01:00
Kornel Benko
9481d4182e autotests: Enable the suffixed lyx to run the test too.
(Hard coded 'lyx' replaced with real lyx-exe-file-name)
2013-01-05 10:07:37 +01:00
Kornel Benko
0b82548b5e Cmake build autotests:
Correct the environment MAX_LOOP -> MAX_LOOPS
2012-12-15 12:58:31 +01:00
Kornel Benko
1f93b0805e Cmake build autotests:
Split export test to test on each format and each input file
One can still check all exports with one commend
        ctest -R "export.*"
2012-12-13 12:38:38 +01:00
Kornel Benko
b436a03b34 Cmake build: autotests
Adapt to use local .gmo files
2012-12-12 14:54:38 +01:00
Kornel Benko
57ca9ee073 Cmake build: autotests
1.) Filenames for export changed
2.) Usage of wmctrl
3.) More temporary file to remove
2012-12-11 18:59:05 +01:00
Kornel Benko
57b04ac7f4 Cmake build: First try to use autotests.
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)
2012-12-11 15:17:04 +01:00