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
1468 \begin_layout Standard
1469 To run all tests, in the build directory simply run the command
1470 \begin_inset Flex Code
1473 \begin_layout Plain Layout
1483 \begin_layout Standard
1484 To run only some of the tests, use command line options:
1487 \begin_layout Labeling
1488 \labelwidthstring -R
1489 \begin_inset Flex Code
1492 \begin_layout Plain Layout
1498 Run only the tests whose names match the given regular expression.
1501 \begin_layout Labeling
1502 \labelwidthstring -R
1503 \begin_inset Flex Code
1506 \begin_layout Plain Layout
1512 Run only the tests whose labels match the given regular expression.
1513 A test may have more that one label.
1518 \begin_layout Standard
1519 For example, to run only the export tests, you can use
1520 \begin_inset Flex Code
1523 \begin_layout Plain Layout
1533 \begin_layout Labeling
1534 \labelwidthstring -R
1535 \begin_inset Flex Code
1538 \begin_layout Plain Layout
1544 Exclude the tests whose names match the given regular expression.
1547 \begin_layout Labeling
1548 \labelwidthstring -R
1549 \begin_inset Flex Code
1552 \begin_layout Plain Layout
1558 Exclude the tests whose labels match the given regular expression.
1561 \begin_layout Standard
1562 The following options help to find good selection patterns:
1565 \begin_layout Labeling
1566 \labelwidthstring -R
1567 \begin_inset Flex Code
1570 \begin_layout Plain Layout
1576 List the tests that would be run but not actually run them.
1581 \begin_layout Standard
1582 Useful in conjunction with the -R, -L, -E and -LE options, e.g., if you want
1583 to know how many tests there are or whether your
1584 \begin_inset Flex Code
1587 \begin_layout Plain Layout
1593 regular expression did what you expected.
1597 \begin_layout Labeling
1598 \labelwidthstring -R
1599 \begin_inset Flex Code
1602 \begin_layout Plain Layout
1603 \SpecialChar nobreakdash
1604 \SpecialChar nobreakdash
1610 print the list of all labels associated with the test set.
1611 Can also be combined with -R, -L, -E, ...
1615 \begin_layout Standard
1616 Other relevant options are:
1619 \begin_layout Labeling
1620 \labelwidthstring -R
1621 \begin_inset Flex Code
1624 \begin_layout Plain Layout
1630 Run the tests in parallel using the given number of jobs.
1634 \begin_layout Standard
1635 We are still working on getting the tests to run in parallel.
1636 However, when running the tests in parallel, sometimes tests fail that
1637 pass when run sequentially.
1638 A reasonable approach is to first run the tests in parallel and then run
1639 the failed tests sequentially.
1643 \begin_layout Standard
1644 For example, to run 8 jobs at a time:
1647 \begin_layout Standard
1648 \begin_inset Flex Code
1651 \begin_layout Plain Layout
1660 \begin_layout Standard
1661 \begin_inset Flex Code
1664 \begin_layout Plain Layout
1665 ctest \SpecialChar nobreakdash
1666 \SpecialChar nobreakdash
1675 \begin_layout Standard
1677 Note that some tests cannot be run in parallel.
1678 These tests are marked in the code with the
1679 \begin_inset Flex Code
1682 \begin_layout Plain Layout
1693 \begin_layout Labeling
1694 \labelwidthstring -R
1695 \begin_inset Flex Code
1698 \begin_layout Plain Layout
1699 \SpecialChar nobreakdash
1700 \SpecialChar nobreakdash
1706 Set a global timeout on all tests that do not already have a timeout set
1711 \begin_layout Standard
1712 There have been bugs in LyX and in \SpecialChar LaTeX
1713 which cause compilation to hang, and
1714 without a timeout a test might never stop (in one case there was even a
1716 If a test times out, the
1717 \begin_inset Flex Code
1720 \begin_layout Plain Layout
1726 command exits with error, but you can distinguish between a timed out test
1727 and a failed test in the output reported at the end of the
1728 \begin_inset Flex Code
1731 \begin_layout Plain Layout
1741 \begin_layout Standard
1743 \begin_inset Flex Code
1746 \begin_layout Plain Layout
1752 ) the full list of command line options.
1755 \begin_layout Paragraph
1756 \begin_inset CommandInset label
1758 name "subsec:Interpreting-export-tests"
1762 Interpreting the export test results
1765 \begin_layout Standard
1766 A test can fail for several reasons, not all of them bad.
1769 \begin_layout Enumerate
1770 The .lyx file could have been added recently and some formats are not expected
1774 \begin_layout Enumerate
1775 A dependency is not met (e.g.
1776 the \SpecialChar LaTeX
1778 One hint that this is the case is that the corresponding
1779 \begin_inset Flex Code
1782 \begin_layout Plain Layout
1788 test will likely also fail.
1791 \begin_layout Enumerate
1792 An inverted test fails to fail (i.e.
1793 export that previously failed now works).
1796 \begin_layout Enumerate
1797 An external dependency was updated (e.g.
1802 \begin_layout Enumerate
1803 A recent code change introduced a bug.
1806 \begin_layout Enumerate
1807 \begin_inset CommandInset label
1813 A change in a document exposed a previously unknown bug or an incompatibility
1814 with an export format (e.g.
1815 Lua\SpecialChar LaTeX
1819 \begin_layout Standard
1820 Because the .lyx files are exported in several formats, it is not surprising
1821 that many of the exports fail.
1822 This expectation of failure is addressed by
1823 \begin_inset Quotes eld
1827 \begin_inset Quotes erd
1830 the tests, that is, by marking the test as
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 if the export exits with error and as
1839 \begin_inset Quotes eld
1843 \begin_inset Quotes erd
1846 if the export succeeds
1851 It follows that these expected failures will not show up as failed tests
1852 in the test results and thus will not pollute the
1853 \begin_inset Quotes eld
1857 \begin_inset Quotes erd
1861 If the export actually succeeds, then the test will fail.
1862 The purpose of this failure is to get your attention—something has changed,
1863 possibly for the better.
1866 \begin_layout Standard
1867 We try to document why a test is inverted or ignored.
1868 See the comment (prefixed with
1869 \begin_inset Flex Code
1872 \begin_layout Plain Layout
1878 ) above the block in which the test is listed as inverted or ignored in
1880 \begin_inset Flex Code
1883 \begin_layout Plain Layout
1884 development/autotests/suspiciousTests
1890 \begin_inset Flex Code
1893 \begin_layout Plain Layout
1894 development/autotests/ignoredTests
1900 It is possible that an export goes from succeeding to failing just because
1901 the document was changed and the document was never expected to work with
1902 a certain export format in the first case.
1903 Once this is confirmed to be the situation, the test can be inverted.
1906 \begin_layout Standard
1907 A good question is why do we enable the tests for non-default formats? The
1908 answer is that if a non-default route is broken it is often because a bug
1909 was introduced in LyX and not because a document-specific change was made
1910 that is not supported by the route.
1911 In other words, there is a high signal/noise ratio in the export tests
1912 for some non-default formats.
1916 \begin_layout Standard
1917 What action should you take if a test fails? This depends:
1920 \begin_layout Standard
1921 Generally, if a change breaks compilation for the target format (for the
1922 manuals pdf2) without solving some important other issue, fix or revert
1923 the commit that led to failure.
1924 If a change breaks compilation for some non-target format (for the manuals
1925 everything except pdf2), invert the test.
1929 \begin_layout Standard
1930 A special case is given, if the export was succeeding before but showing
1931 garbled text in the PDF output.
1932 Try to establish, that when the compilation succeeded before the resulting
1934 Otherwise, it is in fact an improvement when a test fails.
1935 Now it might fail with a clear message of "language xyz not supported".
1936 It is always good to check manually why something fails and if it passes
1937 if the PDF output is good.
1940 \begin_layout Standard
1941 Sometimes a test is fixed as side-effect of some change.
1942 We should uninvert a test (remove it from the
1943 \begin_inset Flex Code
1946 \begin_layout Plain Layout
1952 file) in order to preserve the fix.
1955 \begin_layout Standard
1956 When a test or several tests fail, consider checking the files in the
1957 \begin_inset Flex Code
1960 \begin_layout Plain Layout
1966 subdirectory of your build directory.
1967 In this subdirectory are three files: the file
1968 \begin_inset Flex Code
1971 \begin_layout Plain Layout
1977 simply lists the tests that failed on your last
1978 \begin_inset Flex Code
1981 \begin_layout Plain Layout
1988 \begin_inset Flex Code
1991 \begin_layout Plain Layout
1997 file contains the output from the tests (and often has details explaining
1998 why a test failed); and the
1999 \begin_inset Flex Code
2002 \begin_layout Plain Layout
2008 file lists the times that it took to run the tests.
2011 \begin_layout Paragraph
2015 \begin_layout Standard
2016 These tests fail if the export does
2024 \begin_layout Description
2025 inverted Export fails, but the test cases are subject to be examined.
2026 It is expected that the export will work in a foreseeable future.
2027 They are labeled 'inverted'.
2030 \begin_layout Description
2031 suspended Some inverted tests are labeled 'suspended'.
2032 This means, they are not executed using
2033 \begin_inset Flex Code
2036 \begin_layout Plain Layout
2043 \begin_inset Flex Code
2046 \begin_layout Plain Layout
2053 From time to time they still have to be checked using
2054 \begin_inset Flex Code
2057 \begin_layout Plain Layout
2067 \begin_layout Standard
2068 These tests are suspended, because the export fails for known reasons which
2069 cannot ATM be resolved.
2070 But it is expected the reason might disappear in the future.
2071 Be it new TL or better handling in \SpecialChar LyX
2075 \begin_layout Standard
2076 For ctest commands without the
2077 \begin_inset Flex Code
2080 \begin_layout Plain Layout
2086 parameter nothing changes.
2087 Suspended or not, tests will be executed depending only on the regexes
2088 parameters given to the ctest command.
2092 \begin_layout Paragraph
2096 \begin_layout Standard
2097 These tests are not executed using
2098 \begin_inset Flex Code
2101 \begin_layout Plain Layout
2108 \begin_inset Flex Code
2111 \begin_layout Plain Layout
2121 \begin_layout Standard
2122 They pass or fail for various reasons not related to LyX (nonstandard, erratic)
2123 or pass but should rather fail (wrong output).
2126 \begin_layout Description
2127 nonstandard Documents with additional requirements, e.g.
2128 a class or package file not on CTAN.
2130 \begin_inset Note Note
2133 \begin_layout Plain Layout
2134 TODO: rename to "extra"?
2143 \begin_layout Standard
2144 These tests are labeled as
2150 \begin_layout Description
2151 erratic Tests depending on local configuration, OS, TeX distribution, package
2152 versions, or the phase of the moon.
2154 \begin_inset Note Note
2157 \begin_layout Plain Layout
2162 only for the phase-of-moon dependency.
2171 \begin_layout Standard
2172 These tests are labeled as
2178 \begin_layout Description
2180 \begin_inset space ~
2183 output Export does not fail but the resulting document has errors.
2187 \begin_layout Standard
2188 \paragraph_spacing single
2189 These tests are actually not
2197 (not measuring what they should measure).
2201 \begin_layout Paragraph
2202 Export test filtering
2205 \begin_layout Standard
2206 The assignment of a label to a test is controlled by a set of files with
2207 regular expressions that are matched against the test names.
2210 \begin_layout Description
2211 ignoredTests (small file)
2212 \begin_inset Newline newline
2215 Tests selected here are withdrawn in the configuration step (cf.
2217 \begin_inset CommandInset ref
2219 reference "par:Configuring-ctests"
2227 \begin_layout Labeling
2228 \labelwidthstring 00.00.0000
2229 Input Test of any export combination
2232 \begin_layout Labeling
2233 \labelwidthstring 00.00.0000
2234 Output Stop if tests not selected here
2238 \begin_layout Description
2239 unreliableTests: Tests selected either pass or fail, but that is dependent
2240 on the system where the test is run.
2241 Selected tests gain the label 'unreliable'.
2245 \begin_layout Labeling
2246 \labelwidthstring 00.00.0000
2247 Input Each test which passed 'ignoredTests'
2250 \begin_layout Labeling
2251 \labelwidthstring 00.00.0000
2252 Output Stop if test selected, gain label 'unreliable'.
2256 \begin_layout Description
2258 \begin_inset space \space{}
2265 \begin_layout Labeling
2266 \labelwidthstring 00.00.0000
2267 Input Each test which passed 'unreliableTests'
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 Output Stop if not selected.
2275 \begin_layout Standard
2276 The following file is meant as subselections of 'suspiciousTests'.
2277 If neither subselection applies, test gains labels 'export' and 'inverted'
2280 \begin_layout Description
2281 suspendedTests Tests selected here gain the label 'suspended' but _not_
2282 'export' or 'inverted', although in ctest they remain inverted.
2283 ('ctest' knows only 'inverted' or not, labels are used only for test selection)
2287 \begin_layout Labeling
2288 \labelwidthstring 00.00.0000
2289 Input Each test selected by 'suspiciousTests'
2292 \begin_layout Labeling
2293 \labelwidthstring 00.00.0000
2294 Output Selected test gains label 'suspended'.
2300 \begin_layout Standard
2301 The following table may clarify label assignement
2304 \begin_layout Standard
2305 \begin_inset Tabular
2306 <lyxtabular version="3" rows="7" columns="12">
2307 <features tabularvalignment="middle">
2308 <column alignment="left" valignment="top" width="0pt">
2309 <column alignment="left" valignment="top" width="0pt">
2310 <column alignment="left" valignment="top" width="0pt">
2311 <column alignment="left" valignment="top" width="0pt">
2312 <column alignment="center" valignment="top">
2313 <column alignment="center" valignment="top">
2314 <column alignment="center" valignment="top">
2315 <column alignment="center" valignment="top">
2316 <column alignment="center" valignment="top">
2317 <column alignment="center" valignment="top">
2318 <column alignment="center" valignment="top">
2319 <column alignment="center" valignment="top">
2321 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2324 \begin_layout Plain Layout
2330 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2333 \begin_layout Plain Layout
2339 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2342 \begin_layout Plain Layout
2348 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2351 \begin_layout Plain Layout
2357 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2360 \begin_layout Plain Layout
2361 Marked in ctest, Assigned label
2366 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
2369 \begin_layout Plain Layout
2375 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2378 \begin_layout Plain Layout
2384 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2387 \begin_layout Plain Layout
2393 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2396 \begin_layout Plain Layout
2402 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2405 \begin_layout Plain Layout
2411 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2414 \begin_layout Plain Layout
2420 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2423 \begin_layout Plain Layout
2431 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2434 \begin_layout Plain Layout
2440 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2443 \begin_layout Plain Layout
2449 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2452 \begin_layout Plain Layout
2458 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2461 \begin_layout Plain Layout
2467 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2470 \begin_layout Plain Layout
2476 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2479 \begin_layout Plain Layout
2485 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2488 \begin_layout Plain Layout
2494 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2497 \begin_layout Plain Layout
2503 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2506 \begin_layout Plain Layout
2512 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2515 \begin_layout Plain Layout
2521 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2524 \begin_layout Plain Layout
2530 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2533 \begin_layout Plain Layout
2541 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2544 \begin_layout Plain Layout
2550 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2553 \begin_layout Plain Layout
2559 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2562 \begin_layout Plain Layout
2568 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2571 \begin_layout Plain Layout
2577 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2580 \begin_layout Plain Layout
2586 <cell alignment="center" valignment="top" topline="true" usebox="none">
2589 \begin_layout Plain Layout
2595 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2598 \begin_layout Plain Layout
2604 <cell alignment="center" valignment="top" topline="true" usebox="none">
2607 \begin_layout Plain Layout
2613 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2616 \begin_layout Plain Layout
2622 <cell alignment="center" valignment="top" topline="true" usebox="none">
2625 \begin_layout Plain Layout
2631 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2634 \begin_layout Plain Layout
2640 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2643 \begin_layout Plain Layout
2651 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2654 \begin_layout Plain Layout
2660 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2663 \begin_layout Plain Layout
2669 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2672 \begin_layout Plain Layout
2678 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2681 \begin_layout Plain Layout
2687 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2690 \begin_layout Plain Layout
2696 <cell alignment="center" valignment="top" topline="true" usebox="none">
2699 \begin_layout Plain Layout
2705 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2708 \begin_layout Plain Layout
2714 <cell alignment="center" valignment="top" topline="true" usebox="none">
2717 \begin_layout Plain Layout
2723 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2726 \begin_layout Plain Layout
2732 <cell alignment="center" valignment="top" topline="true" usebox="none">
2735 \begin_layout Plain Layout
2741 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2744 \begin_layout Plain Layout
2750 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2753 \begin_layout Plain Layout
2761 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
2764 \begin_layout Plain Layout
2770 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2773 \begin_layout Plain Layout
2779 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
2782 \begin_layout Plain Layout
2788 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2791 \begin_layout Plain Layout
2797 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2800 \begin_layout Plain Layout
2806 <cell alignment="center" valignment="top" topline="true" usebox="none">
2809 \begin_layout Plain Layout
2815 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2818 \begin_layout Plain Layout
2824 <cell alignment="center" valignment="top" topline="true" usebox="none">
2827 \begin_layout Plain Layout
2833 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2836 \begin_layout Plain Layout
2842 <cell alignment="center" valignment="top" topline="true" usebox="none">
2845 \begin_layout Plain Layout
2851 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2854 \begin_layout Plain Layout
2860 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2863 \begin_layout Plain Layout
2871 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2874 \begin_layout Plain Layout
2880 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2883 \begin_layout Plain Layout
2889 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2892 \begin_layout Plain Layout
2898 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2901 \begin_layout Plain Layout
2907 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2910 \begin_layout Plain Layout
2916 <cell alignment="center" valignment="top" topline="true" usebox="none">
2919 \begin_layout Plain Layout
2925 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2928 \begin_layout Plain Layout
2934 <cell alignment="center" valignment="top" topline="true" usebox="none">
2937 \begin_layout Plain Layout
2943 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2946 \begin_layout Plain Layout
2952 <cell alignment="center" valignment="top" topline="true" usebox="none">
2955 \begin_layout Plain Layout
2961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2964 \begin_layout Plain Layout
2970 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2973 \begin_layout Plain Layout
2981 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2984 \begin_layout Plain Layout
2990 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2993 \begin_layout Plain Layout
2999 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3002 \begin_layout Plain Layout
3008 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3011 \begin_layout Plain Layout
3017 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3020 \begin_layout Plain Layout
3026 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3029 \begin_layout Plain Layout
3035 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3038 \begin_layout Plain Layout
3044 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3047 \begin_layout Plain Layout
3053 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3056 \begin_layout Plain Layout
3062 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3065 \begin_layout Plain Layout
3071 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3074 \begin_layout Plain Layout
3080 <cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
3083 \begin_layout Plain Layout
3097 \begin_layout Subsubsection
3101 \begin_layout Standard
3102 These tests check whether a .lyx file loads without any terminal messages.
3103 They correspond to the manual operations of simply opening a .lyx file on
3104 the terminal, exiting LyX once the file is loaded, and then checking whether
3105 there is any output from the terminal.
3106 These tests are useful for catching malformed .lyx files and parsing bugs.
3107 They can also be used to find a .lyx file in which an instance of something
3109 To do this, compile LyX with a local patch that outputs something to the
3110 terminal when an instance is found, and then run the check_load tests to
3111 see if any fail, which would mean that the situation occurs in the LyX
3112 documentation files corresponding to the failed tests.
3113 These tests are expectedly fragile: any LyX diagnostic message, which is
3114 not necessarily an error, would cause the tests to fail.
3115 Similarly, any message output by a library (e.g.
3116 Qt) would also cause failure.
3117 There are some messages that the check_load tests are instructed to ignore,
3118 which are stored in the file
3119 \begin_inset Flex Code
3122 \begin_layout Plain Layout
3123 development/autotests/filterCheckWarnings
3131 \begin_layout Standard
3132 Under cmake, the tests are labeled as 'load'.
3135 \begin_layout Subsubsection
3139 \begin_layout Standard
3140 These tests combine lyx2lyx tests with check_load tests.
3141 They fail if either fails.
3144 \begin_layout Subsubsection
3148 \begin_layout Standard
3149 The URL tests are enabled with the
3150 \begin_inset Flex Code
3153 \begin_layout Plain Layout
3154 -DLYX_ENABLE_URLTESTS=ON
3159 CMake flag and are useful for finding broken links in our documentation
3161 If a URL test fails, to see which link in particular was reported as broken,
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3173 These tests are extremely fragile (e.g.
3174 a test can depend on your Internet connection) and a failed URL test should
3175 not be taken too seriously.
3176 URL tests are labeled as
3181 \begin_layout Paragraph
3185 \begin_layout Standard
3186 cmake is required to run the \SpecialChar LyX
3187 tests, running them is not implemented for
3191 \begin_layout Standard
3192 The appropriate commands are:
3195 \begin_layout Itemize
3201 \begin_inset Newline newline
3204 runs all tests with label
3209 \begin_layout Itemize
3212 ctest -R 'check_.*urls'
3215 \begin_inset Newline newline
3218 runs the tests 'check_accessible_urls'
3221 \begin_layout Standard
3222 Associated test results can be examined in ctest-log directory in files
3223 of the form 'LastFailed.*URLS.log'
3226 \begin_layout Subsubsection
3230 \begin_layout Standard
3231 ctest label commands:
3234 \begin_layout Description
3235 \SpecialChar nobreakdash
3236 \SpecialChar nobreakdash
3237 print-labels shows all assigned labels
3240 \begin_layout Description
3241 \SpecialChar nobreakdash
3243 \begin_inset space ~
3246 labelname executes all tests to which this label is assigned to.
3247 A test may have more that one label.
3250 \begin_layout Description
3251 \SpecialChar nobreakdash
3253 \begin_inset space ~
3256 number executes tests in parallel using 'number' simultaneously processes.
3257 Some tests are marked as 'sequencial', for them this parameter has no effect.
3260 \begin_layout Section
3261 Development policies
3264 \begin_layout Standard
3265 This chapter lists some guidelines that should be followed.
3266 This list is not complete, and many guidelines are in separate chapters,
3268 \begin_inset Quotes eld
3271 When is an update of the .lyx file format number needed?
3272 \begin_inset Quotes erd
3276 \begin_inset CommandInset ref
3278 reference "sec:When-is-an"
3285 \begin_layout Subsection
3286 When to set a fixed milestone?
3289 \begin_layout Standard
3290 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
3294 \begin_layout Enumerate
3295 Somebody is actively working on a fix.
3298 \begin_layout Enumerate
3299 The bug is so severe that it would block the release if it is not fixed.
3302 \begin_layout Standard
3303 If a bug is important, but nobody is working on it, and it is no showstopper,
3304 use a milestone like 2.1.x or 2.2.x.
3305 For all other bugs, do not set a milestone at all.
3308 \begin_layout Subsection
3309 Can we add rc entries in stable branch?
3312 \begin_layout Standard
3314 We are supposed to increase the prefs2prefs version number with such things.
3317 \begin_layout Section
3318 Documentation policies
3321 \begin_layout Standard
3322 The main documentation consists of these files:
3325 \begin_layout Description
3326 splash.lyx it is the first file you see after an installation.
3327 We assume that a new user sees this.
3328 It is therefore designed to be as simple as possible.
3329 Therefore please don't add any new formatting, only fix typos etc.
3330 Splash.lyx is up to date for \SpecialChar LyX
3331 2.1.x, currently maintained by Uwe Stöhr.
3334 \begin_layout Description
3335 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
3337 It therefore uses a limited set of formatting.
3338 For example a standard document class.
3339 Since new users will first learn about the formatting possibilities of
3341 please keep this file that simple.
3342 Intro.lyx is up to date for \SpecialChar LyX
3343 2.1.x, currently maintained by Uwe Stöhr.
3346 \begin_layout Description
3347 Tutorial.lyx our tutorial.
3348 It must be always up to date.
3349 Normally there is nothing to add since we don't want to overwhelm new users
3350 with too much details.
3351 The will learn these details while using \SpecialChar LyX
3352 and we have special manuals.
3353 Tutorial.lyx is up to date for \SpecialChar LyX
3354 2.1.x, currently maintained by Uwe Stöhr.
3357 \begin_layout Description
3358 UserGuide.lyx our main user guide.
3359 It covers a mixture of basic and detailed information.
3360 Some information is also in the Math and EmbeddedObjects manual so that
3361 the UserGuide refers to these files.
3362 UserGuide.lyx is up to date for \SpecialChar LyX
3363 2.1.x, currently maintained by Uwe Stöhr.
3366 \begin_layout Description
3367 EmbeddedObjects.lyx a special manual to explain things like tables floats
3370 EmbeddedObjects.lyx is up to date for \SpecialChar LyX
3371 2.1.x, currently maintained by Uwe
3375 \begin_layout Description
3376 Math.lyx a special manual to explain everything regarding math in all detail.
3377 Math.lyx is up to date for \SpecialChar LyX
3378 2.1.x, currently maintained by Uwe Stöhr.
3381 \begin_layout Description
3382 Additional.lyx this manual covers information that would be too much detail
3383 for the UserGuide or would make the UserGuide uncompilable or only compilable
3384 when installing a lot of special \SpecialChar LaTeX
3386 What should be in the UserGuide or better in Additional is a matter of
3388 it is up to you to decide that.
3389 Additional.lyx is not completely up to date for \SpecialChar LyX
3392 \begin_inset space ~
3395 8 is up to date and currently maintained by Uwe Stöhr.
3396 It certainly needs a rewrite and update.
3397 For example many info in chapter
3398 \begin_inset space ~
3401 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
3405 \begin_layout Description
3406 Customization.lyx this manual covers information how to customize \SpecialChar LyX
3408 output formats, operating systems, languages etc.
3409 It is currently completely out of date and needs a major rewrite and update.
3410 If you do this please assure that your information are given for all OSes
3411 and \SpecialChar LaTeX
3412 distributions (meaning be as objective as possible).
3415 \begin_layout Standard
3417 \begin_inset space ~
3420 rules in editing the docs:
3423 \begin_layout Enumerate
3424 If you are not the maintainer of a doc file or a chapter/section, you MUST
3425 use change tracking so that the maintainer could review your changes
3428 \begin_layout Enumerate
3429 Respect the formatting of the document.
3430 The different files use different formatting styles.
3431 That is OK and has historic reasons nobody fully know ;-).
3432 But it is important to be consistent within one file.
3435 \begin_layout Enumerate
3436 All changes you make to a file in one language MUST also go the file in
3437 the other actively maintained languages.
3438 Normally the maintainer does this for you, if you are the maintainer, you
3439 must do this by copying or changing the changed or added text to the other
3440 files so that the translators sees the blue underlined text and know what
3441 they have to translate and what was changed.
3444 \begin_layout Enumerate
3445 You MUST assure that the document is compilable as
3446 \begin_inset Quotes eld
3450 \begin_inset Quotes erd