Commit Graph

52 Commits

Author SHA1 Message Date
Kornel Benko
2df6340c1c Cmake tests: Set also correct sequence of tests again. 2014-09-03 12:35:40 +02:00
Kornel Benko
d97c34f4fe Cmake tests: Disable keytests if missing needed input files
The files first-time-in.txt and hello-world-in.txt are used
as first tests to initialize the test environment for the other
keytests.
2014-09-03 12:25:28 +02:00
Scott Kostyshak
78b7045ed8 CMake: full path of an include needed for ver <3.0 2014-06-21 20:43:06 -04:00
Kornel Benko
7bc0a6f388 Cmake tests: Optimizing the cmake configuration time
The configuration time suffers mostly on checking, which of the export tests
is to be reverted.
1.) There is a new configuration flag now, "LYX_ENABLE_EXOPRT_TESTS.
   If not set (default) no export tests are created.
2.) If set, then the optimization halves the time needed for creation of tests.

The effect on my side:
        a.) Until now the time was:        ~ 26 seconds
        b.) The optimized time is now:     ~ 16 seconds
        c.) With not enabled export tests: ~  5 seconds
2014-06-21 21:15:54 +02:00
Kornel Benko
1b3e4c73f8 Cmake tests: Added parser_tools test to the lyx2lyx group tests 2014-06-12 09:07:57 +02:00
Kornel Benko
046001e571 Make: improve detection of X11 with Qt 5
In collaboration with Scott Kostyshak:
With Qt 4 we could use Q_WS_X11, defined by FindQt4.cmake. In Qt 5,
there is no FindQt5.cmake. Instead we now define our own variable,
QT_USES_X11 by using class QX11Info available only on X11.
(http://qt-project.org/doc/qt-5/QX11Info.html)

The main consequence of this improved support is that now the keytests
can be run (ctest -R "keytest") when LyX is compiled with Qt 5.
Before, with Qt 5 we did not know if X11 was available, which is
needed by xvkbd, so the tests were not enabled. Note, however, that
many tests fail with Qt version 5.2.1 because there was a change in
the event handling mechanism in Qt that causes xvkbd to be unable to
pass capital letters (so case sensitive greps in the tests fail). This
needs to be investigated and reported.
2014-05-25 13:50:18 +02:00
Kornel Benko
dae08c371f Cmake tests: Allow regular expressions to select for reverted tests. 2014-04-21 19:18:42 +02:00
Kornel Benko
7ecbb06888 cmake export tests.
Define new policy of what export formats to check.
Depending on default_output_format
default or unset           xhtml, dvi*, pdf*
xhtml                      xhtml
any of pfd variants        xhtml, pdf*
any of dvi variants        xhtml, dvi*
each other (like eps3)     as specified
2014-03-16 09:57:31 +01:00
Kornel Benko
59f4d0d753 ctest export: smal improvements
1.) Use of regex to ignore group of tests
2.) If default output format is pdf2(pdflatex), the try to check also
  for xelatex and lualatex
2014-03-12 17:15:07 +01:00
Kornel Benko
f36ea42b5e Cmake build: Prepare lyx2lyx tests to use the python executable found at configure time 2014-01-31 19:10:23 +01:00
Kornel Benko
997035fe66 Cmake tests: Expand export tests for luatex and xetex
Citing Scott:
In our current set up, we are currently testing XeTeX and LuaTeX
either with system fonts or with TeX fonts but never both. We should
test with both in my opinion. We will have to ignore/invert many tests
but it still seems useful. For example Günter fixed babel-greek so
that it works now with TeX fonts; and Jürgen found some errors in LyX
that were causing some of the English docs to fail with system fonts.
Currently we only test greek documents with system fonts and we only
test English documents with TeX fonts.

This change adds the missing test-cases.
2013-12-16 11:36:36 +01:00
Scott Kostyshak
0a4bb51a26 ctests: add dviluatex as a format that needs fonts
Documents in certain languages will only work with dviluatex
if fonts that support those languages are used.

This commit continues e690cfc4.
2013-11-27 07:57:31 -05:00
Kornel Benko
e690cfc47c make test environment. Exports with luatex and xetex.
In successful cooperation with Scott Kostyshak.
We provide many lyx-documents which are not compilable with luatex or xetex.
But some of them compile, if we change the font use to non_tex_fonts.
Since this would change the appropriate source, we have to convert
it first into a save location. To make it there compilable,
we have to convert also all file references.
languages     used font
he|el|ru|uk  'FreeSans'
fa           'FreeFarsi'
zh_CN        'WenQuanYi Micro Hei'
The whole job is done with a perl script.
2013-11-17 23:17:27 +01:00
Scott Kostyshak
1e807d5183 Add XeTeX tests
Testing with XeTeX uncovered a few bugs (e.g. Math export
was failing) and thus should be a part of the ctesting.
2013-10-09 11:31:40 -04: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
Scott Kostyshak
dbd3e5a0f8 Remove diagnostic code that slipped in
I did not intend to commit this piece of diagnostic code
in a0f6b09a.
2013-09-06 22:22:23 -04:00
Kornel Benko
1a1ee97758 Cmake build tests: Create directory neede for testing
While testing exports, we need a directory for created mess,
which we use then as working directory.
2013-08-26 22:02:20 +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
Scott Kostyshak
a0f6b09a82 ctests: macro now deals with reverted and ignored
A single macro determines if a test should be ignored
(by returning an empty test name), and if not,
whether to revert it.

This was Kornel's idea.
2013-08-23 14:45:54 -04:00
Kornel Benko
036a78e990 Cmake tests: Allow for comments in control files
Files, which contain names of ctest-tests controling
whether they should be inverted, or ignored.
We have two such files ATM: revertedTests + ignoredTests
2013-08-23 20:25:24 +02:00
Scott Kostyshak
7affdd5764 New ctests to check for parsing and other errors
These tests load the .lyx files to see if there are
any parsing errors or other LyX errors/warnings. The
tests fail if LyX writes a line to STDERR that does not
match any of the regexes stored in filterCheckWarnings.

Thanks to Kornel for the CMake expertise and corrections.
This patch was written jointly with him.
2013-08-22 19:01:23 -04: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
1d3e77b515 tests: 'default' 'default_output_format' if none
When deciding which output formats to test, if we do not find a
'default_output_format' we assume it is set to 'default'.

For discussion, see:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg180536.html
2013-08-05 19:24:11 -04:00
Vincent van Ravesteijn
9235e82558 Fix typo 2013-08-04 16:37:24 +02:00
Kornel Benko
8ac070afb0 Cmake export tests
Some export test are known to fail. Checking them every time is cumbersome.
Now, the tests marked in file revertedTests will invert the success condition
and mark the test as INVERTED_SEE-README.ctest.

If some of the tests in revertedTests fails, this is good, and the testname
can be removed from it.
2013-08-04 14:31:47 +02:00
Kornel Benko
db3afda749 typo 2013-07-23 22:39:03 +02:00
Kornel Benko
33f23ae8e5 Export tests in cmake build: Do not use the default userdir while
running lyx.
2013-07-23 21:42:44 +02:00
Vincent van Ravesteijn
f43e38fa9f CMake: xvkbd: Check whether the list exists
Instead of adding an empty element to the list, just check properly whether the list exists.
2013-07-23 20:42:53 +02:00
Vincent van Ravesteijn
d3634b6cd5 CMake: xvkbd: Fix spelling 2013-07-23 19:05:06 +02:00
Vincent van Ravesteijn
33aef1befe CMake: xvkbd: Compile fix if none of the libraries is found
If no libraries are found, XVFBDLIBS is not initialized and the command "list(REMOVE_DUPLICATES XVFBDLIBS)" fails. So, initialize XVFBDLIBS beforehand.
2013-07-23 19:04:56 +02:00
Kornel Benko
f4bc391925 Cmake build xvkbd: add xmu to the list of libraries to bind with.
This is needed (because of DSO) on ubuntu 13.04.
2013-07-13 22:45:05 +02:00
Kornel Benko
5431b41d22 Cmake build key tests: Omit the tests and creation of xvkbd command,
if not all needed libs or programs are available.
This error is now not fatal.
2013-07-13 22:44:56 +02:00
Scott Kostyshak
9ff4dc4258 Clean up CMake testing code
Thanks to Kornel for the advice.
2013-03-04 11:39:12 -05:00
Scott Kostyshak
e4a72659b0 Re-add MergedManual test
Now that the default format is set to xhtml, there will correctly
be no LaTeX test.
2013-03-04 07:18:11 -05:00
Scott Kostyshak
cc30e79c32 Tests: take into account a default format of xhtml
The xhtml format is always tested, regardless of the default format.
Without this, if the default format is xhtml, CMake gives an error
when trying to add the xhtml test because it was already added.
2013-03-04 07:15:52 -05:00
Kornel Benko
f520df382d Remove MergedManuals.lyx from export tests 2013-03-01 17:13:29 +01:00
Scott Kostyshak
28104a7496 Add templates to export tests (CMake & autotools) 2013-02-21 08:25:13 -05:00
Kornel Benko
9183c922ea Sort export tests in cmake build according to language 2013-02-20 13:26:01 +01:00
Kornel Benko
248c6ded33 Cmake tests: Add lyx-files for export testing recursively. 2013-02-18 16:34:19 +01:00
Scott Kostyshak
9f4927e855 Add examples to export tests (CMake & autotools)
Now all export tests can be run with:
ctest -R "export"

Only export tests for manuals can be run with:
ctest -R "export/doc"

And only export tests for examples can be run with:
ctest -R "export/examples"
2013-02-16 06:27:09 -05:00
Scott Kostyshak
2fd0c34b9b CMake: change name of export autotests
Instead of 'autotests/export/doc/' export tests are prefixed
with 'export/doc/'. This has the advantage of the name better
reflecting the test (export tests are not autotests), but has a
disadvantage in that the old name gave a better idea of where the
export test scripts are located (in the autotests directory).
2013-02-16 06:27:09 -05:00
Scott Kostyshak
010dfb6a5a Make export tests more extendable
For both CMake and autotools. Now we can easily add
the examples to the export tests.
2013-02-16 06:27:09 -05:00
Kornel Benko
55d32635e1 Cmake build: Add pdf, pdf2 and pdf5 formats to export testcases 2013-01-24 17:58:44 +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
892e237fe1 Cmake build: Testing
Make this all more the cmake way
2012-12-15 00:15:59 +01:00
Kornel Benko
81500fc99b Cmake build:
Move definitions of target ${_lyx} and ${_tex2lyx} to top-most directory,
to make them overall available
2012-12-14 12:23:17 +01:00
Kornel Benko
96dd1363a2 Cmake build: all tests
1.) Rename tests to show their grouping
2.) Adapt the roundtrip tests to new lyx-format
2012-12-13 15:35:04 +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
4182205ca8 Cmake build: autotests
Make the export test available to all, since it is independent of X11
2012-12-12 18:23:25 +01:00
Kornel Benko
b436a03b34 Cmake build: autotests
Adapt to use local .gmo files
2012-12-12 14:54:38 +01:00