Commit Graph

496 Commits

Author SHA1 Message Date
Kornel Benko
a99dc05e18 Cmake tests: Make foreach() command robust
Cmake's foreach command includes forms
  foreach(<loop_var> IN LISTS <lists>)
  foreach(<loop_var> IN ITEMS <items>)
  foreach(<loop_var> RANGE ...)
We get the lines to be parsed by
  file(STRINGS "${filepath}" lines)
If in the parsed lyx-file there is a line
containing only the single word 'IN',  or 'RANGE', then
the command
  foreach(_l ${lines})
can create a syntax error (at least with cmake1.16)

In fact, in file pl_Additional.lyx:12913 happens to have
such a beast.

(cherry picked from commit 7b44280da4)
2019-12-31 11:35:54 +01:00
Kornel Benko
44c8315a7d Cmake export tests: Use pre-compiled regular expressions
Essentially ammend db5fb78c, consisting of cherry-pick 597dcbb5
(and c9e62dec, but this is not important here)
2019-02-26 11:26:20 +01:00
Kornel Benko
db5fb78cfd Cmake lyx2lyx tests: Correct use of value for \use_non_tex_fonts
Amend eec3d1eb,7568571a
We are trying to check if the resulting file after lyx2lyx
is compilable, we have to ensure that copying the original file
to the test directory does not mangle use_non_tex_fonts-entry.

(cherry picked from commit c9e62dec53)
2019-01-05 09:03:23 +01:00
Kornel Benko
410054ba5e lyx2lyx tests: Use the temp-dir also for converted lyx files
Important if including data previously copied there.
Fixes test "export/doc/Additional_lyx22"

(cherry picked from commit 7568571a24)
2019-01-04 05:26:48 +01:00
Kornel Benko
36aa0526e0 lyx2lyx tests: Copy also original lyx files to temp dir
Necessary only if the lyx-file includes some data from
a relative path, nonetheless it happens in some of our tests.
2019-01-03 08:56:29 +01:00
Kornel Benko
af7dba023b Amend 7e1ecb65, add Bibliography.lyx to the set of not tested subdocuments 2019-01-02 16:35:18 +01:00
Scott Kostyshak
968afbbadd ctests: invert for new ru example_lyxified.lyx
Consistent with the ru splash.lyx, we invert the texF tests for the
ru example_lyxified.lyx, which was recently added at 69ef4bc1.

(cherry picked from commit dc06714adb)
2018-01-18 00:03:05 -05:00
Scott Kostyshak
66b5538339 ctest comment: be more clear about what "!" means
The "!" line only affects tests in that file.

This amends c6d4380c.

Thanks to Kornel for spotting this.

(cherry picked from commit 39c22913a2)
2018-01-17 01:09:36 -05:00
Scott Kostyshak
7a9aa76a1a Comment: explain interpretation of "!"
The "!" line takes precedence, since it is first.

(cherry picked from commit c6d4380c89)
2018-01-15 17:31:48 -05:00
Scott Kostyshak
6474b0fb04 Whitespace 2018-01-15 17:07:55 -05:00
Scott Kostyshak
fcfc95e41c Merge branch 'ja_knitr_sweave_updates'
This merges updates from Koji Yokota, and adapts the ctests
accordingly.

(cherry picked from commit 299b730318)
2018-01-15 17:05:22 -05:00
Scott Kostyshak
2c20f06d25 ctests: allow excluding patterns
This allows us to exclude matches of certain patterns in
invertedTests, ignoredTests, unreliableTests, and suspendedTests.

To use this new functionality, prefix "!" to the pattern.

This functionality serves as a workaround in some cases to not being
able to use advanced regular expression techniques, such as
"negative lookahead", with CMake's regular expression engine.

Output of "ctest -N" is unchanged by this commit.

This functionality will be used soon (see next commits).

Patch from Kornel Benko.

(cherry picked from commit 10cd5dd223)
2018-01-15 16:58:59 -05:00
Scott Kostyshak
b40e58d641 ctests: invert tests for Arabic splash
The Arabic splash only compiles with XeTeX + system fonts.

(cherry picked from commit 291d2f1037)
2017-12-18 23:33:22 -05:00
Scott Kostyshak
7ea9210853 Uninvert Japanese tests after fix to #8823
The export ja/lilypond_pdf fails because ps2pdf gives an error. It
is thus still inverted, under the category 'externalissues'. As
Jürgen discovered, ps2pdf succeeds if the -dNOSAFER flag is used.

Note that Kornel is seeing strange behavior with the sweave test,
and thus the label of that test might be changed soon (e.g. to
"unreliable"). For discussion, see:

https://www.mail-archive.com/search?l=mid&q=20171001032524.fr5xfngylththwv2%40steph
(cherry picked from commit 0c7e5c115d)
2017-10-07 22:40:05 -04:00
Kornel Benko
9f5f4e2aa0 cmake tests: Try to use valid locales for testing 2017-10-03 22:09:06 +02:00
Kornel Benko
9a42154107 Cmake export tests: Ignore missing glyphs also for doc/(fr|es)/UserGuide 2017-08-12 14:08:12 +02:00
Kornel Benko
37bcf5392a keytests: Allow for checking multiple log files
Handle name may be arbitrary string mathing '[A-Za-z0-9]*'.
This is then used by appending to the commands for the control file.
For instance select 'Alpha' as handle for the control file 'abc'
'COAlpha: abc' ==> open 'abc' for write
'CCAlpha:' ==> close 'abc'
2017-08-04 11:56:19 +02:00
Kornel Benko
401b54b3f6 ctests: eu_UserGuide_pdf[25] compiles again 2017-07-27 13:39:16 +02:00
Kornel Benko
3cc78bba75 Cmake export tests: Ignore missing glyphs also for doc/de/UserGuide 2017-07-26 12:39:46 +02:00
Kornel Benko
a550f7d91e Cmake export tests: Ignore missing glyphs on some tests
Could not find a suitable tex font for the following tests:
	export/doc/uk/Intro_pdf4_texF
	export/examples/uk/splash_pdf4_texF
	export/examples/minted-filelisting_pdf4_texF
2017-06-27 10:26:27 +02:00
Kornel Benko
195e55d3f4 Cmake export tests: Adapt to minted listings
1.) Handle also 'LatexCommand inputminted' in lyxStatus.pm
2.) Add '-shell-escape' to the appropriate converters.
  This applies only to the ctest-environment iff calling
  the script 'prefTest.pl' in the build directory.
2017-06-16 11:39:26 +02:00
Kornel Benko
bf62343924 Cmake export tests: Ignore some acmart tests for now 2017-06-01 11:07:22 +02:00
Kornel Benko
9e0b09e0a1 keytests: Do not save the session info in bug-10636-test
Otherwise the following tests start with 'display source code' enabled.
2017-05-29 13:53:39 +02:00
Kornel Benko
03df04fd3b Add test for #10636 (fixed in master) 2017-05-27 19:54:59 +02:00
Kornel Benko
ca40fdc569 keytests: Add a small delay to each special key
keytest.py: This gives the os some time to update the status.
  All keys with modifier and all possible shortcuts are affected.

Shortcut use corrected in findadv-11-in.txt and findadv-17-in.txt
2017-05-27 11:18:58 +02:00
Kornel Benko
d547ef7c5e keytests: rewritten testcases to use the new searching engine searchPatterns.pl 2017-05-24 16:29:32 +02:00
Kornel Benko
c03d2f17e9 keytests: Adapt to new shortcuts.
Also, due to resolved shortcut clash in slovak gui, there is now no need to
select 'search whole words' twice.
(\Ac\Ac ==> \Ae)
2017-05-22 18:42:44 +02:00
Kornel Benko
176670fc56 keytests: Move shortcut handling into own class 2017-05-22 08:49:26 +02:00
Kornel Benko
b5229cc5a2 keytests: Wrong check for empty key in associative array 2017-05-21 18:38:48 +02:00
Kornel Benko
fa3e656af7 keytests: Implemented use of additional shortcuts in keytest.py
Now, before starting a test with 'TestBegin' in any *-in.txt file
we can create ne shortcuts used by this test.
Defining a shortcut:
	UseShortcut "<shortcut>" "<function>"
Actually adding the new shortcuts to be used by the next lyx-session:
	PrepareShortcuts

Use example is found in findadv-combined-in.txt
The UseShortcut-entries will be traslated into '\bind "<shortcut>" "<function>"'
and with the PrepareShortcuts-entry added to the active use file 'user.bind'
2017-05-21 12:55:47 +02:00
Kornel Benko
7c72823061 keytests: Shorten the output of wrong matches to 10 lines 2017-05-19 12:58:32 +02:00
Kornel Benko
b8eecc2108 keytests: amend 8f74cac381 2017-05-19 12:56:43 +02:00
Kornel Benko
0abdc3dd59 keytests: Handle function-keys for xvkbd too
Function keys are sent to xvkbd as e.g. \[F15], so we should
not split a sequence like "\C\[F15]" into two text pieces.
(Do it like other keys not having a digit in their name (e.g. \[Return]) )
2017-05-19 12:52:59 +02:00
Kornel Benko
8f74cac381 keytests: Add more controls for the *-in.txt files
The controls are described in hello-world-in.txt as
Cr: not expected regex search pattern before next expected match
Cp: not expected search pattern before next expected match

See also findadv-re-04-in.txt for an example
In this test-case, searching for case sensitive and format considering
search is failing.
2017-05-18 13:05:36 +02:00
Kornel Benko
46e472dcf9 keytests: Allow controlfile (used by searchPatterns.pl) to be opened for 'append'
This allows collecting search strings of multiple tests in one file
2017-05-18 00:03:50 +02:00
Scott Kostyshak
8180b9f97c ctests: invert doc/fr/EmbeddedObjects_pdf4_texF
This test started failing after 8bf3d7bb. I did not look deeply into
why, because the corresponding de and es tests were already
inverted, and because in general we do not expect texF tests to work
well.
2017-05-17 15:18:29 -04:00
Kornel Benko
3bdffab7c8 keytests: Polishing 2017-05-17 13:52:54 +02:00
Kornel Benko
09e5acba11 keytests: Rewritten to use searchPatterns.pl instead of pcregrep
Also corrected output of keytest.py. Messages from called
programs were output to stdout wile own printed messages
were still cached.
2017-05-17 12:12:55 +02:00
Kornel Benko
80bc39ebc9 keytests: Extend the search algorithm to pattern with more as 2 lines 2017-05-16 16:45:18 +02:00
Kornel Benko
9b14eb16f5 keytests: Use flush stdout before exiting
Without the flush, often messages are lost at test-end
2017-05-16 13:01:43 +02:00
Kornel Benko
d870a0f2fd keytests: Added some new controls for the *-in.txt files
The controls are described in hello-world-in.txt as
CO: for control file open for write
CN: control notice
CP: simple search pattern
CR: regex search pattern
CC: close control file

The control-file will be used at the end of test by searchPatterns.pl
2017-05-16 09:16:18 +02:00
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
Scott Kostyshak
00f7a95f62 ctests: invert acmart check_load test
The root issue is known and was reported to maintainer.
2017-05-14 04:30:14 -04:00
Scott Kostyshak
ce390c4e49 ctests: adapt patterns to file move
ACM-siggraph was moved to obsolete folder at 5608f6fd.
2017-05-14 04:24:17 -04:00
Kornel Benko
d06191c990 keytests: Polishing the shutdown of lyx at test-end 2017-05-12 22:32:49 +02:00
Kornel Benko
d9464bfcd6 keytests: Make reading of /proc for lyx-status more robust
Often the relevant entry (e.g. /proc/xxxx/status) exists,
but is empty. This led to many tests fail, mostly at
the first tests after the start of the OS.
2017-05-12 13:55:51 +02:00
Kornel Benko
c200e49d67 keytests: Print proc-info in case lyx_status() signals "dead" 2017-05-12 11:22:05 +02:00
Kornel Benko
6afd654bb6 keytests: more tweaking
Tested with QT5.7 QT5.8 (self compiled) and QT4.8
2017-05-11 00:00:42 +02:00
Kornel Benko
bfc0b09e0c keytests: Added debug 'key' to be able to analyse test results.
There still are keys which do not make it into the lyx logfile.
For instance repeated shortcuts.
2017-05-09 21:08:52 +02:00
Kornel Benko
afd32f7843 keytests: some tweaking 2017-05-09 21:07:35 +02:00