1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \origin /systemlyxdir/doc/
7 \options BCOR8mm,captions=tableheading
8 \use_default_options false
12 \maintain_unincluded_children false
14 \language_package default
17 \font_roman "lmodern" "default"
18 \font_sans "lmss" "default"
19 \font_typewriter "lmtt" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts false
25 \font_sf_scale 100 100
26 \font_tt_scale 100 100
28 \default_output_format pdf2
30 \bibtex_command default
31 \index_command default
35 \pdf_title "LyX's Development manual"
36 \pdf_author "LyX Team"
37 \pdf_subject "LyX's development documentation"
38 \pdf_keywords "LyX, Documentation, Development"
40 \pdf_bookmarksnumbered true
41 \pdf_bookmarksopen true
42 \pdf_bookmarksopenlevel 1
47 \pdf_pdfusetitle false
48 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
51 \use_package amsmath 1
52 \use_package amssymb 1
55 \use_package mathdots 1
56 \use_package mathtools 0
58 \use_package stackrel 0
59 \use_package stmaryrd 0
60 \use_package undertilde 0
62 \cite_engine_type default
66 \paperorientation portrait
70 \notefontcolor #0000ff
77 \paragraph_separation indent
78 \paragraph_indentation default
79 \quotes_language english
82 \paperpagestyle headings
83 \tracking_changes false
93 Developing \SpecialChar LyX
97 \begin_layout Subtitle
102 by the \SpecialChar LyX
107 \begin_layout Plain Layout
109 If you have comments or error corrections, please send them to the \SpecialChar LyX
112 \begin_inset Flex Code
115 \begin_layout Plain Layout
117 <lyx-docs@lists.lyx.org>
130 \begin_layout Standard
131 \begin_inset CommandInset toc
132 LatexCommand tableofcontents
139 \begin_layout Section
143 \begin_layout Standard
144 This manual documents some aspects of \SpecialChar LyX
146 It is currently rather incomplete, but will hopefully be extended in the
148 Meanwhile, additional information can be found in the
149 \begin_inset Flex Code
152 \begin_layout Plain Layout
158 subfolder of the \SpecialChar LyX
159 source code distribution.
160 This document is not translated, since the development language of \SpecialChar LyX
163 If you want to use \SpecialChar LyX
164 you don't need to read this manual.
165 However, if you want to learn more about how \SpecialChar LyX
166 is developed, or even want
167 to participate in \SpecialChar LyX
168 development, you may find some interesting information.
171 \begin_layout Section
175 \begin_layout Standard
177 uses several custom file formats for configuration files and documents.
178 This chapter contains some background concerning these file formats.
179 Several file formats are also described in detail in the regular user documenta
183 \begin_layout Subsection
187 \begin_layout Subsection
188 When is an update of the .lyx file format number needed?
189 \begin_inset CommandInset label
191 name "sec:When-is-an"
198 \begin_layout Standard
199 When you are working on a new feature you may ask yourself whether it needs
200 an update of the .lyx file format number.
201 Whether an update is needed or not is not always obvious.
202 Below you can find a list of reasons for file format updates with explanations:
205 \begin_layout Description
214 setting Whenever you introduce a new setting that is stored in the document
215 header, a file format update is needed.
216 This is also true if you add a new valid value to an existing setting,
218 \begin_inset space \thinspace{}
222 \begin_inset space \space{}
225 a new language that is stored in
226 \begin_inset Flex Code
229 \begin_layout Plain Layout
240 \begin_layout Description
249 setting If a certain setting becomes obsolete and gets removed, a file format
253 \begin_layout Description
258 inset Of course a new inset requires a file format update.
261 \begin_layout Description
266 style in any layout file or module shipped with \SpecialChar LyX
267 , or new shipped layout
269 These requirements are currently under discussion and might change in the
273 \begin_layout Description
286 package Any new math package that is automatically loaded needs a file format
288 The reason for this is that there is no true ERT inset for math formulas:
289 Each command is parsed, and if a user happens to define a local command
290 with the same name as a command that triggers an automatic load of a package,
291 he needs to be able to switch off the automatic loading of that package.
292 This switch is stored by the
293 \begin_inset Flex Code
296 \begin_layout Plain Layout
305 \begin_layout Standard
306 If you are still unsure, please ask on the development list.
309 \begin_layout Subsection
310 How to update the file format number of .lyx files
311 \begin_inset CommandInset label
313 name "subsec:update_lyx_files"
320 \begin_layout Standard
321 Once you came to the conclusion that a file format update is needed you
322 should use the following procedure to perform the update:
325 \begin_layout Enumerate
326 Implement and test the new feature, including the reading and writing of
328 Note that any file produced at this stage does not use a valid format,
329 so do not use this version of \SpecialChar LyX
330 for working on any important documents.
333 \begin_layout Enumerate
334 Describe the new format in
335 \begin_inset Flex Code
338 \begin_layout Plain Layout
347 \begin_layout Enumerate
348 Update the \SpecialChar LyX
349 file format number in
350 \begin_inset Flex Code
353 \begin_layout Plain Layout
362 \begin_layout Enumerate
363 Update the range of file formats in the array
364 \begin_inset Flex Code
367 \begin_layout Plain Layout
374 \begin_inset Flex Code
377 \begin_layout Plain Layout
386 \begin_layout Enumerate
387 Add an entry to both format lists (for conversion and reversion) in
388 \begin_inset Newline newline
392 \begin_inset Flex Code
395 \begin_layout Plain Layout
396 lib/lyx2lyx/lyx_2_2.py
402 Add a conversion routine if needed (e.
403 \begin_inset space \thinspace{}
407 \begin_inset space \space{}
410 a new header setting always needs a conversion that adds the new setting,
411 a new document language does not need one).
412 Add a reversion routine if needed.
413 While the conversion routine is required to produce a document that is
414 equivalent to the old version, the requirements of the reversion are not
416 If possible, try to produce a proper reversion, using ERT if needed, but
417 for some features this might be too complicated.
418 In this case, the minimum requirement of the reversion routine is that
419 it produces a valid document which can be read by an older \SpecialChar LyX
421 If absolutely needed, even data loss is allowed for the reversion.
424 \begin_layout Enumerate
425 Since tex2lyx has several implicit file format dependencies caused by sharing
426 code with \SpecialChar LyX
427 , updating the file format of .lyx files produced by tex2lyx at
428 the same time as updating the main .lyx file format is strongly recommended.
429 Therefore, a compiler warning will be issued if the \SpecialChar LyX
430 and tex2lyx .lyx file
431 format numbers differ.
432 In many cases the tex2lyx update requires only the first and last item
434 \begin_inset Separator parbreak
441 \begin_layout Enumerate
442 Update the tex2lyx file format number in
443 \begin_inset Flex Code
446 \begin_layout Plain Layout
455 \begin_layout Enumerate
456 If the lyx2lyx conversion from the old to the new format is empty, or if
457 tex2lyx does not yet output the changed feature, you do not need any further
459 Otherwise, search for the changed feature in tex2lyx, and adjust the output
460 according to the lyx2lyx changes.
463 \begin_layout Enumerate
464 Update the tex2lyx test references as described in
465 \begin_inset CommandInset ref
466 LatexCommand formatted
467 reference "sec:Updating-test-references"
475 \begin_layout Enumerate
476 If you did not implement full tex2lyx support of the new feature, add a
478 \begin_inset Flex Code
481 \begin_layout Plain Layout
487 describing the missing bits.
488 Note that it is perfectly fine if you do not add full tex2lyx support for
489 a new feature: The updating recommendation above is only issued for the
490 syntax of the produced .lyx file.
491 It is no problem if some features supported by \SpecialChar LyX
492 are still output as ERT
493 by tex2lyx, since the problems in the past that resulted in the update
494 recommendation were related to mixed version syntax, not ERT.
497 \begin_layout Enumerate
498 It would be nice if you could create a .lyx test file which contains instances
499 of all changed or added features.
500 This could then be used to test lyx2lyx and tex2lyx.
501 Unfortunately it has not yet been decided how to collect such examples,
502 so please ask on the development list if you want to create one.
505 \begin_layout Enumerate
506 \begin_inset CommandInset label
508 name "enu:updatefiles"
512 Update LyX's .lyx documentation files to the new format.
513 The developer who makes the change knows best what changes to expect when
514 inspecting the resulting diff.
515 Because of this, you might be able to catch a bug in the lyx2lyx code that
516 updates the format just by taking a quick scan through the large diff that
518 \begin_inset Note Note
521 \begin_layout Plain Layout
522 Another advantage is that if later we suspect a bug in lyx2lyx we can easily
523 see which layout update made an unexpected change by looking at the git
524 log of a .lyx file that suffers the problem.
530 To do this, first make sure that there are no changes to the git repository
531 that you will not want to commit (this is needed because it will be convenient
532 to commit with the command
533 \begin_inset Flex Code
536 \begin_layout Plain Layout
543 Then run the following command in the root folder of the source:
544 \begin_inset Flex Code
547 \begin_layout Plain Layout
548 python development/tools/updatedocs.py
554 Then, revert the change to
555 \begin_inset Flex Code
558 \begin_layout Plain Layout
564 because that file is meant to be generated separately:
565 \begin_inset Flex Code
568 \begin_layout Plain Layout
569 git checkout lib/doc/LFUNs.lyx
575 \begin_inset Note Note
578 \begin_layout Plain Layout
579 TODO: this step should be done within updatedocs.py
585 Look at the resulting changes using the command
586 \begin_inset Flex Code
589 \begin_layout Plain Layout
596 If anything looks surprising, please investigate.
597 Finally, commit using
598 \begin_inset Flex Code
601 \begin_layout Plain Layout
610 \begin_layout Subsection
611 Updating the file format number of layout files
614 \begin_layout Standard
616 \begin_inset CommandInset ref
618 reference "enu:updatefiles"
623 \begin_inset CommandInset ref
625 reference "subsec:update_lyx_files"
630 \begin_inset Flex Code
633 \begin_layout Plain Layout
639 command, use this command:
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
644 python development/tools/updatelayouts.py
652 \begin_layout Standard
653 Note that we do not update the local layout of our
654 \begin_inset Flex Code
657 \begin_layout Plain Layout
663 files because users would then not be able to export to older formats.
664 For example, if a 2.2.0 user exported a template to 2.1.x format and tried
665 to open the file in LyX 2.1.x, there would be an error because the file would
666 contain a local layout whose format is too new.
667 The root reason for this is that we do not support converting layouts to
668 older layout formats, as we do for the
669 \begin_inset Flex Code
672 \begin_layout Plain Layout
681 \begin_layout Subsection
682 Updating the file format number of bind/ui files
685 \begin_layout Standard
687 \begin_inset CommandInset ref
689 reference "enu:updatefiles"
694 \begin_inset CommandInset ref
696 reference "subsec:update_lyx_files"
701 \begin_inset Flex Code
704 \begin_layout Plain Layout
710 command, use this command:
711 \begin_inset Flex Code
714 \begin_layout Plain Layout
715 bash development/tools/updatelfuns.sh
723 \begin_layout Subsection
724 Backporting new styles to the stable version
727 \begin_layout Standard
728 Starting with the stable \SpecialChar LyX
729 2.1 branch, there is a mechanism in place to backport
730 new styles to the stable version without the need to update the file format.
731 The basic idea is that the new style definition is automatically copied
732 to the document preamble, so that it can even be used by older minor revisions
733 that did not yet include the style.
734 To backport a new style to the stable version, the following steps are
738 \begin_layout Enumerate
740 \begin_inset Flex Code
743 \begin_layout Plain Layout
749 to the style definition in the development version.
752 \begin_layout Enumerate
753 Copy the style definition to the stable version, but use
754 \begin_inset Flex Code
757 \begin_layout Plain Layout
764 If needed adjust the format to the one used by the stable version (see
765 the customization manual for details of the layout file format).
768 \begin_layout Enumerate
769 For each update of the style in a later stable version, increase the argument
771 \begin_inset Flex Code
774 \begin_layout Plain Layout
780 by one (in the stable version, the development version should not be touched).
783 \begin_layout Standard
784 For details about the
785 \begin_inset Flex Code
788 \begin_layout Plain Layout
794 flag see the customization manual.
796 \begin_inset Flex Code
799 \begin_layout Plain Layout
805 support is needed for backported styles: Since the style of the development
806 version has an infinite version number, it will always be used.
807 Furthermore, since its version number is less than one, the style will
808 not be written anymore to the document header for files saved by the new
812 \begin_layout Standard
813 \begin_inset Newpage newpage
819 \begin_layout Section
823 \begin_layout Standard
824 Automated tests are an important tool to detect bugs and regressions in
825 software development.
826 Some projects like gcc even require each bug fix to be accompanied by a
827 test case for the automatic test suite, that would detect this bug.
828 Testing interactive features automatically is of course very hard, but
829 core functionality like document import and export can be tested quite
830 easily, and some tests of this kind exist.
833 \begin_layout Subsection
837 \begin_layout Standard
838 There are attempts to set up a suite of unit tests for LyX.
841 \begin_layout Standard
842 TODO: describe what is done and what is still to do.
845 \begin_layout Subsection
849 \begin_layout Standard
850 The tex2lyx tests are located in the
851 \begin_inset Flex Code
854 \begin_layout Plain Layout
860 subfolder of the \SpecialChar LyX
861 source code distribution.
862 The actual testing is performed by the simple python script
863 \begin_inset Flex Code
866 \begin_layout Plain Layout
867 src/tex2lyx/test/runtests.py
873 Each test consists of two files:
874 \begin_inset Flex Code
877 \begin_layout Plain Layout
883 contains the \SpecialChar LaTeX
884 code that should be tested.
886 \begin_inset Flex Code
889 \begin_layout Plain Layout
895 contains the expected output of tex2lyx.
896 When a test is run, the actual produced output is compared with the stored
898 The test passes if both are identical.
899 The test machinery is also able to generate a file
900 \begin_inset Flex Code
903 \begin_layout Plain Layout
909 by exporting the produced .lyx file with \SpecialChar LyX
911 This may be useful for roundtrip comparisons.
914 \begin_layout Subsubsection
918 \begin_layout Standard
919 The tex2lyx tests can be run in several ways.
921 \begin_inset Flex Code
924 \begin_layout Plain Layout
930 subfolder of the build directory, the commands
931 \begin_inset Flex Code
934 \begin_layout Plain Layout
940 (cmake, all platforms),
941 \begin_inset Flex Code
944 \begin_layout Plain Layout
950 (cmake, when using a make based build system and not MSVC) or
951 \begin_inset Flex Code
954 \begin_layout Plain Layout
960 (autotools) will run the tex2lyx tests.
961 Alternatively, in the root of the build directory, the command
962 \begin_inset Flex Code
965 \begin_layout Plain Layout
971 runs all tests whose names match the regex
972 \begin_inset Quotes eld
976 \begin_inset Quotes erd
980 Another way to run the tex2lyx tests in the root build directory is to
981 instead use the command
982 \begin_inset Flex Code
985 \begin_layout Plain Layout
986 ctest -L '(cmplyx|roundtrip)'
991 , which runs all tests categorized with the label
992 \begin_inset Quotes eld
996 \begin_inset Quotes erd
1000 \begin_inset Quotes eld
1004 \begin_inset Quotes erd
1008 If a test fails, the differences between the expected and actual results
1009 are output in unified diff format.
1012 \begin_layout Subsubsection
1013 Updating test references
1014 \begin_inset CommandInset label
1016 name "sec:Updating-test-references"
1023 \begin_layout Standard
1024 In some cases a changed tex2lyx output is not a test failure, but wanted,
1026 \begin_inset space \thinspace{}
1030 \begin_inset space \space{}
1033 if a tex2lyx bug was fixed, or a new feature was added.
1034 In these cases the stored references need to be updated.
1035 To do so if using autotools, call
1036 \begin_inset Flex Code
1039 \begin_layout Plain Layout
1046 \begin_inset Flex Code
1049 \begin_layout Plain Layout
1055 subdirectory of the build directory.
1056 If instead using CMake, call
1057 \begin_inset Flex Code
1060 \begin_layout Plain Layout
1061 make updatetex2lyxtests
1066 in the build directory or in the
1067 \begin_inset Flex Code
1070 \begin_layout Plain Layout
1076 subdirectory of the build directory.
1080 \begin_layout Plain Layout
1081 Note that this is a case where a make target in the build directory can
1082 affect the source directory, which might not be advisable.
1087 On Windows do the following:
1090 \begin_layout Itemize
1091 Assure that the path to the python.exe is in your system PATH variable.
1094 \begin_layout Itemize
1095 Double-click on the file
1096 \begin_inset Flex Code
1099 \begin_layout Plain Layout
1100 updatetex2lyxtests.vcxproj
1105 in the build directory or in the
1106 \begin_inset Flex Code
1109 \begin_layout Plain Layout
1115 subdirectory of your build directory.
1118 \begin_layout Itemize
1119 In the appearing MSVC program right-click on the project
1123 in the project explorer and chose
1130 \begin_layout Standard
1131 For convenience, these commands also produce re-exported roundtrip .lyx.tex
1133 Please examine the changed output carefully before committing the changed
1134 files to the repository: Since the test machinery does not do a roundtrip
1136 \begin_inset Formula $\Rightarrow$
1140 \begin_inset Formula $\Rightarrow$
1143 .tex, and does not compare the produced dvi or pdf output, it assumes that
1144 the stored .lyx reference produces correct output if processed by \SpecialChar LyX
1146 There is only one chance to detect wrong output: before committing a new
1148 Once it is committed, it is quite difficult to verify whether it is correct.
1151 \begin_layout Standard
1156 update the test references by opening them with \SpecialChar LyX
1157 or directly running lyx2lyx
1159 This would not work, since lyx2lyx and \SpecialChar LyX
1160 produce slightly different files
1161 regarding insignificant whitespace and line breaks.
1164 \begin_layout Subsubsection
1168 \begin_layout Standard
1169 In many cases tests for new features may be added to one of the existing
1170 test files, but sometimes this is not possible or not wanted.
1171 Then a new test file needs to be added:
1174 \begin_layout Enumerate
1176 \begin_inset Flex Code
1179 \begin_layout Plain Layout
1180 src/tex2lyx/test/<test name>.tex
1185 and run tex2lyx in roundtrip mode to produce the file
1186 \begin_inset Flex Code
1189 \begin_layout Plain Layout
1190 src/tex2lyx/test/<test name>.lyx.lyx
1196 This file will be the new reference.
1199 \begin_layout Enumerate
1200 Once you confirmed that the tex2lyx output is correct, add the new files
1201 to the corresponding lists in
1202 \begin_inset Flex Code
1205 \begin_layout Plain Layout
1206 src/tex2lyx/test/runtests.py
1212 \begin_inset Flex Code
1215 \begin_layout Plain Layout
1216 src/tex2lyx/Makefile.am
1222 \begin_inset Flex Code
1225 \begin_layout Plain Layout
1226 src/tex2lyx/test/CMakeLists.txt
1234 \begin_layout Enumerate
1235 Commit the changes to the repository, or send a patch to the development
1236 list and ask for committing if you do not have commit rights.
1239 \begin_layout Subsection
1240 ctest automatic tests (cmake only)
1243 \begin_layout Standard
1244 Some tests are located in the
1245 \begin_inset Flex Code
1248 \begin_layout Plain Layout
1249 development/autotests
1254 subfolder of the \SpecialChar LyX
1255 source code distribution.
1257 \begin_inset Flex Code
1260 \begin_layout Plain Layout
1266 is required to run the automatic \SpecialChar LyX
1267 tests, running them is not implemented
1272 \begin_layout Standard
1273 The \SpecialChar LyX
1274 tests can be run by the commands
1275 \begin_inset Flex Code
1278 \begin_layout Plain Layout
1285 \begin_inset Flex Code
1288 \begin_layout Plain Layout
1294 (when using a make based build system and not MSVC) in the
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1304 subfolder of the build directory.
1307 \begin_layout Subsubsection
1311 \begin_layout Standard
1312 The export tests are integration tests.
1313 They take longer to run and are more likely to break than the tex2lyx tests.
1314 Nevertheless, they have caught many regressions and without a better alternativ
1315 e it is important to keep them up-to-date and understand how they work.
1318 \begin_layout Standard
1320 \begin_inset Quotes eld
1324 \begin_inset Quotes erd
1327 documentation, template, and example files trying to export them to all
1328 supported output formats.
1329 In addition, there are a number of dedicated sample documents under
1330 \begin_inset Flex Code
1333 \begin_layout Plain Layout
1342 \begin_layout Paragraph
1343 Expectations of LyX developers
1346 \begin_layout Standard
1347 Because the export tests are integration tests and take a long time to run,
1348 LyX developers are rarely expected to run all of the tests.
1349 Here are some good practices to follow by developers:
1352 \begin_layout Itemize
1353 When making a non-trivial change to a .layout file, run the export and layout
1354 tests corresponding with that .layout file.
1357 \begin_layout Itemize
1358 When making non-trivial changes to a .lyx file, run the export tests correspondin
1359 g to that .lyx file.
1362 \begin_layout Itemize
1363 When making non-trivial changes to LyX's \SpecialChar LaTeX
1365 touching the encoding code or package handling code that you expect will
1366 change the exported \SpecialChar LaTeX
1371 \begin_layout Standard
1372 \paragraph_spacing single
1373 Consider running all of the export tests before and after your change.
1374 If there are differences, please reconcile these (i.e.
1375 fix the bug or fix the tests)
1380 Ask for help if you're not sure what to.
1383 \begin_layout Standard
1384 If you do not want to run the tests,
1387 \begin_layout Itemize
1388 post the patch on the list and others will run the tests and eventually
1392 \begin_layout Itemize
1393 commit, but be prepared to fix eventually arising problems or to revert
1394 the commit if there is no easy fix.
1398 \begin_layout Itemize
1399 Understand how to interpret test failures.
1400 If your commit is found to have broken a test, you should be able to interpret
1401 the test results when made aware of them.
1403 \begin_inset CommandInset ref
1405 reference "subsec:Interpreting-export-tests"
1412 \begin_layout Paragraph
1413 \begin_inset CommandInset label
1415 name "par:Configuring-ctests"
1419 Configuring the tests
1422 \begin_layout Standard
1423 To enable the export autotests, add the
1424 \begin_inset Flex Code
1427 \begin_layout Plain Layout
1428 -DLYX_ENABLE_EXPORT_TESTS=ON
1437 \begin_layout Standard
1438 \begin_inset Flex Code
1441 \begin_layout Plain Layout
1442 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1450 \begin_layout Standard
1452 This flag will increase the time for the cmake command by several seconds,
1453 mainly because of the process of inverting tests (see Section
1454 \begin_inset CommandInset ref
1456 reference "subsec:Interpreting-export-tests"
1463 \begin_layout Paragraph
1467 \begin_layout Standard
1468 To run all tests, in the build directory simply run the command
1469 \begin_inset Flex Code
1472 \begin_layout Plain Layout
1482 \begin_layout Standard
1483 To run only some of the tests, use command line options:
1486 \begin_layout Labeling
1487 \labelwidthstring -R
1488 \begin_inset Flex Code
1491 \begin_layout Plain Layout
1497 Run only the tests whose names match the given regular expression.
1500 \begin_layout Labeling
1501 \labelwidthstring -R
1502 \begin_inset Flex Code
1505 \begin_layout Plain Layout
1511 Run only the tests whose labels match the given regular expression.
1512 A test may have more that one label.
1517 \begin_layout Standard
1518 For example, to run only the export tests, you can use
1519 \begin_inset Flex Code
1522 \begin_layout Plain Layout
1532 \begin_layout Labeling
1533 \labelwidthstring -R
1534 \begin_inset Flex Code
1537 \begin_layout Plain Layout
1543 Exclude the tests whose names match the given regular expression.
1546 \begin_layout Labeling
1547 \labelwidthstring -R
1548 \begin_inset Flex Code
1551 \begin_layout Plain Layout
1557 Exclude the tests whose labels match the given regular expression.
1560 \begin_layout Standard
1561 The following options help to find good selection patterns:
1564 \begin_layout Labeling
1565 \labelwidthstring -R
1566 \begin_inset Flex Code
1569 \begin_layout Plain Layout
1575 List the tests that would be run but not actually run them.
1580 \begin_layout Standard
1581 Useful in conjunction with the -R, -L, -E and -LE options, e.g., if you want
1582 to know how many tests there are or whether your
1583 \begin_inset Flex Code
1586 \begin_layout Plain Layout
1592 regular expression did what you expected.
1596 \begin_layout Labeling
1597 \labelwidthstring -R
1598 \begin_inset Flex Code
1601 \begin_layout Plain Layout
1602 \SpecialChar nobreakdash
1603 \SpecialChar nobreakdash
1609 print the list of all labels associated with the test set.
1610 Can also be combined with -R, -L, -E, ...
1614 \begin_layout Standard
1615 Other relevant options are:
1618 \begin_layout Labeling
1619 \labelwidthstring -R
1620 \begin_inset Flex Code
1623 \begin_layout Plain Layout
1629 Run the tests in parallel using the given number of jobs.
1633 \begin_layout Standard
1634 We are still working on getting the tests to run in parallel.
1635 However, when running the tests in parallel, sometimes tests fail that
1636 pass when run sequentially.
1637 A reasonable approach is to first run the tests in parallel and then run
1638 the failed tests sequentially.
1642 \begin_layout Standard
1643 For example, to run 8 jobs at a time:
1646 \begin_layout Standard
1647 \begin_inset Flex Code
1650 \begin_layout Plain Layout
1659 \begin_layout Standard
1660 \begin_inset Flex Code
1663 \begin_layout Plain Layout
1664 ctest \SpecialChar nobreakdash
1665 \SpecialChar nobreakdash
1674 \begin_layout Standard
1676 Note that some tests cannot be run in parallel.
1677 These tests are marked in the code with the
1678 \begin_inset Flex Code
1681 \begin_layout Plain Layout
1692 \begin_layout Labeling
1693 \labelwidthstring -R
1694 \begin_inset Flex Code
1697 \begin_layout Plain Layout
1698 \SpecialChar nobreakdash
1699 \SpecialChar nobreakdash
1705 Set a global timeout on all tests that do not already have a timeout set
1710 \begin_layout Standard
1711 There have been bugs in LyX and in \SpecialChar LaTeX
1712 which cause compilation to hang, and
1713 without a timeout a test might never stop (in one case there was even a
1715 If a test times out, the
1716 \begin_inset Flex Code
1719 \begin_layout Plain Layout
1725 command exits with error, but you can distinguish between a timed out test
1726 and a failed test in the output reported at the end of the
1727 \begin_inset Flex Code
1730 \begin_layout Plain Layout
1740 \begin_layout Standard
1742 \begin_inset Flex Code
1745 \begin_layout Plain Layout
1751 ) the full list of command line options.
1754 \begin_layout Paragraph
1755 \begin_inset CommandInset label
1757 name "subsec:Interpreting-export-tests"
1761 Interpreting the export test results
1764 \begin_layout Standard
1765 A test can fail for several reasons, not all of them bad.
1768 \begin_layout Enumerate
1769 The .lyx file could have been added recently and some formats are not expected
1773 \begin_layout Enumerate
1774 A dependency is not met (e.g.
1775 the \SpecialChar LaTeX
1777 One hint that this is the case is that the corresponding
1778 \begin_inset Flex Code
1781 \begin_layout Plain Layout
1787 test will likely also fail.
1790 \begin_layout Enumerate
1791 An inverted test fails to fail (i.e.
1792 export that previously failed now works).
1795 \begin_layout Enumerate
1796 An external dependency was updated (e.g.
1801 \begin_layout Enumerate
1802 A recent code change introduced a bug.
1805 \begin_layout Enumerate
1806 \begin_inset CommandInset label
1812 A change in a document exposed a previously unknown bug or an incompatibility
1813 with an export format (e.g.
1814 Lua\SpecialChar LaTeX
1818 \begin_layout Standard
1819 Because the .lyx files are exported in several formats, it is not surprising
1820 that many of the exports fail.
1821 This expectation of failure is addressed by
1822 \begin_inset Quotes eld
1826 \begin_inset Quotes erd
1829 the tests, that is, by marking the test as
1830 \begin_inset Quotes eld
1834 \begin_inset Quotes erd
1837 if the export exits with error and as
1838 \begin_inset Quotes eld
1842 \begin_inset Quotes erd
1845 if the export succeeds
1850 It follows that these expected failures will not show up as failed tests
1851 in the test results and thus will not pollute the
1852 \begin_inset Quotes eld
1856 \begin_inset Quotes erd
1860 If the export actually succeeds, then the test will fail.
1861 The purpose of this failure is to get your attention—something has changed,
1862 possibly for the better.
1865 \begin_layout Standard
1866 We try to document why a test is inverted or ignored.
1867 See the comment (prefixed with
1868 \begin_inset Flex Code
1871 \begin_layout Plain Layout
1877 ) above the block in which the test is listed as inverted or ignored in
1879 \begin_inset Flex Code
1882 \begin_layout Plain Layout
1883 development/autotests/suspiciousTests
1889 \begin_inset Flex Code
1892 \begin_layout Plain Layout
1893 development/autotests/ignoredTests
1899 It is possible that an export goes from succeeding to failing just because
1900 the document was changed and the document was never expected to work with
1901 a certain export format in the first case.
1902 Once this is confirmed to be the situation, the test can be inverted.
1905 \begin_layout Standard
1906 A good question is why do we enable the tests for non-default formats? The
1907 answer is that if a non-default route is broken it is often because a bug
1908 was introduced in LyX and not because a document-specific change was made
1909 that is not supported by the route.
1910 In other words, there is a high signal/noise ratio in the export tests
1911 for some non-default formats.
1915 \begin_layout Standard
1916 What action should you take if a test fails? This depends:
1919 \begin_layout Standard
1920 Generally, if a change breaks compilation for the target format (for the
1921 manuals pdf2) without solving some important other issue, fix or revert
1922 the commit that led to failure.
1923 If a change breaks compilation for some non-target format (for the manuals
1924 everything except pdf2), invert the test.
1928 \begin_layout Standard
1929 A special case is given, if the export was succeeding before but showing
1930 garbled text in the PDF output.
1931 Try to establish, that when the compilation succeeded before the resulting
1933 Otherwise, it is in fact an improvement when a test fails.
1934 Now it might fail with a clear message of "language xyz not supported".
1935 It is always good to check manually why something fails and if it passes
1936 if the PDF output is good.
1939 \begin_layout Standard
1940 Sometimes a test is fixed as side-effect of some change.
1941 We should uninvert a test (remove it from the
1942 \begin_inset Flex Code
1945 \begin_layout Plain Layout
1951 file) in order to preserve the fix.
1954 \begin_layout Standard
1955 When a test or several tests fail, consider checking the files in the
1956 \begin_inset Flex Code
1959 \begin_layout Plain Layout
1965 subdirectory of your build directory.
1966 In this subdirectory are three files: the file
1967 \begin_inset Flex Code
1970 \begin_layout Plain Layout
1976 simply lists the tests that failed on your last
1977 \begin_inset Flex Code
1980 \begin_layout Plain Layout
1987 \begin_inset Flex Code
1990 \begin_layout Plain Layout
1996 file contains the output from the tests (and often has details explaining
1997 why a test failed); and the
1998 \begin_inset Flex Code
2001 \begin_layout Plain Layout
2007 file lists the times that it took to run the tests.
2010 \begin_layout Paragraph
2014 \begin_layout Standard
2015 These tests fail if the export does
2023 \begin_layout Description
2024 inverted Export fails, but the test cases are subject to be examined.
2025 It is expected that the export will work in a foreseeable future.
2026 They are labeled 'inverted'.
2029 \begin_layout Description
2030 suspended Some inverted tests are labeled 'suspended'.
2031 This means, they are not executed using
2032 \begin_inset Flex Code
2035 \begin_layout Plain Layout
2042 \begin_inset Flex Code
2045 \begin_layout Plain Layout
2052 From time to time they still have to be checked using
2053 \begin_inset Flex Code
2056 \begin_layout Plain Layout
2066 \begin_layout Standard
2067 These tests are suspended, because the export fails for known reasons which
2068 cannot ATM be resolved.
2069 But it is expected the reason might disappear in the future.
2070 Be it new TL or better handling in \SpecialChar LyX
2074 \begin_layout Standard
2075 For ctest commands without the
2076 \begin_inset Flex Code
2079 \begin_layout Plain Layout
2085 parameter nothing changes.
2086 Suspended or not, tests will be executed depending only on the regexes
2087 parameters given to the ctest command.
2091 \begin_layout Paragraph
2095 \begin_layout Standard
2096 These tests are not executed using
2097 \begin_inset Flex Code
2100 \begin_layout Plain Layout
2107 \begin_inset Flex Code
2110 \begin_layout Plain Layout
2120 \begin_layout Standard
2121 They pass or fail for various reasons not related to LyX (nonstandard, erratic)
2122 or pass but should rather fail (wrong output).
2125 \begin_layout Description
2126 nonstandard Documents with additional requirements, e.g.
2127 a class or package file not on CTAN.
2129 \begin_inset Note Note
2132 \begin_layout Plain Layout
2133 TODO: rename to "extra"?
2142 \begin_layout Standard
2143 These tests are labeled as
2149 \begin_layout Description
2150 erratic Tests depending on local configuration, OS, TeX distribution, package
2151 versions, or the phase of the moon.
2153 \begin_inset Note Note
2156 \begin_layout Plain Layout
2161 only for the phase-of-moon dependency.
2170 \begin_layout Standard
2171 These tests are labeled as
2177 \begin_layout Description
2179 \begin_inset space ~
2182 output Export does not fail but the resulting document has errors.
2186 \begin_layout Standard
2187 \paragraph_spacing single
2188 These tests are actually not
2196 (not measuring what they should measure).
2200 \begin_layout Paragraph
2201 Export test filtering
2204 \begin_layout Standard
2205 The assignment of a label to a test is controlled by a set of files with
2206 regular expressions that are matched against the test names.
2209 \begin_layout Description
2210 ignoredTests (small file)
2211 \begin_inset Newline newline
2214 Tests selected here are withdrawn in the configuration step (cf.
2216 \begin_inset CommandInset ref
2218 reference "par:Configuring-ctests"
2226 \begin_layout Labeling
2227 \labelwidthstring 00.00.0000
2228 Input Test of any export combination
2231 \begin_layout Labeling
2232 \labelwidthstring 00.00.0000
2233 Output Stop if tests not selected here
2237 \begin_layout Description
2238 unreliableTests: Tests selected either pass or fail, but that is dependent
2239 on the system where the test is run.
2240 Selected tests gain the label 'unreliable'.
2244 \begin_layout Labeling
2245 \labelwidthstring 00.00.0000
2246 Input Each test which passed 'ignoredTests'
2249 \begin_layout Labeling
2250 \labelwidthstring 00.00.0000
2251 Output Stop if test selected, gain label 'unreliable'.
2255 \begin_layout Description
2257 \begin_inset space \space{}
2264 \begin_layout Labeling
2265 \labelwidthstring 00.00.0000
2266 Input Each test which passed 'unreliableTests'
2269 \begin_layout Labeling
2270 \labelwidthstring 00.00.0000
2271 Output Stop if not selected.
2274 \begin_layout Standard
2275 The following file is meant as subselections of 'suspiciousTests'.
2276 If neither subselection applies, test gains labels 'export' and 'inverted'
2279 \begin_layout Description
2280 suspendedTests Tests selected here gain the label 'suspended' but _not_
2281 'export' or 'inverted', although in ctest they remain inverted.
2282 ('ctest' knows only 'inverted' or not, labels are used only for test selection)
2286 \begin_layout Labeling
2287 \labelwidthstring 00.00.0000
2288 Input Each test selected by 'suspiciousTests'
2291 \begin_layout Labeling
2292 \labelwidthstring 00.00.0000
2293 Output Selected test gains label 'suspended'.
2299 \begin_layout Standard
2300 The following table may clarify label assignement
2303 \begin_layout Standard
2304 \begin_inset Tabular
2305 <lyxtabular version="3" rows="7" columns="12">
2306 <features tabularvalignment="middle">
2307 <column alignment="left" valignment="top" width="0pt">
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="center" valignment="top">
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">
2320 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2323 \begin_layout Plain Layout
2329 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2332 \begin_layout Plain Layout
2338 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2341 \begin_layout Plain Layout
2347 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2350 \begin_layout Plain Layout
2356 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2359 \begin_layout Plain Layout
2360 Marked in ctest, Assigned label
2365 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
2368 \begin_layout Plain Layout
2374 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2377 \begin_layout Plain Layout
2383 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2386 \begin_layout Plain Layout
2392 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2395 \begin_layout Plain Layout
2401 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2404 \begin_layout Plain Layout
2410 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2413 \begin_layout Plain Layout
2419 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2422 \begin_layout Plain Layout
2430 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2433 \begin_layout Plain Layout
2439 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2442 \begin_layout Plain Layout
2448 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2451 \begin_layout Plain Layout
2457 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2460 \begin_layout Plain Layout
2466 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2469 \begin_layout Plain Layout
2475 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2478 \begin_layout Plain Layout
2484 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2487 \begin_layout Plain Layout
2493 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2496 \begin_layout Plain Layout
2502 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2505 \begin_layout Plain Layout
2511 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2514 \begin_layout Plain Layout
2520 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2523 \begin_layout Plain Layout
2529 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2532 \begin_layout Plain Layout
2540 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2543 \begin_layout Plain Layout
2549 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2552 \begin_layout Plain Layout
2558 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2561 \begin_layout Plain Layout
2567 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2570 \begin_layout Plain Layout
2576 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2579 \begin_layout Plain Layout
2585 <cell alignment="center" valignment="top" topline="true" usebox="none">
2588 \begin_layout Plain Layout
2594 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2597 \begin_layout Plain Layout
2603 <cell alignment="center" valignment="top" topline="true" usebox="none">
2606 \begin_layout Plain Layout
2612 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2615 \begin_layout Plain Layout
2621 <cell alignment="center" valignment="top" topline="true" usebox="none">
2624 \begin_layout Plain Layout
2630 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2633 \begin_layout Plain Layout
2639 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2642 \begin_layout Plain Layout
2650 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2653 \begin_layout Plain Layout
2659 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2662 \begin_layout Plain Layout
2668 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2671 \begin_layout Plain Layout
2677 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2680 \begin_layout Plain Layout
2686 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2689 \begin_layout Plain Layout
2695 <cell alignment="center" valignment="top" topline="true" usebox="none">
2698 \begin_layout Plain Layout
2704 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2707 \begin_layout Plain Layout
2713 <cell alignment="center" valignment="top" topline="true" usebox="none">
2716 \begin_layout Plain Layout
2722 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2725 \begin_layout Plain Layout
2731 <cell alignment="center" valignment="top" topline="true" usebox="none">
2734 \begin_layout Plain Layout
2740 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2743 \begin_layout Plain Layout
2749 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2752 \begin_layout Plain Layout
2760 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
2763 \begin_layout Plain Layout
2769 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2772 \begin_layout Plain Layout
2778 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
2781 \begin_layout Plain Layout
2787 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2790 \begin_layout Plain Layout
2796 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2799 \begin_layout Plain Layout
2805 <cell alignment="center" valignment="top" topline="true" usebox="none">
2808 \begin_layout Plain Layout
2814 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2817 \begin_layout Plain Layout
2823 <cell alignment="center" valignment="top" topline="true" usebox="none">
2826 \begin_layout Plain Layout
2832 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2835 \begin_layout Plain Layout
2841 <cell alignment="center" valignment="top" topline="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" rightline="true" usebox="none">
2862 \begin_layout Plain Layout
2870 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2873 \begin_layout Plain Layout
2879 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2882 \begin_layout Plain Layout
2888 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2891 \begin_layout Plain Layout
2897 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2900 \begin_layout Plain Layout
2906 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2909 \begin_layout Plain Layout
2915 <cell alignment="center" valignment="top" topline="true" usebox="none">
2918 \begin_layout Plain Layout
2924 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2927 \begin_layout Plain Layout
2933 <cell alignment="center" valignment="top" topline="true" usebox="none">
2936 \begin_layout Plain Layout
2942 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2945 \begin_layout Plain Layout
2951 <cell alignment="center" valignment="top" topline="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" rightline="true" usebox="none">
2972 \begin_layout Plain Layout
2980 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2983 \begin_layout Plain Layout
2989 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2992 \begin_layout Plain Layout
2998 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3001 \begin_layout Plain Layout
3007 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3010 \begin_layout Plain Layout
3016 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3019 \begin_layout Plain Layout
3025 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3028 \begin_layout Plain Layout
3034 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3037 \begin_layout Plain Layout
3043 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3046 \begin_layout Plain Layout
3052 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3055 \begin_layout Plain Layout
3061 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3064 \begin_layout Plain Layout
3070 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3073 \begin_layout Plain Layout
3079 <cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
3082 \begin_layout Plain Layout
3096 \begin_layout Subsubsection
3100 \begin_layout Standard
3101 These tests check whether a .lyx file loads without any terminal messages.
3102 They correspond to the manual operations of simply opening a .lyx file on
3103 the terminal, exiting LyX once the file is loaded, and then checking whether
3104 there is any output from the terminal.
3105 These tests are useful for catching malformed .lyx files and parsing bugs.
3106 They can also be used to find a .lyx file in which an instance of something
3108 To do this, compile LyX with a local patch that outputs something to the
3109 terminal when an instance is found, and then run the check_load tests to
3110 see if any fail, which would mean that the situation occurs in the LyX
3111 documentation files corresponding to the failed tests.
3112 These tests are expectedly fragile: any LyX diagnostic message, which is
3113 not necessarily an error, would cause the tests to fail.
3114 Similarly, any message output by a library (e.g.
3115 Qt) would also cause failure.
3116 There are some messages that the check_load tests are instructed to ignore,
3117 which are stored in the file
3118 \begin_inset Flex Code
3121 \begin_layout Plain Layout
3122 development/autotests/filterCheckWarnings
3130 \begin_layout Standard
3131 Under cmake, the tests are labeled as 'load'.
3134 \begin_layout Subsubsection
3138 \begin_layout Standard
3139 These tests combine lyx2lyx tests with check_load tests.
3140 They fail if either fails.
3143 \begin_layout Subsubsection
3147 \begin_layout Standard
3148 The URL tests are enabled with the
3149 \begin_inset Flex Code
3152 \begin_layout Plain Layout
3153 -DLYX_ENABLE_URLTESTS=ON
3158 CMake flag and are useful for finding broken links in our documentation
3160 If a URL test fails, to see which link in particular was reported as broken,
3162 \begin_inset Flex Code
3165 \begin_layout Plain Layout
3172 These tests are extremely fragile (e.g.
3173 a test can depend on your Internet connection) and a failed URL test should
3174 not be taken too seriously.
3175 URL tests are labeled as
3180 \begin_layout Paragraph
3184 \begin_layout Standard
3185 cmake is required to run the \SpecialChar LyX
3186 tests, running them is not implemented for
3190 \begin_layout Standard
3191 The appropriate commands are:
3194 \begin_layout Itemize
3200 \begin_inset Newline newline
3203 runs all tests with label
3208 \begin_layout Itemize
3211 ctest -R 'check_.*urls'
3214 \begin_inset Newline newline
3217 runs the tests 'check_accessible_urls'
3220 \begin_layout Standard
3221 Associated test results can be examined in ctest-log directory in files
3222 of the form 'LastFailed.*URLS.log'
3225 \begin_layout Subsubsection
3229 \begin_layout Standard
3230 ctest label commands:
3233 \begin_layout Description
3234 \SpecialChar nobreakdash
3235 \SpecialChar nobreakdash
3236 print-labels shows all assigned labels
3239 \begin_layout Description
3240 \SpecialChar nobreakdash
3242 \begin_inset space ~
3245 labelname executes all tests to which this label is assigned to.
3246 A test may have more that one label.
3249 \begin_layout Description
3250 \SpecialChar nobreakdash
3252 \begin_inset space ~
3255 number executes tests in parallel using 'number' simultaneously processes.
3256 Some tests are marked as 'sequencial', for them this parameter has no effect.
3259 \begin_layout Section
3260 Development policies
3263 \begin_layout Standard
3264 This chapter lists some guidelines that should be followed.
3265 This list is not complete, and many guidelines are in separate chapters,
3267 \begin_inset Quotes eld
3270 When is an update of the .lyx file format number needed?
3271 \begin_inset Quotes erd
3275 \begin_inset CommandInset ref
3277 reference "sec:When-is-an"
3284 \begin_layout Subsection
3285 When to set a fixed milestone?
3288 \begin_layout Standard
3289 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
3293 \begin_layout Enumerate
3294 Somebody is actively working on a fix.
3297 \begin_layout Enumerate
3298 The bug is so severe that it would block the release if it is not fixed.
3301 \begin_layout Standard
3302 If a bug is important, but nobody is working on it, and it is no showstopper,
3303 use a milestone like 2.1.x or 2.2.x.
3304 For all other bugs, do not set a milestone at all.
3307 \begin_layout Subsection
3308 Can we add rc entries in stable branch?
3311 \begin_layout Standard
3313 We are supposed to increase the prefs2prefs version number with such things.
3316 \begin_layout Section
3317 Documentation policies
3320 \begin_layout Standard
3321 The main documentation consists of these files:
3324 \begin_layout Description
3325 splash.lyx it is the first file you see after an installation.
3326 We assume that a new user sees this.
3327 It is therefore designed to be as simple as possible.
3328 Therefore please don't add any new formatting, only fix typos etc.
3329 Splash.lyx is up to date for \SpecialChar LyX
3330 2.1.x, currently maintained by Uwe Stöhr.
3333 \begin_layout Description
3334 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
3336 It therefore uses a limited set of formatting.
3337 For example a standard document class.
3338 Since new users will first learn about the formatting possibilities of
3340 please keep this file that simple.
3341 Intro.lyx is up to date for \SpecialChar LyX
3342 2.1.x, currently maintained by Uwe Stöhr.
3345 \begin_layout Description
3346 Tutorial.lyx our tutorial.
3347 It must be always up to date.
3348 Normally there is nothing to add since we don't want to overwhelm new users
3349 with too much details.
3350 The will learn these details while using \SpecialChar LyX
3351 and we have special manuals.
3352 Tutorial.lyx is up to date for \SpecialChar LyX
3353 2.1.x, currently maintained by Uwe Stöhr.
3356 \begin_layout Description
3357 UserGuide.lyx our main user guide.
3358 It covers a mixture of basic and detailed information.
3359 Some information is also in the Math and EmbeddedObjects manual so that
3360 the UserGuide refers to these files.
3361 UserGuide.lyx is up to date for \SpecialChar LyX
3362 2.1.x, currently maintained by Uwe Stöhr.
3365 \begin_layout Description
3366 EmbeddedObjects.lyx a special manual to explain things like tables floats
3369 EmbeddedObjects.lyx is up to date for \SpecialChar LyX
3370 2.1.x, currently maintained by Uwe
3374 \begin_layout Description
3375 Math.lyx a special manual to explain everything regarding math in all detail.
3376 Math.lyx is up to date for \SpecialChar LyX
3377 2.1.x, currently maintained by Uwe Stöhr.
3380 \begin_layout Description
3381 Additional.lyx this manual covers information that would be too much detail
3382 for the UserGuide or would make the UserGuide uncompilable or only compilable
3383 when installing a lot of special \SpecialChar LaTeX
3385 What should be in the UserGuide or better in Additional is a matter of
3387 it is up to you to decide that.
3388 Additional.lyx is not completely up to date for \SpecialChar LyX
3391 \begin_inset space ~
3394 8 is up to date and currently maintained by Uwe Stöhr.
3395 It certainly needs a rewrite and update.
3396 For example many info in chapter
3397 \begin_inset space ~
3400 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
3404 \begin_layout Description
3405 Customization.lyx this manual covers information how to customize \SpecialChar LyX
3407 output formats, operating systems, languages etc.
3408 It is currently completely out of date and needs a major rewrite and update.
3409 If you do this please assure that your information are given for all OSes
3410 and \SpecialChar LaTeX
3411 distributions (meaning be as objective as possible).
3414 \begin_layout Standard
3416 \begin_inset space ~
3419 rules in editing the docs:
3422 \begin_layout Enumerate
3423 If you are not the maintainer of a doc file or a chapter/section, you MUST
3424 use change tracking so that the maintainer could review your changes
3427 \begin_layout Enumerate
3428 Respect the formatting of the document.
3429 The different files use different formatting styles.
3430 That is OK and has historic reasons nobody fully know ;-).
3431 But it is important to be consistent within one file.
3434 \begin_layout Enumerate
3435 All changes you make to a file in one language MUST also go the file in
3436 the other actively maintained languages.
3437 Normally the maintainer does this for you, if you are the maintainer, you
3438 must do this by copying or changing the changed or added text to the other
3439 files so that the translators sees the blue underlined text and know what
3440 they have to translate and what was changed.
3443 \begin_layout Enumerate
3444 You MUST assure that the document is compilable as
3445 \begin_inset Quotes eld
3449 \begin_inset Quotes erd