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 Describe the new format in
336 \begin_inset Flex Code
339 \begin_layout Plain Layout
348 \begin_layout Enumerate
349 Update the \SpecialChar LyX
350 file format number in
351 \begin_inset Flex Code
354 \begin_layout Plain Layout
363 \begin_layout Enumerate
364 Update the range of file formats in the array
365 \begin_inset Flex Code
368 \begin_layout Plain Layout
375 \begin_inset Flex Code
378 \begin_layout Plain Layout
387 \begin_layout Enumerate
388 Add an entry to both format lists (for conversion and reversion) in
389 \begin_inset Newline newline
393 \begin_inset Flex Code
396 \begin_layout Plain Layout
397 lib/lyx2lyx/lyx_2_2.py
403 Add a conversion routine if needed (e.
404 \begin_inset space \thinspace{}
408 \begin_inset space \space{}
411 a new header setting always needs a conversion that adds the new setting,
412 a new document language does not need one).
413 Add a reversion routine if needed.
414 While the conversion routine is required to produce a document that is
415 equivalent to the old version, the requirements of the reversion are not
417 If possible, try to produce a proper reversion, using ERT if needed, but
418 for some features this might be too complicated.
419 In this case, the minimum requirement of the reversion routine is that
420 it produces a valid document which can be read by an older \SpecialChar LyX
422 If absolutely needed, even data loss is allowed for the reversion.
425 \begin_layout Enumerate
426 Since tex2lyx has several implicit file format dependencies caused by sharing
427 code with \SpecialChar LyX
428 , updating the file format of .lyx files produced by tex2lyx at
429 the same time as updating the main .lyx file format is strongly recommended.
430 Therefore, a compiler warning will be issued if the \SpecialChar LyX
431 and tex2lyx .lyx file
432 format numbers differ.
433 In many cases the tex2lyx update requires only the first and last item
435 \begin_inset Separator parbreak
442 \begin_layout Enumerate
443 Update the tex2lyx file format number in
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
456 \begin_layout Enumerate
457 If the lyx2lyx conversion from the old to the new format is empty, or if
458 tex2lyx does not yet output the changed feature, you do not need any further
460 Otherwise, search for the changed feature in tex2lyx, and adjust the output
461 according to the lyx2lyx changes.
464 \begin_layout Enumerate
465 Update the tex2lyx test references as described in
466 \begin_inset CommandInset ref
467 LatexCommand formatted
468 reference "sec:Updating-test-references"
476 \begin_layout Enumerate
477 If you did not implement full tex2lyx support of the new feature, add a
479 \begin_inset Flex Code
482 \begin_layout Plain Layout
488 describing the missing bits.
489 Note that it is perfectly fine if you do not add full tex2lyx support for
490 a new feature: The updating recommendation above is only issued for the
491 syntax of the produced .lyx file.
492 It is no problem if some features supported by \SpecialChar LyX
493 are still output as ERT
494 by tex2lyx, since the problems in the past that resulted in the update
495 recommendation were related to mixed version syntax, not ERT.
498 \begin_layout Enumerate
499 It would be nice if you could create a .lyx test file which contains instances
500 of all changed or added features.
501 This could then be used to test lyx2lyx and tex2lyx.
502 Unfortunately it has not yet been decided how to collect such examples,
503 so please ask on the development list if you want to create one.
506 \begin_layout Enumerate
507 \begin_inset CommandInset label
509 name "enu:updatefiles"
513 Update LyX's .lyx documentation files to the new format.
514 The developer who makes the change knows best what changes to expect when
515 inspecting the resulting diff.
516 Because of this, you might be able to catch a bug in the lyx2lyx code that
517 updates the format just by taking a quick scan through the large diff that
519 \begin_inset Note Note
522 \begin_layout Plain Layout
523 Another advantage is that if later we suspect a bug in lyx2lyx we can easily
524 see which layout update made an unexpected change by looking at the git
525 log of a .lyx file that suffers the problem.
531 To do this, first make sure that there are no changes to the git repository
532 that you will not want to commit (this is needed because it will be convenient
533 to commit with the command
534 \begin_inset Flex Code
537 \begin_layout Plain Layout
544 Then run the following command in the root folder of the source:
545 \begin_inset Flex Code
548 \begin_layout Plain Layout
549 python development/tools/updatedocs.py
555 Then, revert the change to
556 \begin_inset Flex Code
559 \begin_layout Plain Layout
565 because that file is meant to be generated separately:
566 \begin_inset Flex Code
569 \begin_layout Plain Layout
570 git checkout lib/doc/LFUNs.lyx
576 \begin_inset Note Note
579 \begin_layout Plain Layout
580 TODO: this step should be done within updatedocs.py
586 Look at the resulting changes using the command
587 \begin_inset Flex Code
590 \begin_layout Plain Layout
597 If anything looks surprising, please investigate.
598 Finally, commit using
599 \begin_inset Flex Code
602 \begin_layout Plain Layout
611 \begin_layout Subsection
612 Updating the file format number of layout files
615 \begin_layout Standard
617 \begin_inset CommandInset ref
619 reference "enu:updatefiles"
624 \begin_inset CommandInset ref
626 reference "subsec:update_lyx_files"
631 \begin_inset Flex Code
634 \begin_layout Plain Layout
640 command, use this command:
641 \begin_inset Flex Code
644 \begin_layout Plain Layout
645 python development/tools/updatelayouts.py
653 \begin_layout Standard
654 Note that we do not update the local layout of our
655 \begin_inset Flex Code
658 \begin_layout Plain Layout
664 files because users would then not be able to export to older formats.
665 For example, if a 2.2.0 user exported a template to 2.1.x format and tried
666 to open the file in LyX 2.1.x, there would be an error because the file would
667 contain a local layout whose format is too new.
668 The root reason for this is that we do not support converting layouts to
669 older layout formats, as we do for the
670 \begin_inset Flex Code
673 \begin_layout Plain Layout
682 \begin_layout Subsection
683 Updating the file format number of bind/ui files
686 \begin_layout Standard
688 \begin_inset CommandInset ref
690 reference "enu:updatefiles"
695 \begin_inset CommandInset ref
697 reference "subsec:update_lyx_files"
702 \begin_inset Flex Code
705 \begin_layout Plain Layout
711 command, use this command:
712 \begin_inset Flex Code
715 \begin_layout Plain Layout
716 bash development/tools/updatelfuns.sh
724 \begin_layout Subsection
725 Backporting new styles to the stable version
728 \begin_layout Standard
729 Starting with the stable \SpecialChar LyX
730 2.1 branch, there is a mechanism in place to backport
731 new styles to the stable version without the need to update the file format.
732 The basic idea is that the new style definition is automatically copied
733 to the document preamble, so that it can even be used by older minor revisions
734 that did not yet include the style.
735 To backport a new style to the stable version, the following steps are
739 \begin_layout Enumerate
741 \begin_inset Flex Code
744 \begin_layout Plain Layout
750 to the style definition in the development version.
753 \begin_layout Enumerate
754 Copy the style definition to the stable version, but use
755 \begin_inset Flex Code
758 \begin_layout Plain Layout
765 If needed adjust the format to the one used by the stable version (see
766 the customization manual for details of the layout file format).
769 \begin_layout Enumerate
770 For each update of the style in a later stable version, increase the argument
772 \begin_inset Flex Code
775 \begin_layout Plain Layout
781 by one (in the stable version, the development version should not be touched).
784 \begin_layout Standard
785 For details about the
786 \begin_inset Flex Code
789 \begin_layout Plain Layout
795 flag see the customization manual.
797 \begin_inset Flex Code
800 \begin_layout Plain Layout
806 support is needed for backported styles: Since the style of the development
807 version has an infinite version number, it will always be used.
808 Furthermore, since its version number is less than one, the style will
809 not be written anymore to the document header for files saved by the new
813 \begin_layout Standard
814 \begin_inset Newpage newpage
820 \begin_layout Section
824 \begin_layout Standard
825 Automated tests are an important tool to detect bugs and regressions in
826 software development.
827 Some projects like gcc even require each bug fix to be accompanied by a
828 test case for the automatic test suite, that would detect this bug.
829 Testing interactive features automatically is of course very hard, but
830 core functionality like document import and export can be tested quite
831 easily, and some tests of this kind exist.
834 \begin_layout Subsection
838 \begin_layout Standard
839 There are attempts to set up a suite of unit tests for LyX.
842 \begin_layout Standard
843 TODO: describe what is done and what is still to do.
846 \begin_layout Subsection
850 \begin_layout Standard
851 The tex2lyx tests are located in the
852 \begin_inset Flex Code
855 \begin_layout Plain Layout
861 subfolder of the \SpecialChar LyX
862 source code distribution.
863 The actual testing is performed by the simple python script
864 \begin_inset Flex Code
867 \begin_layout Plain Layout
868 src/tex2lyx/test/runtests.py
874 Each test consists of two files:
875 \begin_inset Flex Code
878 \begin_layout Plain Layout
884 contains the \SpecialChar LaTeX
885 code that should be tested.
887 \begin_inset Flex Code
890 \begin_layout Plain Layout
896 contains the expected output of tex2lyx.
897 When a test is run, the actual produced output is compared with the stored
899 The test passes if both are identical.
900 The test machinery is also able to generate a file
901 \begin_inset Flex Code
904 \begin_layout Plain Layout
910 by exporting the produced .lyx file with \SpecialChar LyX
912 This may be useful for roundtrip comparisons.
915 \begin_layout Subsubsection
919 \begin_layout Standard
920 The tex2lyx tests can be run in several ways.
922 \begin_inset Flex Code
925 \begin_layout Plain Layout
931 subfolder of the build directory, the commands
932 \begin_inset Flex Code
935 \begin_layout Plain Layout
941 (cmake, all platforms),
942 \begin_inset Flex Code
945 \begin_layout Plain Layout
951 (cmake, when using a make based build system and not MSVC) or
952 \begin_inset Flex Code
955 \begin_layout Plain Layout
961 (autotools) will run the tex2lyx tests.
962 Alternatively, in the root of the build directory, the command
963 \begin_inset Flex Code
966 \begin_layout Plain Layout
972 runs all tests whose names match the regex
973 \begin_inset Quotes eld
977 \begin_inset Quotes erd
981 Another way to run the tex2lyx tests in the root build directory is to
982 instead use the command
983 \begin_inset Flex Code
986 \begin_layout Plain Layout
987 ctest -L '(cmplyx|roundtrip)'
992 , which runs all tests categorized with the label
993 \begin_inset Quotes eld
997 \begin_inset Quotes erd
1001 \begin_inset Quotes eld
1005 \begin_inset Quotes erd
1009 If a test fails, the differences between the expected and actual results
1010 are output in unified diff format.
1013 \begin_layout Subsubsection
1014 Updating test references
1015 \begin_inset CommandInset label
1017 name "sec:Updating-test-references"
1024 \begin_layout Standard
1025 In some cases a changed tex2lyx output is not a test failure, but wanted,
1027 \begin_inset space \thinspace{}
1031 \begin_inset space \space{}
1034 if a tex2lyx bug was fixed, or a new feature was added.
1035 In these cases the stored references need to be updated.
1036 To do so if using autotools, call
1037 \begin_inset Flex Code
1040 \begin_layout Plain Layout
1047 \begin_inset Flex Code
1050 \begin_layout Plain Layout
1056 subdirectory of the build directory.
1057 If instead using CMake, call
1058 \begin_inset Flex Code
1061 \begin_layout Plain Layout
1062 make updatetex2lyxtests
1067 in the build directory or in the
1068 \begin_inset Flex Code
1071 \begin_layout Plain Layout
1077 subdirectory of the build directory.
1081 \begin_layout Plain Layout
1082 Note that this is a case where a make target in the build directory can
1083 affect the source directory, which might not be advisable.
1088 On Windows do the following:
1091 \begin_layout Itemize
1092 Assure that the path to the python.exe is in your system PATH variable.
1095 \begin_layout Itemize
1096 Double-click on the file
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1101 updatetex2lyxtests.vcxproj
1106 in the build directory or in the
1107 \begin_inset Flex Code
1110 \begin_layout Plain Layout
1116 subdirectory of your build directory.
1119 \begin_layout Itemize
1120 In the appearing MSVC program right-click on the project
1124 in the project explorer and chose
1131 \begin_layout Standard
1132 For convenience, these commands also produce re-exported roundtrip .lyx.tex
1134 Please examine the changed output carefully before committing the changed
1135 files to the repository: Since the test machinery does not do a roundtrip
1137 \begin_inset Formula $\Rightarrow$
1141 \begin_inset Formula $\Rightarrow$
1144 .tex, and does not compare the produced dvi or pdf output, it assumes that
1145 the stored .lyx reference produces correct output if processed by \SpecialChar LyX
1147 There is only one chance to detect wrong output: before committing a new
1149 Once it is committed, it is quite difficult to verify whether it is correct.
1152 \begin_layout Standard
1157 update the test references by opening them with \SpecialChar LyX
1158 or directly running lyx2lyx
1160 This would not work, since lyx2lyx and \SpecialChar LyX
1161 produce slightly different files
1162 regarding insignificant whitespace and line breaks.
1165 \begin_layout Subsubsection
1169 \begin_layout Standard
1170 In many cases tests for new features may be added to one of the existing
1171 test files, but sometimes this is not possible or not wanted.
1172 Then a new test file needs to be added:
1175 \begin_layout Enumerate
1177 \begin_inset Flex Code
1180 \begin_layout Plain Layout
1181 src/tex2lyx/test/<test name>.tex
1186 and run tex2lyx in roundtrip mode to produce the file
1187 \begin_inset Flex Code
1190 \begin_layout Plain Layout
1191 src/tex2lyx/test/<test name>.lyx.lyx
1197 This file will be the new reference.
1200 \begin_layout Enumerate
1201 Once you confirmed that the tex2lyx output is correct, add the new files
1202 to the corresponding lists in
1203 \begin_inset Flex Code
1206 \begin_layout Plain Layout
1207 src/tex2lyx/test/runtests.py
1213 \begin_inset Flex Code
1216 \begin_layout Plain Layout
1217 src/tex2lyx/Makefile.am
1223 \begin_inset Flex Code
1226 \begin_layout Plain Layout
1227 src/tex2lyx/test/CMakeLists.txt
1235 \begin_layout Enumerate
1236 Commit the changes to the repository, or send a patch to the development
1237 list and ask for committing if you do not have commit rights.
1240 \begin_layout Subsection
1241 ctest automatic tests (cmake only)
1244 \begin_layout Standard
1245 Some tests are located in the
1246 \begin_inset Flex Code
1249 \begin_layout Plain Layout
1250 development/autotests
1255 subfolder of the \SpecialChar LyX
1256 source code distribution.
1258 \begin_inset Flex Code
1261 \begin_layout Plain Layout
1267 is required to run the automatic \SpecialChar LyX
1268 tests, running them is not implemented
1273 \begin_layout Standard
1274 The \SpecialChar LyX
1275 tests can be run by the commands
1276 \begin_inset Flex Code
1279 \begin_layout Plain Layout
1286 \begin_inset Flex Code
1289 \begin_layout Plain Layout
1295 (when using a make based build system and not MSVC) in the
1296 \begin_inset Flex Code
1299 \begin_layout Plain Layout
1305 subfolder of the build directory.
1308 \begin_layout Subsubsection
1312 \begin_layout Standard
1313 The export tests are integration tests.
1314 They take longer to run and are more likely to break than the tex2lyx tests.
1315 Nevertheless, they have caught many regressions and without a better alternativ
1316 e it is important to keep them up-to-date and understand how they work.
1319 \begin_layout Standard
1321 \begin_inset Quotes eld
1325 \begin_inset Quotes erd
1328 documentation, template, and example files trying to export them to all
1329 supported output formats.
1330 In addition, there are a number of dedicated sample documents under
1331 \begin_inset Flex Code
1334 \begin_layout Plain Layout
1343 \begin_layout Paragraph
1344 Expectations of LyX developers
1347 \begin_layout Standard
1348 Because the export tests are integration tests and take a long time to run,
1349 LyX developers are rarely expected to run all of the tests.
1350 Here are some good practices to follow by developers:
1353 \begin_layout Itemize
1354 When making a non-trivial change to a .layout file, run the export and layout
1355 tests corresponding with that .layout file.
1358 \begin_layout Itemize
1359 When making non-trivial changes to a .lyx file, run the export tests correspondin
1360 g to that .lyx file.
1363 \begin_layout Itemize
1364 When making non-trivial changes to LyX's \SpecialChar LaTeX
1366 touching the encoding code or package handling code that you expect will
1367 change the exported \SpecialChar LaTeX
1372 \begin_layout Standard
1373 \paragraph_spacing single
1374 Consider running all of the export tests before and after your change.
1375 If there are differences, please reconcile these (i.e.
1376 fix the bug or fix the tests)
1381 Ask for help if you're not sure what to.
1384 \begin_layout Standard
1385 If you do not want to run the tests,
1388 \begin_layout Itemize
1389 post the patch on the list and others will run the tests and eventually
1393 \begin_layout Itemize
1394 commit, but be prepared to fix eventually arising problems or to revert
1395 the commit if there is no easy fix.
1399 \begin_layout Itemize
1400 Understand how to interpret test failures.
1401 If your commit is found to have broken a test, you should be able to interpret
1402 the test results when made aware of them.
1404 \begin_inset CommandInset ref
1406 reference "subsec:Interpreting-export-tests"
1413 \begin_layout Paragraph
1414 \begin_inset CommandInset label
1416 name "par:Configuring-ctests"
1420 Configuring the tests
1423 \begin_layout Standard
1424 To enable the export autotests, add the
1425 \begin_inset Flex Code
1428 \begin_layout Plain Layout
1429 -DLYX_ENABLE_EXPORT_TESTS=ON
1438 \begin_layout Standard
1439 \begin_inset Flex Code
1442 \begin_layout Plain Layout
1443 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1451 \begin_layout Standard
1453 This flag will increase the time for the cmake command by several seconds,
1454 mainly because of the process of inverting tests (see Section
1455 \begin_inset CommandInset ref
1457 reference "subsec:Interpreting-export-tests"
1464 \begin_layout Paragraph
1465 \begin_inset CommandInset label
1467 name "par:ctest-options"
1474 \begin_layout Standard
1475 To run all tests, in the build directory simply run the command
1476 \begin_inset Flex Code
1479 \begin_layout Plain Layout
1489 \begin_layout Standard
1490 To run only some of the tests, use command line options:
1493 \begin_layout Labeling
1494 \labelwidthstring -R
1495 \begin_inset Flex Code
1498 \begin_layout Plain Layout
1504 Run only the tests whose names match the given regular expression.
1507 \begin_layout Labeling
1508 \labelwidthstring -R
1509 \begin_inset Flex Code
1512 \begin_layout Plain Layout
1518 Run only the tests whose labels match the given regular expression.
1519 A test may have more that one label.
1524 \begin_layout Standard
1525 For example, to run only the export tests, you can use
1526 \begin_inset Flex Code
1529 \begin_layout Plain Layout
1539 \begin_layout Labeling
1540 \labelwidthstring -R
1541 \begin_inset Flex Code
1544 \begin_layout Plain Layout
1550 Exclude the tests whose names match the given regular expression.
1553 \begin_layout Labeling
1554 \labelwidthstring -R
1555 \begin_inset Flex Code
1558 \begin_layout Plain Layout
1564 Exclude the tests whose labels match the given regular expression.
1565 Cannot be combined with
1566 \begin_inset Flex Code
1569 \begin_layout Plain Layout
1578 \begin_layout Standard
1579 The following options help to find good selection patterns:
1582 \begin_layout Labeling
1583 \labelwidthstring -R
1584 \begin_inset Flex Code
1587 \begin_layout Plain Layout
1593 List the tests that would be run but not actually run them.
1598 \begin_layout Standard
1599 Useful in conjunction with the -R, -L, -E and -LE options, e.g., if you want
1600 to know how many tests there are or whether your
1601 \begin_inset Flex Code
1604 \begin_layout Plain Layout
1610 regular expression did what you expected.
1614 \begin_layout Labeling
1615 \labelwidthstring -R
1616 \begin_inset Flex Code
1619 \begin_layout Plain Layout
1620 \SpecialChar nobreakdash
1621 \SpecialChar nobreakdash
1627 print the list of all labels associated with the test set.
1628 Can also be combined with -R, -L, -E, ...
1632 \begin_layout Standard
1633 Other useful options are:
1636 \begin_layout Labeling
1637 \labelwidthstring -R
1638 \begin_inset Flex Code
1641 \begin_layout Plain Layout
1647 Run the tests in parallel using the given number of jobs.
1651 \begin_layout Standard
1652 We are still working on getting the tests to run in parallel.
1653 However, when running the tests in parallel, sometimes tests fail that
1654 pass when run sequentially.
1655 A reasonable approach is to first run the tests in parallel and then run
1656 the failed tests sequentially.
1660 \begin_layout Standard
1661 For example, to run 8 jobs at a time:
1664 \begin_layout Standard
1665 \begin_inset Flex Code
1668 \begin_layout Plain Layout
1677 \begin_layout Standard
1678 \begin_inset Flex Code
1681 \begin_layout Plain Layout
1682 ctest \SpecialChar nobreakdash
1683 \SpecialChar nobreakdash
1692 \begin_layout Standard
1694 Note that some tests cannot be run in parallel.
1695 These tests are marked in the code with the
1696 \begin_inset Flex Code
1699 \begin_layout Plain Layout
1710 \begin_layout Labeling
1711 \labelwidthstring -R
1712 \begin_inset Flex Code
1715 \begin_layout Plain Layout
1716 \SpecialChar nobreakdash
1717 \SpecialChar nobreakdash
1723 Set a global timeout on all tests that do not already have a timeout set
1728 \begin_layout Standard
1729 There have been bugs in LyX and in \SpecialChar LaTeX
1730 which cause compilation to hang, and
1731 without a timeout a test might never stop (in one case there was even a
1733 If a test times out, the
1734 \begin_inset Flex Code
1737 \begin_layout Plain Layout
1743 command exits with error, but you can distinguish between a timed out test
1744 and a failed test in the output reported at the end of the
1745 \begin_inset Flex Code
1748 \begin_layout Plain Layout
1758 \begin_layout Standard
1760 \begin_inset Flex Code
1763 \begin_layout Plain Layout
1769 ) the full list of command line options.
1772 \begin_layout Paragraph
1773 \begin_inset CommandInset label
1775 name "subsec:Interpreting-export-tests"
1779 Interpreting the export test results
1782 \begin_layout Standard
1783 A test can fail for several reasons, not all of them bad.
1786 \begin_layout Enumerate
1787 The .lyx file could have been added recently and some formats are not expected
1791 \begin_layout Enumerate
1792 A dependency is not met (e.g.
1793 the \SpecialChar LaTeX
1795 One hint that this is the case is that the corresponding
1796 \begin_inset Flex Code
1799 \begin_layout Plain Layout
1805 test will likely also fail.
1808 \begin_layout Enumerate
1809 An inverted test fails to fail (i.e.
1810 export that previously failed now works).
1813 \begin_layout Enumerate
1814 An external dependency was updated (e.g.
1819 \begin_layout Enumerate
1820 A recent code change introduced a bug.
1823 \begin_layout Enumerate
1824 \begin_inset CommandInset label
1830 A change in a document exposed a previously unknown bug or an incompatibility
1831 with an export format (e.g.
1832 Lua\SpecialChar LaTeX
1836 \begin_layout Standard
1837 Because the .lyx files are exported in several formats, it is not surprising
1838 that many of the exports fail.
1839 This expectation of failure is addressed by
1840 \begin_inset Quotes eld
1844 \begin_inset Quotes erd
1847 the tests, that is, by marking the test as
1848 \begin_inset Quotes eld
1852 \begin_inset Quotes erd
1855 if the export exits with error and as
1856 \begin_inset Quotes eld
1860 \begin_inset Quotes erd
1863 if the export succeeds
1868 It follows that these expected failures will not show up as failed tests
1869 in the test results and thus will not pollute the
1870 \begin_inset Quotes eld
1874 \begin_inset Quotes erd
1878 If the export actually succeeds, then the test will fail.
1879 The purpose of this failure is to get your attention—something has changed,
1880 possibly for the better.
1883 \begin_layout Standard
1884 We try to document why a test is inverted or ignored.
1885 See the comment (prefixed with
1886 \begin_inset Flex Code
1889 \begin_layout Plain Layout
1895 ) above the block in which the test is listed as inverted or ignored in
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 development/autotests/suspiciousTests
1907 \begin_inset Flex Code
1910 \begin_layout Plain Layout
1911 development/autotests/ignoredTests
1917 It is possible that an export goes from succeeding to failing just because
1918 the document was changed and the document was never expected to work with
1919 a certain export format in the first case.
1920 Once this is confirmed to be the situation, the test can be inverted.
1923 \begin_layout Standard
1924 A good question is why do we enable the tests for non-default formats? The
1925 answer is that if a non-default route is broken it is often because a bug
1926 was introduced in LyX and not because a document-specific change was made
1927 that is not supported by the route.
1928 In other words, there is a high signal/noise ratio in the export tests
1929 for some non-default formats.
1933 \begin_layout Standard
1934 When a test or several tests fail, consider checking the files in the
1935 \begin_inset Flex Code
1938 \begin_layout Plain Layout
1944 subdirectory of your build directory.
1945 In this subdirectory are three files: the file
1946 \begin_inset Flex Code
1949 \begin_layout Plain Layout
1955 simply lists the tests that failed on your last
1956 \begin_inset Flex Code
1959 \begin_layout Plain Layout
1966 \begin_inset Flex Code
1969 \begin_layout Plain Layout
1975 file contains the output from the tests (and often has details explaining
1976 why a test failed); and the
1977 \begin_inset Flex Code
1980 \begin_layout Plain Layout
1986 file lists the times that it took to run the tests.
1989 \begin_layout Paragraph
1990 What action should you take if a test fails?
1993 \begin_layout Standard
1994 \paragraph_spacing single
1995 It is always good to check manually why something fails and if it passes
1996 if the PDF output is good.
1999 \begin_layout Itemize
2000 Generally, if a change breaks compilation for the target format (for the
2001 manuals pdf2) without solving some important other issue,
2003 fix or revert the commit
2005 that led to failure.
2008 \begin_layout Itemize
2009 If it is not possible to (immediately) fix the failure but there are reasons
2010 not to revert the commit (e.g.
2011 it fixes another more important issue),
2015 the failing test case (see
2016 \begin_inset CommandInset ref
2018 reference "par:Inverted-tests"
2025 \begin_layout Itemize
2030 test case fails because the export now works,
2034 the test by removing the labeling pattern from
2035 \begin_inset Quotes eld
2039 \begin_inset Quotes erd
2043 \begin_inset CommandInset ref
2045 reference "par:Inverted-tests"
2052 \begin_layout Itemize
2053 If the export did not fail previously but led to wrong output (PDF, say),
2054 it is in fact an improvement when the test now fails, label it as
2055 \begin_inset Quotes eld
2058 unreliable:wrong:output
2059 \begin_inset Quotes erd
2063 \begin_inset CommandInset ref
2065 reference "par:Unreliable-tests"
2072 \begin_layout Paragraph
2073 \begin_inset CommandInset label
2075 name "par:Inverted-tests"
2082 \begin_layout Standard
2083 Test cases whose name matches a pattern in the file
2084 \begin_inset Flex Code
2087 \begin_layout Plain Layout
2088 development/autotests/suspiciousTests
2098 They get also the test property
2099 \begin_inset Flex Code
2102 \begin_layout Plain Layout
2109 they are reported as failing if the export works without error
2110 \begin_inset Flex URL
2113 \begin_layout Plain Layout
2115 https://cmake.org/cmake/help/v3.0/command/set_tests_properties.html
2123 \begin_layout Standard
2124 Add failing cases to this file, if they cannot be solved
2125 \begin_inset Quotes eld
2129 \begin_inset Quotes erd
2132 but it is expected that the export will work in a foreseeable future, e.g.
2133 low priority issues like failures to export to a non-target format (for
2134 the manuals everything except pdf2).
2137 \begin_layout Standard
2138 The following sublabels are currently present in
2139 \begin_inset Flex Code
2142 \begin_layout Plain Layout
2151 \begin_layout Description
2152 todo test failures that require attention:
2156 \begin_layout Itemize
2157 minor issues to explore and properly sort later,
2160 \begin_layout Itemize
2164 \begin_layout Itemize
2165 LyX bugs to report at trac (move pattern to section "lyxbugs" once done).
2169 \begin_layout Description
2170 lyxbugs LyX bugs with a Trac number.
2173 \begin_layout Description
2174 ert Export failures due to "raw" LaTeX use in ERT or preamble code.
2178 \begin_layout Standard
2179 "Wontfix" if demonstrating correct use and OK in the default output format.
2183 \begin_layout Description
2184 texissues Export fails due to LaTeX limitations like non-ASCII characters
2185 in verbatim or listings, incompatible packages, ...
2189 \begin_layout Standard
2190 "Wontfix" if documents demonstrate correct use in the default output format:
2193 \begin_layout Itemize
2194 If the source can be made more robust without becoming "hackish", fix the
2198 \begin_layout Itemize
2199 if LyX could be enhanced to care for a permanent TeX limitation, file a
2200 ticket at trac and add a pattern under lyxbugs,
2203 \begin_layout Itemize
2204 otherwise, add a pattern here.
2208 \begin_layout Description
2209 attic Documents in the attic.
2210 (Kept for reference and format conversion test.)
2213 \begin_layout Subparagraph
2217 \begin_layout Standard
2218 Test cases whose name additionally matches a pattern in the file
2219 \begin_inset Flex Code
2222 \begin_layout Plain Layout
2223 development/autotests/suspendedTests
2241 This means they are not executed using
2242 \begin_inset Flex Code
2245 \begin_layout Plain Layout
2252 \begin_inset Flex Code
2255 \begin_layout Plain Layout
2262 However, they also get the test property
2263 \begin_inset Flex Code
2266 \begin_layout Plain Layout
2273 they are reported as failing if the export works without error.
2274 From time to time they still have to be checked using
2275 \begin_inset Flex Code
2278 \begin_layout Plain Layout
2287 \begin_layout Standard
2288 These tests are suspended, because the export fails for known reasons which
2289 cannot ATM be resolved.
2290 But it is expected the reason might disappear in the future.
2291 Be it new TL or better handling in \SpecialChar LyX
2295 \begin_layout Standard
2296 For ctest commands without the
2297 \begin_inset Flex Code
2300 \begin_layout Plain Layout
2306 parameter nothing changes.
2307 Suspended or not, tests will be executed depending only on the selecting
2308 regular expression given to the ctest command (see
2309 \begin_inset CommandInset ref
2311 reference "par:ctest-options"
2318 \begin_layout Paragraph
2319 \begin_inset CommandInset label
2321 name "par:Unreliable-tests"
2328 \begin_layout Standard
2329 Test cases whose name matches a pattern in the file
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2334 development/autotests/unreliableTests
2346 \begin_layout Standard
2347 These tests are not executed using
2348 \begin_inset Flex Code
2351 \begin_layout Plain Layout
2358 \begin_inset Flex Code
2361 \begin_layout Plain Layout
2371 \begin_layout Standard
2372 They pass or fail for various reasons not related to LyX (nonstandard, erratic)
2373 or pass but should rather fail (wrong output).
2375 \begin_inset Note Note
2378 \begin_layout Plain Layout
2379 *invalid* tests (wrong output) are not *unreliable*.
2380 # Use "unfit" or "unapplicable" as better label and name of pattern file?
2389 \begin_layout Description
2390 nonstandard Documents with additional requirements, e.g.
2391 a class or package file not in TeXLive.
2393 \begin_inset Note Note
2396 \begin_layout Plain Layout
2397 TODO: rename to "extra"?
2406 \begin_layout Standard
2407 These tests are labeled as
2413 \begin_layout Description
2414 erratic Tests depending on local configuration, OS, TeX distribution, package
2415 versions, or the phase of the moon.
2417 \begin_inset Note Note
2420 \begin_layout Plain Layout
2425 only for the phase-of-moon dependency?
2434 \begin_layout Standard
2435 These tests are labeled as
2441 \begin_layout Description
2443 \begin_inset space ~
2446 output Export does not fail but the resulting document has errors.
2450 \begin_layout Standard
2451 \paragraph_spacing single
2452 \begin_inset Note Note
2455 \begin_layout Plain Layout
2456 \paragraph_spacing single
2457 These tests are actually not
2465 (not measuring what they should measure).
2474 \begin_layout Paragraph
2475 Export test filtering
2478 \begin_layout Standard
2479 The assignment of a label to a test is controlled by a set of files with
2480 regular expressions that are matched against the test names.
2483 \begin_layout Description
2484 ignoredTests (small file)
2485 \begin_inset Newline newline
2488 Tests selected here are withdrawn in the configuration step (cf.
2490 \begin_inset CommandInset ref
2492 reference "par:Configuring-ctests"
2500 \begin_layout Labeling
2501 \labelwidthstring 00.00.0000
2502 Input Test of any export combination
2505 \begin_layout Labeling
2506 \labelwidthstring 00.00.0000
2507 Output Stop if tests not selected here
2511 \begin_layout Description
2512 unreliableTests: Tests selected either pass or fail, but that is dependent
2513 on the system where the test is run.
2514 Selected tests gain the label 'unreliable'.
2518 \begin_layout Labeling
2519 \labelwidthstring 00.00.0000
2520 Input Each test which passed 'ignoredTests'
2523 \begin_layout Labeling
2524 \labelwidthstring 00.00.0000
2525 Output Stop if test selected, gain label 'unreliable'.
2529 \begin_layout Description
2531 \begin_inset space \space{}
2538 \begin_layout Labeling
2539 \labelwidthstring 00.00.0000
2540 Input Each test which passed 'unreliableTests'
2543 \begin_layout Labeling
2544 \labelwidthstring 00.00.0000
2545 Output Stop if not selected.
2548 \begin_layout Standard
2549 The following file is meant as subselections of 'suspiciousTests'.
2550 If neither subselection applies, test gains labels 'export' and 'inverted'
2553 \begin_layout Description
2554 suspendedTests Tests selected here gain the label 'suspended' but _not_
2555 'export' or 'inverted', although in ctest they remain inverted.
2556 ('ctest' knows only 'inverted' or not, labels are used only for test selection)
2560 \begin_layout Labeling
2561 \labelwidthstring 00.00.0000
2562 Input Each test selected by 'suspiciousTests'
2565 \begin_layout Labeling
2566 \labelwidthstring 00.00.0000
2567 Output Selected test gains label 'suspended'.
2573 \begin_layout Standard
2574 The following table may clarify label assignement
2577 \begin_layout Standard
2578 \begin_inset Tabular
2579 <lyxtabular version="3" rows="7" columns="12">
2580 <features tabularvalignment="middle">
2581 <column alignment="left" valignment="top" width="0pt">
2582 <column alignment="left" valignment="top" width="0pt">
2583 <column alignment="left" valignment="top" width="0pt">
2584 <column alignment="left" valignment="top" width="0pt">
2585 <column alignment="center" valignment="top">
2586 <column alignment="center" valignment="top">
2587 <column alignment="center" valignment="top">
2588 <column alignment="center" valignment="top">
2589 <column alignment="center" valignment="top">
2590 <column alignment="center" valignment="top">
2591 <column alignment="center" valignment="top">
2592 <column alignment="center" valignment="top">
2594 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2597 \begin_layout Plain Layout
2603 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2606 \begin_layout Plain Layout
2612 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2615 \begin_layout Plain Layout
2621 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2624 \begin_layout Plain Layout
2630 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2633 \begin_layout Plain Layout
2634 Marked in ctest, Assigned label
2639 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
2642 \begin_layout Plain Layout
2648 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2651 \begin_layout Plain Layout
2657 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2660 \begin_layout Plain Layout
2666 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2669 \begin_layout Plain Layout
2675 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2678 \begin_layout Plain Layout
2684 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2687 \begin_layout Plain Layout
2693 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2696 \begin_layout Plain Layout
2704 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2707 \begin_layout Plain Layout
2713 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2716 \begin_layout Plain Layout
2722 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2725 \begin_layout Plain Layout
2731 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2734 \begin_layout Plain Layout
2740 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2743 \begin_layout Plain Layout
2749 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2752 \begin_layout Plain Layout
2758 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2761 \begin_layout Plain Layout
2767 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2770 \begin_layout Plain Layout
2776 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2779 \begin_layout Plain Layout
2785 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2788 \begin_layout Plain Layout
2794 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2797 \begin_layout Plain Layout
2803 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2806 \begin_layout Plain Layout
2814 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2817 \begin_layout Plain Layout
2823 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2826 \begin_layout Plain Layout
2832 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2835 \begin_layout Plain Layout
2841 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2844 \begin_layout Plain Layout
2850 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2853 \begin_layout Plain Layout
2859 <cell alignment="center" valignment="top" topline="true" usebox="none">
2862 \begin_layout Plain Layout
2868 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2871 \begin_layout Plain Layout
2877 <cell alignment="center" valignment="top" topline="true" usebox="none">
2880 \begin_layout Plain Layout
2886 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2889 \begin_layout Plain Layout
2895 <cell alignment="center" valignment="top" topline="true" usebox="none">
2898 \begin_layout Plain Layout
2904 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2907 \begin_layout Plain Layout
2913 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2916 \begin_layout Plain Layout
2924 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2927 \begin_layout Plain Layout
2933 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2936 \begin_layout Plain Layout
2942 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2945 \begin_layout Plain Layout
2951 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2954 \begin_layout Plain Layout
2960 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2963 \begin_layout Plain Layout
2969 <cell alignment="center" valignment="top" topline="true" usebox="none">
2972 \begin_layout Plain Layout
2978 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2981 \begin_layout Plain Layout
2987 <cell alignment="center" valignment="top" topline="true" usebox="none">
2990 \begin_layout Plain Layout
2996 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2999 \begin_layout Plain Layout
3005 <cell alignment="center" valignment="top" topline="true" usebox="none">
3008 \begin_layout Plain Layout
3014 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3017 \begin_layout Plain Layout
3023 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3026 \begin_layout Plain Layout
3034 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
3037 \begin_layout Plain Layout
3043 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3046 \begin_layout Plain Layout
3052 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
3055 \begin_layout Plain Layout
3061 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3064 \begin_layout Plain Layout
3070 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3073 \begin_layout Plain Layout
3079 <cell alignment="center" valignment="top" topline="true" usebox="none">
3082 \begin_layout Plain Layout
3088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3091 \begin_layout Plain Layout
3097 <cell alignment="center" valignment="top" topline="true" usebox="none">
3100 \begin_layout Plain Layout
3106 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3109 \begin_layout Plain Layout
3115 <cell alignment="center" valignment="top" topline="true" usebox="none">
3118 \begin_layout Plain Layout
3124 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3127 \begin_layout Plain Layout
3133 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3136 \begin_layout Plain Layout
3144 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3147 \begin_layout Plain Layout
3153 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3156 \begin_layout Plain Layout
3162 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3165 \begin_layout Plain Layout
3171 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3174 \begin_layout Plain Layout
3180 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3183 \begin_layout Plain Layout
3189 <cell alignment="center" valignment="top" topline="true" usebox="none">
3192 \begin_layout Plain Layout
3198 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3201 \begin_layout Plain Layout
3207 <cell alignment="center" valignment="top" topline="true" usebox="none">
3210 \begin_layout Plain Layout
3216 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3219 \begin_layout Plain Layout
3225 <cell alignment="center" valignment="top" topline="true" usebox="none">
3228 \begin_layout Plain Layout
3234 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3237 \begin_layout Plain Layout
3243 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3246 \begin_layout Plain Layout
3254 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3257 \begin_layout Plain Layout
3263 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3266 \begin_layout Plain Layout
3272 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3275 \begin_layout Plain Layout
3281 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3284 \begin_layout Plain Layout
3290 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3293 \begin_layout Plain Layout
3299 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3302 \begin_layout Plain Layout
3308 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3311 \begin_layout Plain Layout
3317 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3320 \begin_layout Plain Layout
3326 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3329 \begin_layout Plain Layout
3335 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3338 \begin_layout Plain Layout
3344 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3347 \begin_layout Plain Layout
3353 <cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
3356 \begin_layout Plain Layout
3370 \begin_layout Subsubsection
3374 \begin_layout Standard
3375 These tests check whether a .lyx file loads without any terminal messages.
3376 They correspond to the manual operations of simply opening a .lyx file on
3377 the terminal, exiting LyX once the file is loaded, and then checking whether
3378 there is any output from the terminal.
3379 These tests are useful for catching malformed .lyx files and parsing bugs.
3380 They can also be used to find a .lyx file in which an instance of something
3382 To do this, compile LyX with a local patch that outputs something to the
3383 terminal when an instance is found, and then run the check_load tests to
3384 see if any fail, which would mean that the situation occurs in the LyX
3385 documentation files corresponding to the failed tests.
3386 These tests are expectedly fragile: any LyX diagnostic message, which is
3387 not necessarily an error, would cause the tests to fail.
3388 Similarly, any message output by a library (e.g.
3389 Qt) would also cause failure.
3390 There are some messages that the check_load tests are instructed to ignore,
3391 which are stored in the file
3392 \begin_inset Flex Code
3395 \begin_layout Plain Layout
3396 development/autotests/filterCheckWarnings
3404 \begin_layout Standard
3405 Under cmake, the tests are labeled as 'load'.
3408 \begin_layout Subsubsection
3412 \begin_layout Standard
3413 These tests combine lyx2lyx tests with check_load tests.
3414 They fail if either fails.
3417 \begin_layout Subsubsection
3421 \begin_layout Standard
3422 The URL tests are enabled with the
3423 \begin_inset Flex Code
3426 \begin_layout Plain Layout
3427 -DLYX_ENABLE_URLTESTS=ON
3432 CMake flag and are useful for finding broken links in our documentation
3434 If a URL test fails, to see which link in particular was reported as broken,
3436 \begin_inset Flex Code
3439 \begin_layout Plain Layout
3446 These tests are extremely fragile (e.g.
3447 a test can depend on your Internet connection) and a failed URL test should
3448 not be taken too seriously.
3449 URL tests are labeled as
3454 \begin_layout Paragraph
3458 \begin_layout Standard
3459 cmake is required to run the \SpecialChar LyX
3460 tests, running them is not implemented for
3464 \begin_layout Standard
3465 The appropriate commands are:
3468 \begin_layout Itemize
3474 \begin_inset Newline newline
3477 runs all tests with label
3482 \begin_layout Itemize
3485 ctest -R 'check_.*urls'
3488 \begin_inset Newline newline
3491 runs the tests 'check_accessible_urls'
3494 \begin_layout Standard
3495 Associated test results can be examined in ctest-log directory in files
3496 of the form 'LastFailed.*URLS.log'
3499 \begin_layout Section
3500 Development policies
3503 \begin_layout Standard
3504 This chapter lists some guidelines that should be followed.
3505 This list is not complete, and many guidelines are in separate chapters,
3507 \begin_inset Quotes eld
3510 When is an update of the .lyx file format number needed?
3511 \begin_inset Quotes erd
3515 \begin_inset CommandInset ref
3517 reference "sec:When-is-an"
3524 \begin_layout Subsection
3525 When to set a fixed milestone?
3528 \begin_layout Standard
3529 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
3533 \begin_layout Enumerate
3534 Somebody is actively working on a fix.
3537 \begin_layout Enumerate
3538 The bug is so severe that it would block the release if it is not fixed.
3541 \begin_layout Standard
3542 If a bug is important, but nobody is working on it, and it is no showstopper,
3543 use a milestone like 2.1.x or 2.2.x.
3544 For all other bugs, do not set a milestone at all.
3547 \begin_layout Subsection
3548 Can we add rc entries in stable branch?
3551 \begin_layout Standard
3553 We are supposed to increase the prefs2prefs version number with such things.
3556 \begin_layout Section
3557 Documentation policies
3560 \begin_layout Standard
3561 The main documentation consists of these files:
3564 \begin_layout Description
3565 splash.lyx it is the first file you see after an installation.
3566 We assume that a new user sees this.
3567 It is therefore designed to be as simple as possible.
3568 Therefore please don't add any new formatting, only fix typos etc.
3569 Splash.lyx is up to date for \SpecialChar LyX
3570 2.1.x, currently maintained by Uwe Stöhr.
3573 \begin_layout Description
3574 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
3576 It therefore uses a limited set of formatting.
3577 For example a standard document class.
3578 Since new users will first learn about the formatting possibilities of
3580 please keep this file that simple.
3581 Intro.lyx is up to date for \SpecialChar LyX
3582 2.1.x, currently maintained by Uwe Stöhr.
3585 \begin_layout Description
3586 Tutorial.lyx our tutorial.
3587 It must be always up to date.
3588 Normally there is nothing to add since we don't want to overwhelm new users
3589 with too much details.
3590 The will learn these details while using \SpecialChar LyX
3591 and we have special manuals.
3592 Tutorial.lyx is up to date for \SpecialChar LyX
3593 2.1.x, currently maintained by Uwe Stöhr.
3596 \begin_layout Description
3597 UserGuide.lyx our main user guide.
3598 It covers a mixture of basic and detailed information.
3599 Some information is also in the Math and EmbeddedObjects manual so that
3600 the UserGuide refers to these files.
3601 UserGuide.lyx is up to date for \SpecialChar LyX
3602 2.1.x, currently maintained by Uwe Stöhr.
3605 \begin_layout Description
3606 EmbeddedObjects.lyx a special manual to explain things like tables floats
3609 EmbeddedObjects.lyx is up to date for \SpecialChar LyX
3610 2.1.x, currently maintained by Uwe
3614 \begin_layout Description
3615 Math.lyx a special manual to explain everything regarding math in all detail.
3616 Math.lyx is up to date for \SpecialChar LyX
3617 2.1.x, currently maintained by Uwe Stöhr.
3620 \begin_layout Description
3621 Additional.lyx this manual covers information that would be too much detail
3622 for the UserGuide or would make the UserGuide uncompilable or only compilable
3623 when installing a lot of special \SpecialChar LaTeX
3625 What should be in the UserGuide or better in Additional is a matter of
3627 it is up to you to decide that.
3628 Additional.lyx is not completely up to date for \SpecialChar LyX
3631 \begin_inset space ~
3634 8 is up to date and currently maintained by Uwe Stöhr.
3635 It certainly needs a rewrite and update.
3636 For example many info in chapter
3637 \begin_inset space ~
3640 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
3644 \begin_layout Description
3645 Customization.lyx this manual covers information how to customize \SpecialChar LyX
3647 output formats, operating systems, languages etc.
3648 It is currently completely out of date and needs a major rewrite and update.
3649 If you do this please assure that your information are given for all OSes
3650 and \SpecialChar LaTeX
3651 distributions (meaning be as objective as possible).
3654 \begin_layout Standard
3656 \begin_inset space ~
3659 rules in editing the docs:
3662 \begin_layout Enumerate
3663 If you are not the maintainer of a doc file or a chapter/section, you MUST
3664 use change tracking so that the maintainer could review your changes
3667 \begin_layout Enumerate
3668 Respect the formatting of the document.
3669 The different files use different formatting styles.
3670 That is OK and has historic reasons nobody fully know ;-).
3671 But it is important to be consistent within one file.
3674 \begin_layout Enumerate
3675 All changes you make to a file in one language MUST also go the file in
3676 the other actively maintained languages.
3677 Normally the maintainer does this for you, if you are the maintainer, you
3678 must do this by copying or changing the changed or added text to the other
3679 files so that the translators sees the blue underlined text and know what
3680 they have to translate and what was changed.
3683 \begin_layout Enumerate
3684 You MUST assure that the document is compilable as
3685 \begin_inset Quotes eld
3689 \begin_inset Quotes erd