1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
8 \options BCOR8mm,captions=tableheading
9 \use_default_options false
13 \maintain_unincluded_children false
15 \language_package default
18 \font_roman "lmodern" "default"
19 \font_sans "lmss" "default"
20 \font_typewriter "lmtt" "default"
21 \font_math "auto" "auto"
22 \font_default_family default
23 \use_non_tex_fonts false
26 \font_sf_scale 100 100
27 \font_tt_scale 100 100
29 \default_output_format pdf2
31 \bibtex_command default
32 \index_command default
36 \pdf_title "LyX's Development manual"
37 \pdf_author "LyX Team"
38 \pdf_subject "LyX's development documentation"
39 \pdf_keywords "LyX, Documentation, Development"
41 \pdf_bookmarksnumbered true
42 \pdf_bookmarksopen true
43 \pdf_bookmarksopenlevel 1
48 \pdf_pdfusetitle false
49 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
52 \use_package amsmath 1
53 \use_package amssymb 1
56 \use_package mathdots 1
57 \use_package mathtools 0
59 \use_package stackrel 0
60 \use_package stmaryrd 0
61 \use_package undertilde 0
63 \cite_engine_type default
67 \paperorientation portrait
71 \notefontcolor #0000ff
78 \paragraph_separation indent
79 \paragraph_indentation default
80 \quotes_language english
83 \paperpagestyle headings
84 \tracking_changes false
94 Developing \SpecialChar LyX
98 \begin_layout Subtitle
103 by the \SpecialChar LyX
108 \begin_layout Plain Layout
110 If you have comments or error corrections, please send them to the \SpecialChar LyX
113 \begin_inset Flex Code
116 \begin_layout Plain Layout
118 <lyx-docs@lists.lyx.org>
131 \begin_layout Standard
132 \begin_inset CommandInset toc
133 LatexCommand tableofcontents
140 \begin_layout Section
144 \begin_layout Standard
145 This manual documents some aspects of \SpecialChar LyX
147 It is currently rather incomplete, but will hopefully be extended in the
149 Meanwhile, additional information can be found in the
150 \begin_inset Flex Code
153 \begin_layout Plain Layout
159 subfolder of the \SpecialChar LyX
160 source code distribution.
161 This document is not translated, since the development language of \SpecialChar LyX
164 If you want to use \SpecialChar LyX
165 you don't need to read this manual.
166 However, if you want to learn more about how \SpecialChar LyX
167 is developed, or even want
168 to participate in \SpecialChar LyX
169 development, you may find some interesting information.
172 \begin_layout Section
176 \begin_layout Standard
178 uses several custom file formats for configuration files and documents.
179 This chapter contains some background concerning these file formats.
180 Several file formats are also described in detail in the regular user documenta
184 \begin_layout Subsection
188 \begin_layout Subsection
189 When is an update of the .lyx file format number needed?
190 \begin_inset CommandInset label
192 name "sec:When-is-an"
199 \begin_layout Standard
200 When you are working on a new feature you may ask yourself whether it needs
201 an update of the .lyx file format number.
202 Whether an update is needed or not is not always obvious.
203 Below you can find a list of reasons for file format updates with explanations:
206 \begin_layout Description
215 setting Whenever you introduce a new setting that is stored in the document
216 header, a file format update is needed.
217 This is also true if you add a new valid value to an existing setting,
219 \begin_inset space \thinspace{}
223 \begin_inset space \space{}
226 a new language that is stored in
227 \begin_inset Flex Code
230 \begin_layout Plain Layout
241 \begin_layout Description
250 setting If a certain setting becomes obsolete and gets removed, a file format
254 \begin_layout Description
259 inset Of course a new inset requires a file format update.
262 \begin_layout Description
267 style in any layout file or module shipped with \SpecialChar LyX
268 , or new shipped layout
270 These requirements are currently under discussion and might change in the
274 \begin_layout Description
287 package Any new math package that is automatically loaded needs a file format
289 The reason for this is that there is no true ERT inset for math formulas:
290 Each command is parsed, and if a user happens to define a local command
291 with the same name as a command that triggers an automatic load of a package,
292 he needs to be able to switch off the automatic loading of that package.
293 This switch is stored by the
294 \begin_inset Flex Code
297 \begin_layout Plain Layout
306 \begin_layout Standard
307 If you are still unsure, please ask on the development list.
310 \begin_layout Subsection
311 How to update the file format number of .lyx files
312 \begin_inset CommandInset label
314 name "subsec:update_lyx_files"
321 \begin_layout Standard
322 Once you came to the conclusion that a file format update is needed you
323 should use the following procedure to perform the update:
326 \begin_layout Enumerate
327 Implement and test the new feature, including the reading and writing of
329 Note that any file produced at this stage does not use a valid format,
330 so do not use this version of \SpecialChar LyX
331 for working on any important documents.
334 \begin_layout Enumerate
335 \begin_inset CommandInset label
337 name "enu:Describe_format"
341 Describe the new format in
342 \begin_inset Flex Code
345 \begin_layout Plain Layout
354 \begin_layout Enumerate
355 Update the \SpecialChar LyX
356 file format number in
357 \begin_inset Flex Code
360 \begin_layout Plain Layout
369 \begin_layout Enumerate
370 Update the range of file formats in the array
371 \begin_inset Flex Code
374 \begin_layout Plain Layout
381 \begin_inset Flex Code
384 \begin_layout Plain Layout
393 \begin_layout Enumerate
394 \begin_inset CommandInset label
396 name "enu:Add-an-entry"
400 Add an entry to both format lists (for conversion and reversion) in
401 \begin_inset Newline newline
405 \begin_inset Flex Code
408 \begin_layout Plain Layout
409 lib/lyx2lyx/lyx_2_2.py
415 Add a conversion routine if needed (e.
416 \begin_inset space \thinspace{}
420 \begin_inset space \space{}
423 a new header setting always needs a conversion that adds the new setting,
424 a new document language does not need one).
425 Add a reversion routine if needed.
426 While the conversion routine is required to produce a document that is
427 equivalent to the old version, the requirements of the reversion are not
429 If possible, try to produce a proper reversion, using ERT if needed, but
430 for some features this might be too complicated.
431 In this case, the minimum requirement of the reversion routine is that
432 it produces a valid document which can be read by an older \SpecialChar LyX
434 If absolutely needed, even data loss is allowed for the reversion.
437 \begin_layout Enumerate
438 Since tex2lyx has several implicit file format dependencies caused by sharing
439 code with \SpecialChar LyX
440 , updating the file format of .lyx files produced by tex2lyx at
441 the same time as updating the main .lyx file format is strongly recommended.
442 Therefore, a compiler warning will be issued if the \SpecialChar LyX
443 and tex2lyx .lyx file
444 format numbers differ.
445 In many cases the tex2lyx update requires only the first and last item
447 \begin_inset Separator parbreak
454 \begin_layout Enumerate
455 Update the tex2lyx file format number in
456 \begin_inset Flex Code
459 \begin_layout Plain Layout
468 \begin_layout Enumerate
469 If the lyx2lyx conversion from the old to the new format is empty, or if
470 tex2lyx does not yet output the changed feature, you do not need any further
472 Otherwise, search for the changed feature in tex2lyx, and adjust the output
473 according to the lyx2lyx changes.
476 \begin_layout Enumerate
477 Update the tex2lyx test references as described in
478 \begin_inset CommandInset ref
479 LatexCommand formatted
480 reference "sec:Updating-test-references"
488 \begin_layout Enumerate
489 If you did not implement full tex2lyx support of the new feature, add a
491 \begin_inset Flex Code
494 \begin_layout Plain Layout
500 describing the missing bits.
501 Note that it is perfectly fine if you do not add full tex2lyx support for
502 a new feature: The updating recommendation above is only issued for the
503 syntax of the produced .lyx file.
504 It is no problem if some features supported by \SpecialChar LyX
505 are still output as ERT
506 by tex2lyx, since the problems in the past that resulted in the update
507 recommendation were related to mixed version syntax, not ERT.
510 \begin_layout Enumerate
511 It would be nice if you could create a .lyx test file which contains instances
512 of all changed or added features.
513 This could then be used to test lyx2lyx and tex2lyx.
514 Unfortunately it has not yet been decided how to collect such examples,
515 so please ask on the development list if you want to create one.
518 \begin_layout Enumerate
519 \begin_inset CommandInset label
521 name "enu:updatefiles"
525 Update LyX's .lyx documentation files to the new format.
526 The developer who makes the change knows best what changes to expect when
527 inspecting the resulting diff.
528 Because of this, you might be able to catch a bug in the lyx2lyx code that
529 updates the format just by taking a quick scan through the large diff that
531 \begin_inset Note Note
534 \begin_layout Plain Layout
535 Another advantage is that if later we suspect a bug in lyx2lyx we can easily
536 see which layout update made an unexpected change by looking at the git
537 log of a .lyx file that suffers the problem.
543 To do this, first make sure that there are no changes to the git repository
544 that you will not want to commit (this is needed because it will be convenient
545 to commit with the command
546 \begin_inset Flex Code
549 \begin_layout Plain Layout
556 Then run the following command in the root folder of the source:
557 \begin_inset Flex Code
560 \begin_layout Plain Layout
561 python development/tools/updatedocs.py
567 Look at the resulting changes using the command
568 \begin_inset Flex Code
571 \begin_layout Plain Layout
578 If anything looks surprising, please investigate.
579 Keep in mind that the case of
580 \begin_inset Flex Code
583 \begin_layout Plain Layout
589 is special, because it is first generated with
590 \begin_inset Flex Code
593 \begin_layout Plain Layout
599 before being converted to the latest format.
600 Finally, commit using
601 \begin_inset Flex Code
604 \begin_layout Plain Layout
613 \begin_layout Subsection
614 Updating the file format number of layout files
617 \begin_layout Standard
619 \begin_inset CommandInset ref
621 reference "enu:updatefiles"
626 \begin_inset CommandInset ref
628 reference "subsec:update_lyx_files"
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
642 command, use this command:
643 \begin_inset Flex Code
646 \begin_layout Plain Layout
647 python development/tools/updatelayouts.py
655 \begin_layout Standard
656 Note that we do not update the local layout of our
657 \begin_inset Flex Code
660 \begin_layout Plain Layout
666 files because users would then not be able to export to older formats.
667 For example, if a 2.2.0 user exported a template to 2.1.x format and tried
668 to open the file in LyX 2.1.x, there would be an error because the file would
669 contain a local layout whose format is too new.
670 The root reason for this is that we do not support converting layouts to
671 older layout formats, as we do for the
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
684 \begin_layout Subsection
685 Updating the file format number of bind/ui files
688 \begin_layout Standard
689 A change to the functionality of existing LFUNs can require a conversion
691 \begin_inset Flex Code
694 \begin_layout Plain Layout
701 \begin_inset Flex Code
704 \begin_layout Plain Layout
710 files, and therefore an increment of the LFUN format, as well as a conversion
712 \begin_inset Flex Code
715 \begin_layout Plain Layout
722 The latter cannot be done automatically and requires also a \SpecialChar LyX
725 someone who might have made a set of \SpecialChar LyX
726 teaching manuals for use in their
731 \begin_layout Plain Layout
732 \begin_inset Flex URL
735 \begin_layout Plain Layout
737 http://www.lyx.org/trac/ticket/9794
750 \begin_layout Enumerate
751 Increment the LFUN file format number in
752 \begin_inset Flex Code
755 \begin_layout Plain Layout
764 \begin_layout Enumerate
765 Implement the LFUN conversion in
766 \begin_inset Flex Code
769 \begin_layout Plain Layout
770 lib/scripts/prefs2prefs_lfuns.py
778 \begin_layout Enumerate
780 \begin_inset CommandInset ref
782 reference "enu:updatefiles"
787 \begin_inset CommandInset ref
789 reference "subsec:update_lyx_files"
794 \begin_inset Flex Code
797 \begin_layout Plain Layout
803 command, use this command:
804 \begin_inset Flex Code
807 \begin_layout Plain Layout
808 bash development/tools/updatelfuns.sh
816 \begin_layout Enumerate
817 Update Info insets in
818 \begin_inset Flex Code
821 \begin_layout Plain Layout
828 To do so, increment the \SpecialChar LyX
829 format and proceed as in
830 \begin_inset CommandInset ref
832 reference "subsec:update_lyx_files"
837 \begin_inset CommandInset ref
839 reference "enu:Describe_format"
844 \begin_inset CommandInset ref
846 reference "enu:updatefiles"
851 In the lyx2lyx implementation (
852 \begin_inset CommandInset ref
854 reference "enu:Add-an-entry"
858 th step), implement a conversion similar to the one in
859 \begin_inset Flex Code
862 \begin_layout Plain Layout
868 above, as well as a corresponding reversion; for this one can use
869 \begin_inset Flex Code
872 \begin_layout Plain Layout
879 \begin_inset Flex Code
882 \begin_layout Plain Layout
883 lib/lyx2lyx/lyx2lyx_tools.py
892 \begin_layout Subsection
893 Backporting new styles to the stable version
896 \begin_layout Standard
897 Starting with the stable \SpecialChar LyX
898 2.1 branch, there is a mechanism in place to backport
899 new styles to the stable version without the need to update the file format.
900 The basic idea is that the new style definition is automatically copied
901 to the document preamble, so that it can even be used by older minor revisions
902 that did not yet include the style.
903 To backport a new style to the stable version, the following steps are
907 \begin_layout Enumerate
909 \begin_inset Flex Code
912 \begin_layout Plain Layout
918 to the style definition in the development version.
921 \begin_layout Enumerate
922 Copy the style definition to the stable version, but use
923 \begin_inset Flex Code
926 \begin_layout Plain Layout
933 If needed adjust the format to the one used by the stable version (see
934 the customization manual for details of the layout file format).
937 \begin_layout Enumerate
938 For each update of the style in a later stable version, increase the argument
940 \begin_inset Flex Code
943 \begin_layout Plain Layout
949 by one (in the stable version, the development version should not be touched).
952 \begin_layout Standard
953 For details about the
954 \begin_inset Flex Code
957 \begin_layout Plain Layout
963 flag see the customization manual.
965 \begin_inset Flex Code
968 \begin_layout Plain Layout
974 support is needed for backported styles: Since the style of the development
975 version has an infinite version number, it will always be used.
976 Furthermore, since its version number is less than one, the style will
977 not be written anymore to the document header for files saved by the new
981 \begin_layout Standard
982 \begin_inset Newpage newpage
988 \begin_layout Section
992 \begin_layout Standard
993 Automated tests are an important tool to detect bugs and regressions in
994 software development.
995 Some projects like gcc even require each bug fix to be accompanied by a
996 test case for the automatic test suite, that would detect this bug.
997 Testing interactive features automatically is of course very hard, but
998 core functionality like document import and export can be tested quite
999 easily, and some tests of this kind exist.
1002 \begin_layout Subsection
1006 \begin_layout Standard
1007 There are attempts to set up a suite of unit tests for LyX.
1010 \begin_layout Standard
1011 TODO: describe what is done and what is still to do.
1014 \begin_layout Subsection
1018 \begin_layout Standard
1019 The tex2lyx tests are located in the
1020 \begin_inset Flex Code
1023 \begin_layout Plain Layout
1029 subfolder of the \SpecialChar LyX
1030 source code distribution.
1031 The actual testing is performed by the simple python script
1032 \begin_inset Flex Code
1035 \begin_layout Plain Layout
1036 src/tex2lyx/test/runtests.py
1042 Each test consists of two files:
1043 \begin_inset Flex Code
1046 \begin_layout Plain Layout
1052 contains the \SpecialChar LaTeX
1053 code that should be tested.
1055 \begin_inset Flex Code
1058 \begin_layout Plain Layout
1064 contains the expected output of tex2lyx.
1065 When a test is run, the actual produced output is compared with the stored
1067 The test passes if both are identical.
1068 The test machinery is also able to generate a file
1069 \begin_inset Flex Code
1072 \begin_layout Plain Layout
1078 by exporting the produced .lyx file with \SpecialChar LyX
1080 This may be useful for roundtrip comparisons.
1083 \begin_layout Subsubsection
1087 \begin_layout Standard
1088 The tex2lyx tests can be run in several ways.
1090 \begin_inset Flex Code
1093 \begin_layout Plain Layout
1099 subfolder of the build directory, the commands
1100 \begin_inset Flex Code
1103 \begin_layout Plain Layout
1109 (cmake, all platforms),
1110 \begin_inset Flex Code
1113 \begin_layout Plain Layout
1119 (cmake, when using a make based build system and not MSVC) or
1120 \begin_inset Flex Code
1123 \begin_layout Plain Layout
1129 (autotools) will run the tex2lyx tests.
1130 Alternatively, in the root of the build directory, the command
1131 \begin_inset Flex Code
1134 \begin_layout Plain Layout
1140 runs all tests whose names match the regex
1141 \begin_inset Quotes eld
1145 \begin_inset Quotes erd
1149 Another way to run the tex2lyx tests in the root build directory is to
1150 instead use the command
1151 \begin_inset Flex Code
1154 \begin_layout Plain Layout
1155 ctest -L '(cmplyx|roundtrip)'
1160 , which runs all tests categorized with the label
1161 \begin_inset Quotes eld
1165 \begin_inset Quotes erd
1169 \begin_inset Quotes eld
1173 \begin_inset Quotes erd
1177 If a test fails, the differences between the expected and actual results
1178 are output in unified diff format.
1181 \begin_layout Subsubsection
1182 Updating test references
1183 \begin_inset CommandInset label
1185 name "sec:Updating-test-references"
1192 \begin_layout Standard
1193 In some cases a changed tex2lyx output is not a test failure, but wanted,
1195 \begin_inset space \thinspace{}
1199 \begin_inset space \space{}
1202 if a tex2lyx bug was fixed, or a new feature was added.
1203 In these cases the stored references need to be updated.
1204 To do so if using autotools, call
1205 \begin_inset Flex Code
1208 \begin_layout Plain Layout
1215 \begin_inset Flex Code
1218 \begin_layout Plain Layout
1224 subdirectory of the build directory.
1225 If instead using CMake, call
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1230 make updatetex2lyxtests
1235 in the build directory or in the
1236 \begin_inset Flex Code
1239 \begin_layout Plain Layout
1245 subdirectory of the build directory.
1249 \begin_layout Plain Layout
1250 Note that this is a case where a make target in the build directory can
1251 affect the source directory, which might not be advisable.
1256 On Windows do the following:
1259 \begin_layout Itemize
1260 Assure that the path to the python.exe is in your system PATH variable.
1263 \begin_layout Itemize
1264 Double-click on the file
1265 \begin_inset Flex Code
1268 \begin_layout Plain Layout
1269 updatetex2lyxtests.vcxproj
1274 in the build directory or in the
1275 \begin_inset Flex Code
1278 \begin_layout Plain Layout
1284 subdirectory of your build directory.
1287 \begin_layout Itemize
1288 In the appearing MSVC program right-click on the project
1292 in the project explorer and chose
1299 \begin_layout Standard
1300 For convenience, these commands also produce re-exported roundtrip .lyx.tex
1302 Please examine the changed output carefully before committing the changed
1303 files to the repository: Since the test machinery does not do a roundtrip
1305 \begin_inset Formula $\Rightarrow$
1309 \begin_inset Formula $\Rightarrow$
1312 .tex, and does not compare the produced dvi or pdf output, it assumes that
1313 the stored .lyx reference produces correct output if processed by \SpecialChar LyX
1315 There is only one chance to detect wrong output: before committing a new
1317 Once it is committed, it is quite difficult to verify whether it is correct.
1320 \begin_layout Standard
1325 update the test references by opening them with \SpecialChar LyX
1326 or directly running lyx2lyx
1328 This would not work, since lyx2lyx and \SpecialChar LyX
1329 produce slightly different files
1330 regarding insignificant whitespace and line breaks.
1333 \begin_layout Subsubsection
1337 \begin_layout Standard
1338 In many cases tests for new features may be added to one of the existing
1339 test files, but sometimes this is not possible or not wanted.
1340 Then a new test file needs to be added:
1343 \begin_layout Enumerate
1345 \begin_inset Flex Code
1348 \begin_layout Plain Layout
1349 src/tex2lyx/test/<test name>.tex
1354 and run tex2lyx in roundtrip mode to produce the file
1355 \begin_inset Flex Code
1358 \begin_layout Plain Layout
1359 src/tex2lyx/test/<test name>.lyx.lyx
1365 This file will be the new reference.
1368 \begin_layout Enumerate
1369 Once you confirmed that the tex2lyx output is correct, add the new files
1370 to the corresponding lists in
1371 \begin_inset Flex Code
1374 \begin_layout Plain Layout
1375 src/tex2lyx/test/runtests.py
1381 \begin_inset Flex Code
1384 \begin_layout Plain Layout
1385 src/tex2lyx/Makefile.am
1391 \begin_inset Flex Code
1394 \begin_layout Plain Layout
1395 src/tex2lyx/test/CMakeLists.txt
1403 \begin_layout Enumerate
1404 Commit the changes to the repository, or send a patch to the development
1405 list and ask for committing if you do not have commit rights.
1408 \begin_layout Subsection
1409 ctest automatic tests
1412 \begin_layout Standard
1413 Some tests are located in the
1414 \begin_inset Flex Code
1417 \begin_layout Plain Layout
1418 development/autotests/
1423 subfolder of the \SpecialChar LyX
1424 source code distribution.
1429 \begin_layout Plain Layout
1430 The README document in this folder only describes the
1431 \begin_inset Quotes eld
1435 \begin_inset Quotes erd
1438 subset of autotests!
1446 \begin_layout Standard
1447 These tests can be run by the commands
1448 \begin_inset Flex Code
1451 \begin_layout Plain Layout
1461 (all platforms) or (when using a make based build system and not MSVC)
1463 \begin_inset Flex Code
1466 \begin_layout Plain Layout
1473 \begin_inset Flex Code
1476 \begin_layout Plain Layout
1487 The test logs are written to the
1488 \begin_inset Flex Code
1491 \begin_layout Plain Layout
1505 \begin_layout Subsubsection
1509 \begin_layout Standard
1510 The export tests are integration tests.
1511 They take longer to run and are more likely to break than the tex2lyx tests.
1512 Nevertheless, they have caught many regressions and without a better alternativ
1513 e it is important to keep them up-to-date and understand how they work.
1516 \begin_layout Standard
1518 \begin_inset Quotes eld
1522 \begin_inset Quotes erd
1525 documentation, template, and example documents.
1526 In addition, there are a number of dedicated sample documents in the
1527 \begin_inset Flex Code
1530 \begin_layout Plain Layout
1536 subfolder of the \SpecialChar LyX
1537 source code distribution.
1538 All samples are (after copying and eventual processing by scripts) exported
1539 to various output formats via the
1540 \begin_inset Flex Code
1543 \begin_layout Plain Layout
1549 command line option.
1550 The tests checks for errors reported by LyX.
1551 (However, error-free export is no guarantee for an error-free output document.)
1554 \begin_layout Paragraph
1555 Expectations of LyX developers
1558 \begin_layout Standard
1559 Because the export tests are integration tests and take a long time to run,
1560 LyX developers are rarely expected to run all of the tests.
1561 Here are some good practices to follow by developers:
1564 \begin_layout Itemize
1565 When making a non-trivial change to a .layout file, run the export and layout
1566 tests corresponding with that .layout file.
1569 \begin_layout Itemize
1570 When making non-trivial changes to a .lyx file, run the export tests correspondin
1571 g to that .lyx file.
1576 \begin_layout Plain Layout
1577 This rule is due to revision.
1581 \begin_layout Plain Layout
1582 There is an objection from the documentation maintainer that working on
1583 the documentation must not be complicated by having to consider non-standard
1587 \begin_layout Itemize
1588 successful compiling/testing an edited documentation file with pdflatex
1589 suffices to ensure it can be commited, not tests with other exports are
1593 \begin_layout Plain Layout
1594 If sudden failures with other exports due to “half-tested” documentation
1595 updates are a problem for the test maintainer, the test suite should use
1599 \begin_layout Itemize
1600 copied to a cache dir (autotests/samples/doc/, say) but not changed,
1603 \begin_layout Itemize
1604 updated regularely (but on a time chosen by the test suite maintainer) from
1605 the originals in lib/doc/
1608 \begin_layout Plain Layout
1612 \begin_layout Itemize
1613 no test will fail due to ongoing work on documentation,
1616 \begin_layout Itemize
1617 the documentation is still tested in full (with some delay),
1620 \begin_layout Itemize
1621 failures with non-default export can be examined and handled accordingly
1622 in one run with the cache update,
1625 \begin_layout Itemize
1626 “interesting failures” (like the nested-language+polyglossia problem in
1627 es/Customization can be separated and moved into dedicated test samples.
1635 \begin_layout Itemize
1636 When making non-trivial changes to LyX's \SpecialChar LaTeX
1638 touching the encoding code or package handling code that you expect will
1639 change the exported \SpecialChar LaTeX
1644 \begin_layout Standard
1645 \paragraph_spacing single
1646 Consider running all of the export tests before and after your change.
1647 If there are differences, please reconcile these (i.e.
1648 fix the bug or fix the tests)
1653 Ask for help if you're not sure what to.
1656 \begin_layout Standard
1657 If you do not want to run the tests,
1660 \begin_layout Itemize
1661 post the patch on the list and others will run the tests and eventually
1665 \begin_layout Itemize
1666 commit, but be prepared to fix eventually arising problems or to revert
1667 the commit if there is no easy fix.
1671 \begin_layout Itemize
1672 Understand how to interpret test failures.
1673 If your commit is found to have broken a test, you should be able to interpret
1674 the test results when made aware of them.
1676 \begin_inset CommandInset ref
1678 reference "subsec:Interpreting-export-tests"
1685 \begin_layout Paragraph
1686 \begin_inset CommandInset label
1688 name "par:export-test-output-formats"
1695 \begin_layout Standard
1696 The following output formats are currently tested for each sample document
1698 \begin_inset CommandInset ref
1700 reference "par:Export-test-filtering"
1707 \begin_layout Labeling
1708 \labelwidthstring 00.00.0000
1713 \begin_layout Labeling
1714 \labelwidthstring 00.00.0000
1715 lyx16 LyX 1.6 file format (lyx2lyx)
1718 \begin_layout Labeling
1719 \labelwidthstring 00.00.0000
1720 lyx21 LyX 2.1 file format (lyx2lyx)
1723 \begin_layout Labeling
1724 \labelwidthstring 00.00.0000
1725 xhtml LyXHTML (native LyX HTML export)
1729 \begin_layout Labeling
1730 \labelwidthstring 00.00.0000
1732 \begin_inset space ~
1736 \begin_inset space ~
1743 \begin_layout Labeling
1744 \labelwidthstring pdf5msystemFM
1745 dvi DVI (8-bit latex)
1748 \begin_layout Labeling
1749 \labelwidthstring pdf5msystemFM
1750 dvi3_texF DVI (LuaTeX with 8-bit TeX fonts)
1753 \begin_layout Labeling
1754 \labelwidthstring pdf5msystemFM
1755 dvi3_systemF DVI (LuaTeX with Unicode fonts)
1758 \begin_layout Labeling
1759 \labelwidthstring pdf5msystemFM
1763 \begin_layout Labeling
1764 \labelwidthstring pdf5msystemFM
1765 pdf4_texF PDF (XeTeX with 8-bit TeX fonts)
1768 \begin_layout Labeling
1769 \labelwidthstring pdf5msystemFM
1770 pdf4_systemF PDF (XeTeX with Unicode fonts)
1773 \begin_layout Labeling
1774 \labelwidthstring pdf5msystemFM
1775 pdf5_texF PDF (LuaTeX with 8-bit TeX fonts)
1778 \begin_layout Labeling
1779 \labelwidthstring pdf5msystemFM
1780 pdf5_systemF PDF (LuaTeX with Unicode fonts)
1784 \begin_layout Labeling
1785 \labelwidthstring 00.00.0000
1787 \begin_inset space ~
1791 \begin_inset space ~
1795 \begin_inset space ~
1799 \begin_inset space ~
1806 \begin_layout Labeling
1807 \labelwidthstring pdf5msystemFM
1808 pdf DVI -> PS (dvips) -> PDF (ps2pdf)
1811 \begin_layout Labeling
1812 \labelwidthstring pdf5msystemFM
1813 pdf3 DVI -> PDF (dvipdfm)
1817 \begin_layout Labeling
1818 \labelwidthstring 00.00.0000
1820 \begin_inset space ~
1823 tested: (or only if set as default output format in the document source)
1827 \begin_layout Labeling
1828 \labelwidthstring pdf5msystemFM
1832 \begin_layout Labeling
1833 \labelwidthstring pdf5msystemFM
1834 luatex LaTeX (LuaTeX)
1837 \begin_layout Labeling
1838 \labelwidthstring pdf5msystemFM
1839 dviluatex LaTeX (dviluatex)
1842 \begin_layout Labeling
1843 \labelwidthstring pdf5msystemFM
1844 pdflatex LaTeX (pdflatex)
1847 \begin_layout Labeling
1848 \labelwidthstring pdf5msystemFM
1849 platex LaTeX (pLaTeX)
1852 \begin_layout Labeling
1853 \labelwidthstring pdf5msystemFM
1857 \begin_layout Labeling
1858 \labelwidthstring pdf5msystemFM
1859 eps3 EPS (encapsulated Postscript) (cropped)
1862 \begin_layout Labeling
1863 \labelwidthstring pdf5msystemFM
1864 ps DVI -> Postscript (dvips)
1867 \begin_layout Labeling
1868 \labelwidthstring pdf5msystemFM
1872 \begin_layout Labeling
1873 \labelwidthstring pdf5msystemFM
1874 text (nor text2, ..., text4)
1877 \begin_layout Labeling
1878 \labelwidthstring pdf5msystemFM
1882 \begin_layout Labeling
1883 \labelwidthstring pdf5msystemFM
1887 \begin_layout Labeling
1888 \labelwidthstring pdf5msystemFM
1892 \begin_layout Labeling
1893 \labelwidthstring pdf5msystemFM
1898 \begin_layout Paragraph
1899 \begin_inset CommandInset label
1901 name "par:Configuring-ctests"
1905 Configuring the tests
1908 \begin_layout Standard
1909 To enable the export autotests, add the
1910 \begin_inset Flex Code
1913 \begin_layout Plain Layout
1914 -DLYX_ENABLE_EXPORT_TESTS=ON
1923 \begin_layout Standard
1924 \begin_inset Flex Code
1927 \begin_layout Plain Layout
1928 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1936 \begin_layout Standard
1938 This flag will increase the time for the cmake command by several seconds,
1939 mainly because of the process of inverting tests (see Section
1940 \begin_inset CommandInset ref
1942 reference "subsec:Interpreting-export-tests"
1949 \begin_layout Paragraph
1950 \begin_inset CommandInset label
1952 name "par:ctest-options"
1959 \begin_layout Standard
1960 To run all tests, in the build directory simply run the command
1961 \begin_inset Flex Code
1964 \begin_layout Plain Layout
1971 A full, up-to-date TeXLive installation is recommended to run the tests.
1972 Otherwise, some tests will fail.
1973 Tests with additional requirements are labeled
1974 \begin_inset Quotes eld
1977 unreliable:nonstandard
1978 \begin_inset Quotes erd
1985 \begin_layout Standard
1986 To run only some of the tests, use command line options (see examples below):
1989 \begin_layout Labeling
1990 \labelwidthstring -R
1991 \begin_inset Flex Code
1994 \begin_layout Plain Layout
2000 Run only the tests whose names match the given regular expression.
2003 \begin_layout Labeling
2004 \labelwidthstring -R
2005 \begin_inset Flex Code
2008 \begin_layout Plain Layout
2014 Run only the tests whose labels match the given regular expression.
2015 A test may have more that one label.
2019 \begin_layout Labeling
2020 \labelwidthstring -R
2021 \begin_inset Flex Code
2024 \begin_layout Plain Layout
2030 Exclude the tests whose names match the given regular expression.
2033 \begin_layout Labeling
2034 \labelwidthstring -R
2035 \begin_inset Flex Code
2038 \begin_layout Plain Layout
2044 Exclude the tests whose labels match the given regular expression.
2045 Cannot be combined with
2046 \begin_inset Flex Code
2049 \begin_layout Plain Layout
2058 \begin_layout Standard
2059 The following options help to find good selection patterns:
2062 \begin_layout Labeling
2063 \labelwidthstring -R
2064 \begin_inset Flex Code
2067 \begin_layout Plain Layout
2073 List the tests that would be run but not actually run them.
2078 \begin_layout Standard
2079 Useful in conjunction with the -R, -L, -E and -LE options, e.g., if you want
2080 to know how many tests there are or whether your
2081 \begin_inset Flex Code
2084 \begin_layout Plain Layout
2090 regular expression did what you expected.
2094 \begin_layout Labeling
2095 \labelwidthstring -R
2096 \begin_inset Flex Code
2099 \begin_layout Plain Layout
2100 \SpecialChar nobreakdash
2101 \SpecialChar nobreakdash
2107 print the list of all labels associated with the test set.
2108 Can also be combined with -R, -L, -E, ...
2112 \begin_layout Standard
2113 Other useful options are:
2116 \begin_layout Labeling
2117 \labelwidthstring -R
2118 \begin_inset Flex Code
2121 \begin_layout Plain Layout
2127 Run the tests in parallel using the given number of jobs.
2131 \begin_layout Standard
2132 We are still working on getting the tests to run in parallel.
2133 However, when running the tests in parallel, sometimes tests fail that
2134 pass when run sequentially.
2135 A reasonable approach is to first run the tests in parallel and then run
2136 the failed tests sequentially.
2139 \begin_layout Standard
2140 For example, to run 8 jobs at a time:
2143 \begin_layout Standard
2144 \begin_inset Flex Code
2147 \begin_layout Plain Layout
2156 \begin_layout Standard
2157 \begin_inset Flex Code
2160 \begin_layout Plain Layout
2161 ctest \SpecialChar nobreakdash
2162 \SpecialChar nobreakdash
2171 \begin_layout Standard
2172 When specifying a subset of the tests (e.g.
2174 \begin_inset Flex Code
2177 \begin_layout Plain Layout
2178 \SpecialChar nobreakdash
2184 ), the same subset must be specified when using the
2185 \begin_inset Flex Code
2188 \begin_layout Plain Layout
2189 \SpecialChar nobreakdash
2190 \SpecialChar nobreakdash
2196 option because it is the test numbers that are used to index which tests
2197 failed on the previous run.
2200 \begin_layout Standard
2202 Note that some tests cannot be run in parallel.
2203 These tests are marked in the code with the
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2218 \begin_layout Labeling
2219 \labelwidthstring -R
2220 \begin_inset Flex Code
2223 \begin_layout Plain Layout
2224 \SpecialChar nobreakdash
2225 \SpecialChar nobreakdash
2231 Set a global timeout on all tests that do not already have a timeout set
2236 \begin_layout Standard
2237 There have been bugs in LyX and in \SpecialChar LaTeX
2238 which cause compilation to hang, and
2239 without a timeout a test might never stop (in one case there was even a
2241 If a test times out, the
2242 \begin_inset Flex Code
2245 \begin_layout Plain Layout
2251 command exits with error, but you can distinguish between a timed out test
2252 and a failed test in the output reported at the end of the
2253 \begin_inset Flex Code
2256 \begin_layout Plain Layout
2266 \begin_layout Standard
2268 \begin_inset Flex Code
2271 \begin_layout Plain Layout
2277 ) the full list of command line options.
2280 \begin_layout Paragraph
2284 \begin_layout Itemize
2285 run only the export tests:
2286 \begin_inset Flex Code
2289 \begin_layout Plain Layout
2298 \begin_layout Itemize
2300 \begin_inset Flex Code
2303 \begin_layout Plain Layout
2304 ctest -L "inverted|suspended"
2312 \begin_layout Itemize
2313 list all export tests which match any of the labelling patterns:
2314 \begin_inset Flex Code
2317 \begin_layout Plain Layout
2328 \begin_layout Itemize
2329 exclude rarely used output formats and post-processing tests
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2334 ctest -L export -E "_(texF|dvi3|pdf3?)"
2342 \begin_layout Paragraph
2343 \begin_inset CommandInset label
2345 name "subsec:Interpreting-export-tests"
2349 Interpreting the export test results
2352 \begin_layout Standard
2353 A test can fail for several reasons, not all of them bad.
2356 \begin_layout Enumerate
2357 A new or edited sample document may be incompatible with some output formats.
2360 \begin_layout Enumerate
2361 A dependency is not met (e.g.
2362 the \SpecialChar LaTeX
2364 One hint that this is the case is that the corresponding
2365 \begin_inset Flex Code
2368 \begin_layout Plain Layout
2374 test will likely also fail.
2377 \begin_layout Enumerate
2378 An inverted test fails to fail (i.e.
2379 export that previously failed now works).
2382 \begin_layout Enumerate
2383 An external dependency was updated (e.g.
2388 \begin_layout Enumerate
2389 A recent code change introduced a bug.
2392 \begin_layout Enumerate
2393 \begin_inset CommandInset label
2399 A change in a document exposed a previously unknown bug or an incompatibility
2400 with an export format (e.g.
2401 Lua\SpecialChar LaTeX
2405 \begin_layout Standard
2406 Because the .lyx files are exported in several formats, it is not surprising
2407 that many of the exports fail.
2408 This expectation of failure is addressed by
2409 \begin_inset Quotes eld
2413 \begin_inset Quotes erd
2416 the tests, that is, by marking the test as
2417 \begin_inset Quotes eld
2421 \begin_inset Quotes erd
2424 if the export exits with error and as
2425 \begin_inset Quotes eld
2429 \begin_inset Quotes erd
2432 if the export succeeds
2437 It follows that these expected failures will not show up as failed tests
2438 in the test results and thus will not pollute the
2439 \begin_inset Quotes eld
2443 \begin_inset Quotes erd
2447 If the export actually succeeds, then the test will fail.
2448 The purpose of this failure is to get your attention—something has changed,
2449 possibly for the better.
2452 \begin_layout Standard
2453 We try to document why a test is inverted or ignored.
2454 See the comment (prefixed with
2455 \begin_inset Flex Code
2458 \begin_layout Plain Layout
2464 ) above the block in which the test is listed as inverted or ignored in
2466 \begin_inset Flex Code
2469 \begin_layout Plain Layout
2470 development/autotests/suspiciousTests
2476 \begin_inset Flex Code
2479 \begin_layout Plain Layout
2480 development/autotests/unreliableTests
2486 \begin_inset Flex Code
2489 \begin_layout Plain Layout
2490 development/autotests/ignoredTests
2499 \begin_layout Standard
2500 A good question is why do we enable the tests for non-default formats? The
2501 answer is that if a non-default route is broken it is often because a bug
2502 was introduced in LyX and not because a document-specific change was made
2503 that is not supported by the route.
2504 In other words, there is a high signal/noise ratio in the export tests
2505 for some non-default formats.
2509 \begin_layout Standard
2510 When a test or several tests fail, consider checking the files in the
2511 \begin_inset Flex Code
2514 \begin_layout Plain Layout
2520 subdirectory of your build directory.
2521 In this subdirectory are three files: the file
2522 \begin_inset Flex Code
2525 \begin_layout Plain Layout
2531 simply lists the tests that failed on your last
2532 \begin_inset Flex Code
2535 \begin_layout Plain Layout
2542 \begin_inset Flex Code
2545 \begin_layout Plain Layout
2551 file contains the output from the tests (and often has details explaining
2552 why a test failed); and the
2553 \begin_inset Flex Code
2556 \begin_layout Plain Layout
2562 file lists the times that it took to run the tests.
2565 \begin_layout Paragraph
2566 What action should you take if a test fails?
2569 \begin_layout Standard
2570 \paragraph_spacing single
2571 It is always good to check manually why something fails and if it passes
2572 if the PDF output is good.
2575 \begin_layout Itemize
2576 Generally, if a change breaks compilation for the target format (for the
2577 manuals pdf2) without solving some important other issue,
2579 fix or revert the commit
2581 that led to failure.
2584 \begin_layout Itemize
2585 If it is not possible to (immediately) fix the failure but there are reasons
2586 not to revert the commit (e.g.
2587 it fixes another more important issue),
2591 the failing test case (see
2592 \begin_inset CommandInset ref
2594 reference "par:Inverted-tests"
2601 \begin_layout Itemize
2606 test case fails because the export now works,
2610 the test by removing the labeling pattern from
2611 \begin_inset Quotes eld
2615 \begin_inset Quotes erd
2619 \begin_inset CommandInset ref
2621 reference "par:Inverted-tests"
2628 \begin_layout Itemize
2629 If the export did not fail previously but led to wrong output (PDF, say),
2630 it is in fact an improvement when the test now fails, label it as
2631 \begin_inset Quotes eld
2634 unreliable:wrong:output
2635 \begin_inset Quotes erd
2639 \begin_inset CommandInset ref
2641 reference "par:Unreliable-tests"
2648 \begin_layout Itemize
2649 In case of tests failing due to missing requirements (when only a subset
2650 of TeXLive is installed or a test labeled
2651 \begin_inset Quotes eld
2654 unreliable:nonstandard
2655 \begin_inset Quotes erd
2658 fails), ignore the failure, ask for someone else to run the test, or install
2659 the missing ressources and try again.
2662 \begin_layout Paragraph
2663 \begin_inset CommandInset label
2665 name "par:Inverted-tests"
2672 \begin_layout Standard
2673 Test cases whose name matches a pattern in the file
2674 \begin_inset Flex Code
2677 \begin_layout Plain Layout
2678 development/autotests/suspiciousTests
2688 They get also the test property
2689 \begin_inset Flex Code
2692 \begin_layout Plain Layout
2699 they are reported as failing if the export works without error
2700 \begin_inset Flex URL
2703 \begin_layout Plain Layout
2705 https://cmake.org/cmake/help/v3.0/command/set_tests_properties.html
2713 \begin_layout Standard
2714 Add failing cases to this file, if they cannot be solved
2715 \begin_inset Quotes eld
2719 \begin_inset Quotes erd
2722 but it is expected that the export will work in a foreseeable future, e.g.
2723 low priority issues like failures to export to a non-target format (for
2724 the manuals everything except pdf2).
2727 \begin_layout Standard
2728 The following sublabels are currently present in
2729 \begin_inset Flex Code
2732 \begin_layout Plain Layout
2741 \begin_layout Description
2742 todo test failures that require attention:
2746 \begin_layout Itemize
2747 minor issues to explore and properly sort later,
2750 \begin_layout Itemize
2754 \begin_layout Itemize
2755 LyX bugs to report at trac (move pattern to section "lyxbugs" once done).
2759 \begin_layout Description
2760 lyxbugs LyX bugs with a Trac number.
2763 \begin_layout Description
2764 ert Export failures due to "raw" LaTeX use in ERT or preamble code.
2768 \begin_layout Standard
2769 "Wontfix" if demonstrating correct use and OK in the default output format.
2773 \begin_layout Description
2774 texissues Export fails due to LaTeX limitations like non-ASCII characters
2775 in verbatim or listings, incompatible packages, ...
2779 \begin_layout Standard
2780 "Wontfix" if documents demonstrate correct use in the default output format:
2783 \begin_layout Itemize
2784 If the source can be made more robust without becoming "hackish", fix the
2788 \begin_layout Itemize
2789 if LyX could be enhanced to care for a permanent TeX limitation, file a
2790 ticket at trac and add a pattern under lyxbugs,
2793 \begin_layout Itemize
2794 otherwise, add a pattern here.
2798 \begin_layout Description
2799 attic Documents in the attic.
2800 (Kept for reference and format conversion test.)
2803 \begin_layout Subparagraph
2807 \begin_layout Standard
2808 Test cases whose name additionally matches a pattern in the file
2809 \begin_inset Flex Code
2812 \begin_layout Plain Layout
2813 development/autotests/suspendedTests
2831 This means they are not executed using
2832 \begin_inset Flex Code
2835 \begin_layout Plain Layout
2842 \begin_inset Flex Code
2845 \begin_layout Plain Layout
2852 However, they also get the test property
2853 \begin_inset Flex Code
2856 \begin_layout Plain Layout
2863 they are reported as failing if the export works without error.
2864 From time to time they still have to be checked using
2865 \begin_inset Flex Code
2868 \begin_layout Plain Layout
2877 \begin_layout Standard
2878 These tests are suspended, because the export fails for known reasons which
2879 cannot ATM be resolved.
2880 But it is expected the reason might disappear in the future.
2881 Be it new TL or better handling in \SpecialChar LyX
2885 \begin_layout Standard
2886 For ctest commands without the
2887 \begin_inset Flex Code
2890 \begin_layout Plain Layout
2896 parameter nothing changes.
2897 Suspended or not, tests will be executed depending only on the selecting
2898 regular expression given to the ctest command (see
2899 \begin_inset CommandInset ref
2901 reference "par:ctest-options"
2908 \begin_layout Paragraph
2909 \begin_inset CommandInset label
2911 name "par:Unreliable-tests"
2918 \begin_layout Standard
2919 Test cases whose name matches a pattern in the file
2920 \begin_inset Flex Code
2923 \begin_layout Plain Layout
2924 development/autotests/unreliableTests
2936 \begin_layout Standard
2937 These tests are not executed using
2938 \begin_inset Flex Code
2941 \begin_layout Plain Layout
2948 \begin_inset Flex Code
2951 \begin_layout Plain Layout
2961 \begin_layout Standard
2962 They pass or fail for various reasons not related to LyX (nonstandard, erratic)
2963 or pass but should rather fail (wrong output).
2965 \begin_inset Note Note
2968 \begin_layout Plain Layout
2969 *invalid* tests (wrong output) are not *unreliable*.
2970 # Use "unfit" or "unapplicable" as better label and name of pattern file?
2979 \begin_layout Description
2980 nonstandard Documents with additional requirements, e.g.
2981 a class or package file not in TeXLive.
2983 \begin_inset Note Note
2986 \begin_layout Plain Layout
2987 TODO: rename to "extra"?
2996 \begin_layout Standard
2997 These tests are labeled as
3003 \begin_layout Description
3004 erratic Tests depending on local configuration, OS, TeX distribution, package
3005 versions, or the phase of the moon.
3007 \begin_inset Note Note
3010 \begin_layout Plain Layout
3015 only for the phase-of-moon dependency?
3024 \begin_layout Standard
3025 These tests are labeled as
3031 \begin_layout Description
3033 \begin_inset space ~
3036 output Export does not fail but the resulting document has errors.
3040 \begin_layout Standard
3041 \paragraph_spacing single
3042 \begin_inset Note Note
3045 \begin_layout Plain Layout
3046 \paragraph_spacing single
3047 These tests are actually not
3055 (not measuring what they should measure).
3064 \begin_layout Paragraph
3065 \begin_inset CommandInset label
3067 name "par:Export-test-filtering"
3071 Export test filtering
3074 \begin_layout Standard
3075 The assignment of a label to a test is controlled by a set of files with
3076 regular expressions that are matched against the test names.
3079 \begin_layout Description
3080 ignoredTests (small file)
3081 \begin_inset Newline newline
3084 Tests selected here are withdrawn in the configuration step (cf.
3086 \begin_inset CommandInset ref
3088 reference "par:Configuring-ctests"
3096 \begin_layout Labeling
3097 \labelwidthstring 00.00.0000
3098 Input Test of any export combination
3101 \begin_layout Labeling
3102 \labelwidthstring 00.00.0000
3103 Output Stop if tests not selected here
3107 \begin_layout Description
3108 unreliableTests: Tests selected either pass or fail, but that is dependent
3109 on the system where the test is run.
3110 Selected tests gain the label 'unreliable'.
3114 \begin_layout Labeling
3115 \labelwidthstring 00.00.0000
3116 Input Each test which passed 'ignoredTests'
3119 \begin_layout Labeling
3120 \labelwidthstring 00.00.0000
3121 Output Stop if test selected, gain label 'unreliable'.
3125 \begin_layout Description
3127 \begin_inset space \space{}
3134 \begin_layout Labeling
3135 \labelwidthstring 00.00.0000
3136 Input Each test which passed 'unreliableTests'
3139 \begin_layout Labeling
3140 \labelwidthstring 00.00.0000
3141 Output Stop if not selected.
3144 \begin_layout Standard
3145 The following file is meant as subselections of 'suspiciousTests'.
3146 If neither subselection applies, test gains labels 'export' and 'inverted'
3149 \begin_layout Description
3150 suspendedTests Tests selected here gain the label 'suspended' but _not_
3151 'export' or 'inverted', although in ctest they remain inverted.
3152 ('ctest' knows only 'inverted' or not, labels are used only for test selection)
3156 \begin_layout Labeling
3157 \labelwidthstring 00.00.0000
3158 Input Each test selected by 'suspiciousTests'
3161 \begin_layout Labeling
3162 \labelwidthstring 00.00.0000
3163 Output Selected test gains label 'suspended'.
3169 \begin_layout Standard
3170 The following table may clarify label assignement
3173 \begin_layout Standard
3174 \begin_inset Tabular
3175 <lyxtabular version="3" rows="7" columns="12">
3176 <features tabularvalignment="middle">
3177 <column alignment="left" valignment="top" width="0pt">
3178 <column alignment="left" valignment="top" width="0pt">
3179 <column alignment="left" valignment="top" width="0pt">
3180 <column alignment="left" valignment="top" width="0pt">
3181 <column alignment="center" valignment="top">
3182 <column alignment="center" valignment="top">
3183 <column alignment="center" valignment="top">
3184 <column alignment="center" valignment="top">
3185 <column alignment="center" valignment="top">
3186 <column alignment="center" valignment="top">
3187 <column alignment="center" valignment="top">
3188 <column alignment="center" valignment="top">
3190 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3193 \begin_layout Plain Layout
3199 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3202 \begin_layout Plain Layout
3208 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3211 \begin_layout Plain Layout
3217 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3220 \begin_layout Plain Layout
3226 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3229 \begin_layout Plain Layout
3230 Marked in ctest, Assigned label
3235 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
3238 \begin_layout Plain Layout
3244 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3247 \begin_layout Plain Layout
3253 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3256 \begin_layout Plain Layout
3262 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3265 \begin_layout Plain Layout
3271 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3274 \begin_layout Plain Layout
3280 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3283 \begin_layout Plain Layout
3289 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3292 \begin_layout Plain Layout
3300 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3303 \begin_layout Plain Layout
3309 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3312 \begin_layout Plain Layout
3318 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3321 \begin_layout Plain Layout
3327 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3330 \begin_layout Plain Layout
3336 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3339 \begin_layout Plain Layout
3345 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
3348 \begin_layout Plain Layout
3354 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3357 \begin_layout Plain Layout
3363 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
3366 \begin_layout Plain Layout
3372 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3375 \begin_layout Plain Layout
3381 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
3384 \begin_layout Plain Layout
3390 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3393 \begin_layout Plain Layout
3399 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3402 \begin_layout Plain Layout
3410 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3413 \begin_layout Plain Layout
3419 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3422 \begin_layout Plain Layout
3428 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3431 \begin_layout Plain Layout
3437 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3440 \begin_layout Plain Layout
3446 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3449 \begin_layout Plain Layout
3455 <cell alignment="center" valignment="top" topline="true" usebox="none">
3458 \begin_layout Plain Layout
3464 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3467 \begin_layout Plain Layout
3473 <cell alignment="center" valignment="top" topline="true" usebox="none">
3476 \begin_layout Plain Layout
3482 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3485 \begin_layout Plain Layout
3491 <cell alignment="center" valignment="top" topline="true" usebox="none">
3494 \begin_layout Plain Layout
3500 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3503 \begin_layout Plain Layout
3509 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3512 \begin_layout Plain Layout
3520 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3523 \begin_layout Plain Layout
3529 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3532 \begin_layout Plain Layout
3538 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3541 \begin_layout Plain Layout
3547 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3550 \begin_layout Plain Layout
3556 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3559 \begin_layout Plain Layout
3565 <cell alignment="center" valignment="top" topline="true" usebox="none">
3568 \begin_layout Plain Layout
3574 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3577 \begin_layout Plain Layout
3583 <cell alignment="center" valignment="top" topline="true" usebox="none">
3586 \begin_layout Plain Layout
3592 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3595 \begin_layout Plain Layout
3601 <cell alignment="center" valignment="top" topline="true" usebox="none">
3604 \begin_layout Plain Layout
3610 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3613 \begin_layout Plain Layout
3619 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3622 \begin_layout Plain Layout
3630 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
3633 \begin_layout Plain Layout
3639 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3642 \begin_layout Plain Layout
3648 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
3651 \begin_layout Plain Layout
3657 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3660 \begin_layout Plain Layout
3666 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3669 \begin_layout Plain Layout
3675 <cell alignment="center" valignment="top" topline="true" usebox="none">
3678 \begin_layout Plain Layout
3684 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3687 \begin_layout Plain Layout
3693 <cell alignment="center" valignment="top" topline="true" usebox="none">
3696 \begin_layout Plain Layout
3702 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3705 \begin_layout Plain Layout
3711 <cell alignment="center" valignment="top" topline="true" usebox="none">
3714 \begin_layout Plain Layout
3720 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3723 \begin_layout Plain Layout
3729 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3732 \begin_layout Plain Layout
3740 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3743 \begin_layout Plain Layout
3749 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3752 \begin_layout Plain Layout
3758 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3761 \begin_layout Plain Layout
3767 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3770 \begin_layout Plain Layout
3776 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3779 \begin_layout Plain Layout
3785 <cell alignment="center" valignment="top" topline="true" usebox="none">
3788 \begin_layout Plain Layout
3794 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3797 \begin_layout Plain Layout
3803 <cell alignment="center" valignment="top" topline="true" usebox="none">
3806 \begin_layout Plain Layout
3812 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3815 \begin_layout Plain Layout
3821 <cell alignment="center" valignment="top" topline="true" usebox="none">
3824 \begin_layout Plain Layout
3830 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3833 \begin_layout Plain Layout
3839 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3842 \begin_layout Plain Layout
3850 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3853 \begin_layout Plain Layout
3859 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3862 \begin_layout Plain Layout
3868 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3871 \begin_layout Plain Layout
3877 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3880 \begin_layout Plain Layout
3886 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3889 \begin_layout Plain Layout
3895 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3898 \begin_layout Plain Layout
3904 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3907 \begin_layout Plain Layout
3913 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3916 \begin_layout Plain Layout
3922 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3925 \begin_layout Plain Layout
3931 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3934 \begin_layout Plain Layout
3940 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3943 \begin_layout Plain Layout
3949 <cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
3952 \begin_layout Plain Layout
3966 \begin_layout Subsubsection
3970 \begin_layout Standard
3971 These tests check whether a .lyx file loads without any terminal messages.
3972 They correspond to the manual operations of simply opening a .lyx file on
3973 the terminal, exiting LyX once the file is loaded, and then checking whether
3974 there is any output from the terminal.
3975 These tests are useful for catching malformed .lyx files and parsing bugs.
3976 They can also be used to find a .lyx file in which an instance of something
3978 To do this, compile LyX with a local patch that outputs something to the
3979 terminal when an instance is found, and then run the check_load tests to
3980 see if any fail, which would mean that the situation occurs in the LyX
3981 documentation files corresponding to the failed tests.
3982 These tests are expectedly fragile: any LyX diagnostic message, which is
3983 not necessarily an error, would cause the tests to fail.
3984 Similarly, any message output by a library (e.g.
3985 Qt) would also cause failure.
3986 There are some messages that the check_load tests are instructed to ignore,
3987 which are stored in the file
3988 \begin_inset Flex Code
3991 \begin_layout Plain Layout
3992 development/autotests/filterCheckWarnings
4000 \begin_layout Standard
4001 Under cmake, the tests are labeled as 'load'.
4004 \begin_layout Subsubsection
4008 \begin_layout Standard
4009 Automated tests based on the "MonKey Testing" keytest program.
4010 They are documented in the README document in
4011 \begin_inset Flex Code
4014 \begin_layout Plain Layout
4015 development/autotests
4020 subfolder of the \SpecialChar LyX
4021 source code distribution.
4025 \begin_layout Subsubsection
4029 \begin_layout Standard
4030 These tests combine lyx2lyx tests with check_load tests.
4031 They fail if either fails.
4034 \begin_layout Subsubsection
4038 \begin_layout Standard
4039 The URL tests are enabled with the
4040 \begin_inset Flex Code
4043 \begin_layout Plain Layout
4044 -DLYX_ENABLE_URLTESTS=ON
4049 CMake flag and are useful for finding broken links in our documentation
4051 If a URL test fails, to see which link in particular was reported as broken,
4053 \begin_inset Flex Code
4056 \begin_layout Plain Layout
4063 These tests are extremely fragile (e.g.
4064 a test can depend on your Internet connection) and a failed URL test should
4065 not be taken too seriously.
4066 URL tests are labeled as
4071 \begin_layout Paragraph
4075 \begin_layout Standard
4076 cmake is required to run the \SpecialChar LyX
4077 tests, running them is not implemented for
4081 \begin_layout Standard
4082 The appropriate commands are:
4085 \begin_layout Itemize
4091 \begin_inset Newline newline
4094 runs all tests with label
4099 \begin_layout Itemize
4102 ctest -R 'check_.*urls'
4105 \begin_inset Newline newline
4108 runs the tests 'check_accessible_urls'
4111 \begin_layout Standard
4112 Associated test results can be examined in ctest-log directory in files
4113 of the form 'LastFailed.*URLS.log'
4116 \begin_layout Section
4117 Development policies
4120 \begin_layout Standard
4121 This chapter lists some guidelines that should be followed.
4122 This list is not complete, and many guidelines are in separate chapters,
4124 \begin_inset Quotes eld
4127 When is an update of the .lyx file format number needed?
4128 \begin_inset Quotes erd
4132 \begin_inset CommandInset ref
4134 reference "sec:When-is-an"
4141 \begin_layout Subsection
4142 When to set a fixed milestone?
4145 \begin_layout Standard
4146 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
4150 \begin_layout Enumerate
4151 Somebody is actively working on a fix.
4154 \begin_layout Enumerate
4155 The bug is so severe that it would block the release if it is not fixed.
4158 \begin_layout Standard
4159 If a bug is important, but nobody is working on it, and it is no showstopper,
4160 use a milestone like 2.1.x or 2.2.x.
4161 For all other bugs, do not set a milestone at all.
4164 \begin_layout Subsection
4165 Can we add rc entries in stable branch?
4168 \begin_layout Standard
4170 We are supposed to increase the prefs2prefs version number with such things.
4173 \begin_layout Section
4174 Documentation policies
4177 \begin_layout Standard
4178 The main documentation consists of these files:
4181 \begin_layout Description
4182 splash.lyx it is the first file you see after an installation.
4183 We assume that a new user sees this.
4184 It is therefore designed to be as simple as possible.
4185 Therefore please don't add any new formatting, only fix typos etc.
4186 Splash.lyx is up to date for \SpecialChar LyX
4187 2.1.x, currently maintained by Uwe Stöhr.
4190 \begin_layout Description
4191 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
4193 It therefore uses a limited set of formatting.
4194 For example a standard document class.
4195 Since new users will first learn about the formatting possibilities of
4197 please keep this file that simple.
4198 Intro.lyx is up to date for \SpecialChar LyX
4199 2.1.x, currently maintained by Uwe Stöhr.
4202 \begin_layout Description
4203 Tutorial.lyx our tutorial.
4204 It must be always up to date.
4205 Normally there is nothing to add since we don't want to overwhelm new users
4206 with too much details.
4207 The will learn these details while using \SpecialChar LyX
4208 and we have special manuals.
4209 Tutorial.lyx is up to date for \SpecialChar LyX
4210 2.1.x, currently maintained by Uwe Stöhr.
4213 \begin_layout Description
4214 UserGuide.lyx our main user guide.
4215 It covers a mixture of basic and detailed information.
4216 Some information is also in the Math and EmbeddedObjects manual so that
4217 the UserGuide refers to these files.
4218 UserGuide.lyx is up to date for \SpecialChar LyX
4219 2.1.x, currently maintained by Uwe Stöhr.
4222 \begin_layout Description
4223 EmbeddedObjects.lyx a special manual to explain things like tables floats
4226 EmbeddedObjects.lyx is up to date for \SpecialChar LyX
4227 2.1.x, currently maintained by Uwe
4231 \begin_layout Description
4232 Math.lyx a special manual to explain everything regarding math in all detail.
4233 Math.lyx is up to date for \SpecialChar LyX
4234 2.1.x, currently maintained by Uwe Stöhr.
4237 \begin_layout Description
4238 Additional.lyx this manual covers information that would be too much detail
4239 for the UserGuide or would make the UserGuide uncompilable or only compilable
4240 when installing a lot of special \SpecialChar LaTeX
4242 What should be in the UserGuide or better in Additional is a matter of
4244 it is up to you to decide that.
4245 Additional.lyx is not completely up to date for \SpecialChar LyX
4248 \begin_inset space ~
4251 8 is up to date and currently maintained by Uwe Stöhr.
4252 It certainly needs a rewrite and update.
4253 For example many info in chapter
4254 \begin_inset space ~
4257 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
4261 \begin_layout Description
4262 Customization.lyx this manual covers information how to customize \SpecialChar LyX
4264 output formats, operating systems, languages etc.
4265 It is currently completely out of date and needs a major rewrite and update.
4266 If you do this please assure that your information are given for all OSes
4267 and \SpecialChar LaTeX
4268 distributions (meaning be as objective as possible).
4271 \begin_layout Standard
4273 \begin_inset space ~
4276 rules in editing the docs:
4279 \begin_layout Enumerate
4280 If you are not the maintainer of a doc file or a chapter/section, you MUST
4281 use change tracking so that the maintainer could review your changes
4284 \begin_layout Enumerate
4285 Respect the formatting of the document.
4286 The different files use different formatting styles.
4287 That is OK and has historic reasons nobody fully know ;-).
4288 But it is important to be consistent within one file.
4291 \begin_layout Enumerate
4292 All changes you make to a file in one language MUST also go the file in
4293 the other actively maintained languages.
4294 Normally the maintainer does this for you, if you are the maintainer, you
4295 must do this by copying or changing the changed or added text to the other
4296 files so that the translators sees the blue underlined text and know what
4297 they have to translate and what was changed.
4300 \begin_layout Enumerate
4301 You MUST assure that the document is compilable as
4302 \begin_inset Quotes eld
4306 \begin_inset Quotes erd