]> git.lyx.org Git - lyx.git/blob - lib/doc/Development.lyx
ce2d8c466f640408a4208fb5eb68e59acc0a03f7
[lyx.git] / lib / doc / Development.lyx
1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 503
3 \begin_document
4 \begin_header
5 \origin /systemlyxdir/doc/
6 \textclass scrartcl
7 \options BCOR8mm,captions=tableheading
8 \use_default_options false
9 \begin_modules
10 logicalmkup
11 \end_modules
12 \maintain_unincluded_children false
13 \language english
14 \language_package default
15 \inputencoding auto
16 \fontencoding global
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
23 \font_sc false
24 \font_osf false
25 \font_sf_scale 100 100
26 \font_tt_scale 100 100
27 \graphics default
28 \default_output_format default
29 \output_sync 0
30 \bibtex_command default
31 \index_command default
32 \paperfontsize 12
33 \spacing single
34 \use_hyperref true
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"
39 \pdf_bookmarks true
40 \pdf_bookmarksnumbered true
41 \pdf_bookmarksopen true
42 \pdf_bookmarksopenlevel 1
43 \pdf_breaklinks false
44 \pdf_pdfborder false
45 \pdf_colorlinks true
46 \pdf_backref false
47 \pdf_pdfusetitle false
48 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
49 \papersize a4paper
50 \use_geometry false
51 \use_package amsmath 1
52 \use_package amssymb 1
53 \use_package cancel 0
54 \use_package esint 0
55 \use_package mathdots 1
56 \use_package mathtools 0
57 \use_package mhchem 1
58 \use_package stackrel 0
59 \use_package stmaryrd 0
60 \use_package undertilde 0
61 \cite_engine basic
62 \cite_engine_type default
63 \biblio_style plain
64 \use_bibtopic false
65 \use_indices false
66 \paperorientation portrait
67 \suppress_date false
68 \justification true
69 \use_refstyle 0
70 \notefontcolor #0000ff
71 \index Index
72 \shortcut idx
73 \color #008000
74 \end_index
75 \secnumdepth 4
76 \tocdepth 4
77 \paragraph_separation indent
78 \paragraph_indentation default
79 \quotes_language english
80 \papercolumns 1
81 \papersides 2
82 \paperpagestyle headings
83 \tracking_changes false
84 \output_changes false
85 \html_math_output 0
86 \html_css_as_file 0
87 \html_be_strict true
88 \end_header
89
90 \begin_body
91
92 \begin_layout Title
93 Developing \SpecialChar LyX
94
95 \end_layout
96
97 \begin_layout Subtitle
98 Version 2.2.x
99 \end_layout
100
101 \begin_layout Author
102 by the \SpecialChar LyX
103  Team
104 \begin_inset Foot
105 status collapsed
106
107 \begin_layout Plain Layout
108 \noindent
109 If you have comments or error corrections, please send them to the \SpecialChar LyX
110  Documentatio
111 n mailing list, 
112 \begin_inset Flex Code
113 status collapsed
114
115 \begin_layout Plain Layout
116 \noindent
117 <lyx-docs@lists.lyx.org>
118 \end_layout
119
120 \end_inset
121
122 .
123 \end_layout
124
125 \end_inset
126
127
128 \end_layout
129
130 \begin_layout Standard
131 \begin_inset CommandInset toc
132 LatexCommand tableofcontents
133
134 \end_inset
135
136
137 \end_layout
138
139 \begin_layout Section
140 Introduction
141 \end_layout
142
143 \begin_layout Standard
144 This manual documents some aspects of \SpecialChar LyX
145  development.
146  It is currently rather incomplete, but will hopefully be extended in the
147  future.
148  Meanwhile, additional information can be found in the 
149 \begin_inset Flex Code
150 status collapsed
151
152 \begin_layout Plain Layout
153 development
154 \end_layout
155
156 \end_inset
157
158  subfolder of the \SpecialChar LyX
159  source code distribution.
160  This document is not translated, since the development language of \SpecialChar LyX
161  is
162  English.
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.
169 \end_layout
170
171 \begin_layout Section
172 File formats
173 \end_layout
174
175 \begin_layout Standard
176 \SpecialChar LyX
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
180 tion.
181 \end_layout
182
183 \begin_layout Subsection
184 File Format Numbers
185 \end_layout
186
187 \begin_layout Subsection
188 When is an update of the .lyx file format number needed?
189 \begin_inset CommandInset label
190 LatexCommand label
191 name "sec:When-is-an"
192
193 \end_inset
194
195
196 \end_layout
197
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:
203 \end_layout
204
205 \begin_layout Description
206 New
207 \begin_inset space ~
208 \end_inset
209
210 document
211 \begin_inset space ~
212 \end_inset
213
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,
217  e.
218 \begin_inset space \thinspace{}
219 \end_inset
220
221 g.
222 \begin_inset space \space{}
223 \end_inset
224
225 a new language that is stored in 
226 \begin_inset Flex Code
227 status collapsed
228
229 \begin_layout Plain Layout
230
231 \backslash
232 language
233 \end_layout
234
235 \end_inset
236
237 .
238 \end_layout
239
240 \begin_layout Description
241 Removed
242 \begin_inset space ~
243 \end_inset
244
245 document
246 \begin_inset space ~
247 \end_inset
248
249 setting If a certain setting becomes obsolete and gets removed, a file format
250  update is needed.
251 \end_layout
252
253 \begin_layout Description
254 New
255 \begin_inset space ~
256 \end_inset
257
258 inset Of course a new inset requires a file format update.
259 \end_layout
260
261 \begin_layout Description
262 New
263 \begin_inset space ~
264 \end_inset
265
266 style in any layout file or module shipped with \SpecialChar LyX
267 , or new shipped layout
268  file or module.
269  These requirements are currently under discussion and might change in the
270  future.
271 \end_layout
272
273 \begin_layout Description
274 Automatically
275 \begin_inset space ~
276 \end_inset
277
278 loaded
279 \begin_inset space ~
280 \end_inset
281
282 math
283 \begin_inset space ~
284 \end_inset
285
286 package Any new math package that is automatically loaded needs a file format
287  update.
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
294 status collapsed
295
296 \begin_layout Plain Layout
297 use_package
298 \end_layout
299
300 \end_inset
301
302  header setting.
303 \end_layout
304
305 \begin_layout Standard
306 If you are still unsure, please ask on the development list.
307 \end_layout
308
309 \begin_layout Subsection
310 How to update the file format number of .lyx files
311 \begin_inset CommandInset label
312 LatexCommand label
313 name "subsec:update_lyx_files"
314
315 \end_inset
316
317
318 \end_layout
319
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:
323 \end_layout
324
325 \begin_layout Enumerate
326 Implement and test the new feature, including the reading and writing of
327  .lyx files.
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.
331 \end_layout
332
333 \begin_layout Enumerate
334 Describe the new format in 
335 \begin_inset Flex Code
336 status collapsed
337
338 \begin_layout Plain Layout
339 development/FORMAT
340 \end_layout
341
342 \end_inset
343
344 .
345 \end_layout
346
347 \begin_layout Enumerate
348 Update the \SpecialChar LyX
349  file format number in 
350 \begin_inset Flex Code
351 status collapsed
352
353 \begin_layout Plain Layout
354 src/version.h
355 \end_layout
356
357 \end_inset
358
359 .
360 \end_layout
361
362 \begin_layout Enumerate
363 Update the range of file formats in the array 
364 \begin_inset Flex Code
365 status collapsed
366
367 \begin_layout Plain Layout
368 format_relation
369 \end_layout
370
371 \end_inset
372
373  in 
374 \begin_inset Flex Code
375 status collapsed
376
377 \begin_layout Plain Layout
378 lib/lyx2lyx/LyX.py
379 \end_layout
380
381 \end_inset
382
383 .
384 \end_layout
385
386 \begin_layout Enumerate
387 Add an entry to both format lists (for conversion and reversion) in
388 \begin_inset Newline newline
389 \end_inset
390
391
392 \begin_inset Flex Code
393 status collapsed
394
395 \begin_layout Plain Layout
396 lib/lyx2lyx/lyx_2_2.py
397 \end_layout
398
399 \end_inset
400
401 .
402  Add a conversion routine if needed (e.
403 \begin_inset space \thinspace{}
404 \end_inset
405
406 g.
407 \begin_inset space \space{}
408 \end_inset
409
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
415  that strict.
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
420 .
421  If absolutely needed, even data loss is allowed for the reversion.
422 \end_layout
423
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
433  of the list below:
434 \begin_inset Separator parbreak
435 \end_inset
436
437
438 \end_layout
439
440 \begin_deeper
441 \begin_layout Enumerate
442 Update the tex2lyx file format number in 
443 \begin_inset Flex Code
444 status collapsed
445
446 \begin_layout Plain Layout
447 src/version.h
448 \end_layout
449
450 \end_inset
451
452 .
453 \end_layout
454
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
458  tex2lyx changes.
459  Otherwise, search for the changed feature in tex2lyx, and adjust the output
460  according to the lyx2lyx changes.
461 \end_layout
462
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"
468
469 \end_inset
470
471 .
472 \end_layout
473
474 \end_deeper
475 \begin_layout Enumerate
476 If you did not implement full tex2lyx support of the new feature, add a
477  line to 
478 \begin_inset Flex Code
479 status collapsed
480
481 \begin_layout Plain Layout
482 src/tex2lyx/TODO.txt
483 \end_layout
484
485 \end_inset
486
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.
495 \end_layout
496
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.
503 \end_layout
504
505 \begin_layout Enumerate
506 \begin_inset CommandInset label
507 LatexCommand label
508 name "enu:updatefiles"
509
510 \end_inset
511
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
517  is the result
518 \begin_inset Note Note
519 status collapsed
520
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.
525 \end_layout
526
527 \end_inset
528
529 .
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
534 status collapsed
535
536 \begin_layout Plain Layout
537 git commit -a
538 \end_layout
539
540 \end_inset
541
542 ).
543  Then run the following command in the root folder of the source: 
544 \begin_inset Flex Code
545 status collapsed
546
547 \begin_layout Plain Layout
548 python development/tools/updatedocs.py
549 \end_layout
550
551 \end_inset
552
553 .
554  Then, revert the change to 
555 \begin_inset Flex Code
556 status collapsed
557
558 \begin_layout Plain Layout
559 LFUNs.lyx
560 \end_layout
561
562 \end_inset
563
564  because that file is meant to be generated separately: 
565 \begin_inset Flex Code
566 status collapsed
567
568 \begin_layout Plain Layout
569 git checkout lib/doc/LFUNs.lyx
570 \end_layout
571
572 \end_inset
573
574
575 \begin_inset Note Note
576 status collapsed
577
578 \begin_layout Plain Layout
579 TODO: this step should be done within updatedocs.py
580 \end_layout
581
582 \end_inset
583
584 .
585  Look at the resulting changes using the command 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 git diff
591 \end_layout
592
593 \end_inset
594
595 .
596  If anything looks surprising, please investigate.
597  Finally, commit using 
598 \begin_inset Flex Code
599 status collapsed
600
601 \begin_layout Plain Layout
602 git commit -a
603 \end_layout
604
605 \end_inset
606
607 .
608 \end_layout
609
610 \begin_layout Subsection
611 Updating the file format number of layout files
612 \end_layout
613
614 \begin_layout Standard
615 See step 
616 \begin_inset CommandInset ref
617 LatexCommand ref
618 reference "enu:updatefiles"
619
620 \end_inset
621
622  in section 
623 \begin_inset CommandInset ref
624 LatexCommand ref
625 reference "subsec:update_lyx_files"
626
627 \end_inset
628
629  but instead of the 
630 \begin_inset Flex Code
631 status collapsed
632
633 \begin_layout Plain Layout
634 updatedocs.py
635 \end_layout
636
637 \end_inset
638
639  command, use this command: 
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 python development/tools/updatelayouts.py
645 \end_layout
646
647 \end_inset
648
649 .
650 \end_layout
651
652 \begin_layout Standard
653 Note that we do not update the local layout of our 
654 \begin_inset Flex Code
655 status collapsed
656
657 \begin_layout Plain Layout
658 .lyx
659 \end_layout
660
661 \end_inset
662
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 support converting layouts to older
668  layout formats, as we do for the .lyx file format.
669 \end_layout
670
671 \begin_layout Subsection
672 Updating the file format number of bind/ui files
673 \end_layout
674
675 \begin_layout Standard
676 See step 
677 \begin_inset CommandInset ref
678 LatexCommand ref
679 reference "enu:updatefiles"
680
681 \end_inset
682
683  in section 
684 \begin_inset CommandInset ref
685 LatexCommand ref
686 reference "subsec:update_lyx_files"
687
688 \end_inset
689
690  but instead of the 
691 \begin_inset Flex Code
692 status collapsed
693
694 \begin_layout Plain Layout
695 updatedocs.py
696 \end_layout
697
698 \end_inset
699
700  command, use this command: 
701 \begin_inset Flex Code
702 status collapsed
703
704 \begin_layout Plain Layout
705 bash development/tools/updatelfuns.sh
706 \end_layout
707
708 \end_inset
709
710 .
711 \end_layout
712
713 \begin_layout Subsection
714 Backporting new styles to the stable version
715 \end_layout
716
717 \begin_layout Standard
718 Starting with the stable \SpecialChar LyX
719  2.1 branch, there is a mechanism in place to backport
720  new styles to the stable version without the need to update the file format.
721  The basic idea is that the new style definition is automatically copied
722  to the document preamble, so that it can even be used by older minor revisions
723  that did not yet include the style.
724  To backport a new style to the stable version, the following steps are
725  needed:
726 \end_layout
727
728 \begin_layout Enumerate
729 Add the line 
730 \begin_inset Flex Code
731 status collapsed
732
733 \begin_layout Plain Layout
734 ForceLocal -1
735 \end_layout
736
737 \end_inset
738
739  to the style definition in the development version.
740 \end_layout
741
742 \begin_layout Enumerate
743 Copy the style definition to the stable version, but use 
744 \begin_inset Flex Code
745 status collapsed
746
747 \begin_layout Plain Layout
748 ForceLocal 1
749 \end_layout
750
751 \end_inset
752
753  instead.
754  If needed adjust the format to the one used by the stable version (see
755  the customization manual for details of the layout file format).
756 \end_layout
757
758 \begin_layout Enumerate
759 For each update of the style in a later stable version, increase the argument
760  of 
761 \begin_inset Flex Code
762 status collapsed
763
764 \begin_layout Plain Layout
765 ForceLocal
766 \end_layout
767
768 \end_inset
769
770  by one (in the stable version, the development version should not be touched).
771 \end_layout
772
773 \begin_layout Standard
774 For details about the 
775 \begin_inset Flex Code
776 status collapsed
777
778 \begin_layout Plain Layout
779 ForceLocal
780 \end_layout
781
782 \end_inset
783
784  flag see the customization manual.
785  No 
786 \begin_inset Flex Code
787 status collapsed
788
789 \begin_layout Plain Layout
790 lyx2lyx
791 \end_layout
792
793 \end_inset
794
795  support is needed for backported styles: Since the style of the development
796  version has an infinite version number, it will always be used.
797  Furthermore, since its version number is less than one, the style will
798  not be written anymore to the document header for files saved by the new
799  version.
800 \end_layout
801
802 \begin_layout Standard
803 \begin_inset Newpage newpage
804 \end_inset
805
806
807 \end_layout
808
809 \begin_layout Section
810 Tests
811 \end_layout
812
813 \begin_layout Standard
814 Automated tests are an important tool to detect bugs and regressions in
815  software development.
816  Some projects like gcc even require each bug fix to be accompanied by a
817  test case for the automatic test suite, that would detect this bug.
818  Testing interactive features automatically is of course very hard, but
819  core functionality like document import and export can be tested quite
820  easily, and some tests of this kind exist.
821 \end_layout
822
823 \begin_layout Subsection
824 unit tests
825 \end_layout
826
827 \begin_layout Standard
828 There are attempts to set up a suite of unit tests for LyX.
829 \end_layout
830
831 \begin_layout Standard
832 TODO: describe what is done and what is still to do.
833 \end_layout
834
835 \begin_layout Subsection
836 tex2lyx tests
837 \end_layout
838
839 \begin_layout Standard
840 The tex2lyx tests are located in the 
841 \begin_inset Flex Code
842 status collapsed
843
844 \begin_layout Plain Layout
845 src/tex2lyx/test
846 \end_layout
847
848 \end_inset
849
850  subfolder of the \SpecialChar LyX
851  source code distribution.
852  The actual testing is performed by the simple python script 
853 \begin_inset Flex Code
854 status collapsed
855
856 \begin_layout Plain Layout
857 src/tex2lyx/test/runtests.py
858 \end_layout
859
860 \end_inset
861
862 .
863  Each test consists of two files: 
864 \begin_inset Flex Code
865 status collapsed
866
867 \begin_layout Plain Layout
868 <test name>.tex
869 \end_layout
870
871 \end_inset
872
873  contains the \SpecialChar LaTeX
874  code that should be tested.
875  
876 \begin_inset Flex Code
877 status collapsed
878
879 \begin_layout Plain Layout
880 <test name>.lyx.lyx
881 \end_layout
882
883 \end_inset
884
885  contains the expected output of tex2lyx.
886  When a test is run, the actual produced output is compared with the stored
887  reference output.
888  The test passes if both are identical.
889  The test machinery is also able to generate a file 
890 \begin_inset Flex Code
891 status collapsed
892
893 \begin_layout Plain Layout
894 <test name>.lyx.tex
895 \end_layout
896
897 \end_inset
898
899  by exporting the produced .lyx file with \SpecialChar LyX
900  again.
901  This may be useful for roundtrip comparisons.
902 \end_layout
903
904 \begin_layout Subsubsection
905 Running the tests
906 \end_layout
907
908 \begin_layout Standard
909 The tex2lyx tests can be run in several ways.
910  When in the 
911 \begin_inset Flex Code
912 status collapsed
913
914 \begin_layout Plain Layout
915 src/tex2lyx
916 \end_layout
917
918 \end_inset
919
920  subfolder of the build directory, the commands 
921 \begin_inset Flex Code
922 status collapsed
923
924 \begin_layout Plain Layout
925 ctest
926 \end_layout
927
928 \end_inset
929
930  (cmake, all platforms), 
931 \begin_inset Flex Code
932 status collapsed
933
934 \begin_layout Plain Layout
935 make test
936 \end_layout
937
938 \end_inset
939
940  (cmake, when using a make based build system and not MSVC) or 
941 \begin_inset Flex Code
942 status collapsed
943
944 \begin_layout Plain Layout
945 make alltests
946 \end_layout
947
948 \end_inset
949
950  (autotools) will run the tex2lyx tests.
951  Alternatively, in the root of the build directory, the command 
952 \begin_inset Flex Code
953 status collapsed
954
955 \begin_layout Plain Layout
956 ctest -R tex2lyx
957 \end_layout
958
959 \end_inset
960
961  runs all tests whose names match the regex 
962 \begin_inset Quotes eld
963 \end_inset
964
965 tex2lyx
966 \begin_inset Quotes erd
967 \end_inset
968
969 .
970  Another way to run the tex2lyx tests in the root build directory is to
971  instead use the command 
972 \begin_inset Flex Code
973 status collapsed
974
975 \begin_layout Plain Layout
976 ctest -L '(cmplyx|roundtrip)'
977 \end_layout
978
979 \end_inset
980
981 , which runs all tests categorized with the label 
982 \begin_inset Quotes eld
983 \end_inset
984
985 roundtrip
986 \begin_inset Quotes erd
987 \end_inset
988
989  or 
990 \begin_inset Quotes eld
991 \end_inset
992
993 cmplyx
994 \begin_inset Quotes erd
995 \end_inset
996
997 .
998  If a test fails, the differences between the expected and actual results
999  are output in unified diff format.
1000 \end_layout
1001
1002 \begin_layout Subsubsection
1003 Updating test references
1004 \begin_inset CommandInset label
1005 LatexCommand label
1006 name "sec:Updating-test-references"
1007
1008 \end_inset
1009
1010
1011 \end_layout
1012
1013 \begin_layout Standard
1014 In some cases a changed tex2lyx output is not a test failure, but wanted,
1015  e.
1016 \begin_inset space \thinspace{}
1017 \end_inset
1018
1019 g.
1020 \begin_inset space \space{}
1021 \end_inset
1022
1023 if a tex2lyx bug was fixed, or a new feature was added.
1024  In these cases the stored references need to be updated.
1025  To do so if using autotools, call 
1026 \begin_inset Flex Code
1027 status collapsed
1028
1029 \begin_layout Plain Layout
1030 make updatetests
1031 \end_layout
1032
1033 \end_inset
1034
1035  in the 
1036 \begin_inset Flex Code
1037 status collapsed
1038
1039 \begin_layout Plain Layout
1040 src/tex2lyx
1041 \end_layout
1042
1043 \end_inset
1044
1045  subdirectory of the build directory.
1046  If instead using CMake, call 
1047 \begin_inset Flex Code
1048 status collapsed
1049
1050 \begin_layout Plain Layout
1051 make updatetex2lyxtests
1052 \end_layout
1053
1054 \end_inset
1055
1056  in the build directory or in the 
1057 \begin_inset Flex Code
1058 status collapsed
1059
1060 \begin_layout Plain Layout
1061 src/tex2lyx/test
1062 \end_layout
1063
1064 \end_inset
1065
1066  subdirectory of the build directory.
1067 \begin_inset Foot
1068 status collapsed
1069
1070 \begin_layout Plain Layout
1071 Note that this is a case where a make target in the build directory can
1072  affect the source directory, which might not be advisable.
1073 \end_layout
1074
1075 \end_inset
1076
1077  On Windows do the following:
1078 \end_layout
1079
1080 \begin_layout Itemize
1081 Assure that the path to the python.exe is in your system PATH variable.
1082 \end_layout
1083
1084 \begin_layout Itemize
1085 Double-click on the file 
1086 \begin_inset Flex Code
1087 status collapsed
1088
1089 \begin_layout Plain Layout
1090 updatetex2lyxtests.vcxproj
1091 \end_layout
1092
1093 \end_inset
1094
1095  in the build directory or in the 
1096 \begin_inset Flex Code
1097 status collapsed
1098
1099 \begin_layout Plain Layout
1100 src/tex2lyx/test
1101 \end_layout
1102
1103 \end_inset
1104
1105  subdirectory of your build directory.
1106 \end_layout
1107
1108 \begin_layout Itemize
1109 In the appearing MSVC program right-click on the project 
1110 \family sans
1111 updatetex2lyxtests
1112 \family default
1113  in the project explorer and chose 
1114 \family sans
1115 Create
1116 \family default
1117 .
1118 \end_layout
1119
1120 \begin_layout Standard
1121 For convenience, these commands also produce re-exported roundtrip .lyx.tex
1122  files.
1123  Please examine the changed output carefully before committing the changed
1124  files to the repository: Since the test machinery does not do a roundtrip
1125  test .tex 
1126 \begin_inset Formula $\Rightarrow$
1127 \end_inset
1128
1129  .lyx 
1130 \begin_inset Formula $\Rightarrow$
1131 \end_inset
1132
1133  .tex, and does not compare the produced dvi or pdf output, it assumes that
1134  the stored .lyx reference produces correct output if processed by \SpecialChar LyX
1135 .
1136  There is only one chance to detect wrong output: before committing a new
1137  reference.
1138  Once it is committed, it is quite difficult to verify whether it is correct.
1139 \end_layout
1140
1141 \begin_layout Standard
1142 Please 
1143 \emph on
1144 do not
1145 \emph default
1146  update the test references by opening them with \SpecialChar LyX
1147  or directly running lyx2lyx
1148  on them.
1149  This would not work, since lyx2lyx and \SpecialChar LyX
1150  produce slightly different files
1151  regarding insignificant whitespace and line breaks.
1152 \end_layout
1153
1154 \begin_layout Subsubsection
1155 Adding a new test
1156 \end_layout
1157
1158 \begin_layout Standard
1159 In many cases tests for new features may be added to one of the existing
1160  test files, but sometimes this is not possible or not wanted.
1161  Then a new test file needs to be added:
1162 \end_layout
1163
1164 \begin_layout Enumerate
1165 Create the new file 
1166 \begin_inset Flex Code
1167 status collapsed
1168
1169 \begin_layout Plain Layout
1170 src/tex2lyx/test/<test name>.tex
1171 \end_layout
1172
1173 \end_inset
1174
1175  and run tex2lyx in roundtrip mode to produce the file 
1176 \begin_inset Flex Code
1177 status collapsed
1178
1179 \begin_layout Plain Layout
1180 src/tex2lyx/test/<test name>.lyx.lyx
1181 \end_layout
1182
1183 \end_inset
1184
1185 .
1186  This file will be the new reference.
1187 \end_layout
1188
1189 \begin_layout Enumerate
1190 Once you confirmed that the tex2lyx output is correct, add the new files
1191  to the corresponding lists in 
1192 \begin_inset Flex Code
1193 status collapsed
1194
1195 \begin_layout Plain Layout
1196 src/tex2lyx/test/runtests.py
1197 \end_layout
1198
1199 \end_inset
1200
1201
1202 \begin_inset Flex Code
1203 status collapsed
1204
1205 \begin_layout Plain Layout
1206 src/tex2lyx/Makefile.am
1207 \end_layout
1208
1209 \end_inset
1210
1211  and 
1212 \begin_inset Flex Code
1213 status collapsed
1214
1215 \begin_layout Plain Layout
1216 src/tex2lyx/test/CMakeLists.txt
1217 \end_layout
1218
1219 \end_inset
1220
1221 .
1222 \end_layout
1223
1224 \begin_layout Enumerate
1225 Commit the changes to the repository, or send a patch to the development
1226  list and ask for committing if you do not have commit rights.
1227 \end_layout
1228
1229 \begin_layout Subsection
1230 ctest automatic tests (cmake only)
1231 \end_layout
1232
1233 \begin_layout Standard
1234 Some tests are located in the 
1235 \begin_inset Flex Code
1236 status collapsed
1237
1238 \begin_layout Plain Layout
1239 development/autotests
1240 \end_layout
1241
1242 \end_inset
1243
1244  subfolder of the \SpecialChar LyX
1245  source code distribution.
1246  
1247 \begin_inset Flex Code
1248 status collapsed
1249
1250 \begin_layout Plain Layout
1251 cmake
1252 \end_layout
1253
1254 \end_inset
1255
1256  is required to run the automatic \SpecialChar LyX
1257  tests, running them is not implemented
1258  for autotools.
1259  
1260 \end_layout
1261
1262 \begin_layout Standard
1263 The \SpecialChar LyX
1264  tests can be run by the commands 
1265 \begin_inset Flex Code
1266 status collapsed
1267
1268 \begin_layout Plain Layout
1269 ctest
1270 \end_layout
1271
1272 \end_inset
1273
1274  (all platforms) or 
1275 \begin_inset Flex Code
1276 status collapsed
1277
1278 \begin_layout Plain Layout
1279 make test
1280 \end_layout
1281
1282 \end_inset
1283
1284  (when using a make based build system and not MSVC) in the 
1285 \begin_inset Flex Code
1286 status collapsed
1287
1288 \begin_layout Plain Layout
1289 autotests
1290 \end_layout
1291
1292 \end_inset
1293
1294  subfolder of the build directory.
1295 \end_layout
1296
1297 \begin_layout Subsubsection
1298 Export tests 
1299 \end_layout
1300
1301 \begin_layout Standard
1302 The export tests are integration tests.
1303  They take longer to run and are more likely to break than the tex2lyx tests.
1304  Nevertheless, they have caught many regressions and without a better alternativ
1305 e it is important to keep them up-to-date and understand how they work.
1306 \end_layout
1307
1308 \begin_layout Standard
1309 The export tests 
1310 \begin_inset Quotes eld
1311 \end_inset
1312
1313 reuse
1314 \begin_inset Quotes erd
1315 \end_inset
1316
1317  the documentation, template, and example files trying to export them to
1318  all supported output formats.
1319 \end_layout
1320
1321 \begin_layout Paragraph
1322 Expectations of LyX developers
1323 \end_layout
1324
1325 \begin_layout Standard
1326 Because the export tests are integration tests and take a long time to run,
1327  LyX developers are rarely expected to run all of the tests.
1328  Here are some good practices to follow by developers:
1329 \end_layout
1330
1331 \begin_layout Itemize
1332 When making a non-trivial change to a .layout file, run the export and layout
1333  tests corresponding with that .layout file.
1334 \end_layout
1335
1336 \begin_layout Itemize
1337 When making non-trivial changes to a .lyx file, run the export tests correspondin
1338 g to that .lyx file.
1339 \end_layout
1340
1341 \begin_layout Itemize
1342 When making non-trivial changes to LyX's \SpecialChar LaTeX
1343  export code (e.g.
1344  touching the encoding code or package handling code that you expect will
1345  change the exported \SpecialChar LaTeX
1346  in some way), consider running all of the export tests
1347  before and after your change.
1348  If there are differences, please reconcile these (i.e.
1349  fix the bug or fix the tests) 
1350 \emph on
1351 before
1352 \emph default
1353  committing.
1354  Ask for help if you're not sure what to do or if you do not want to run
1355  the tests, post the patch on the list and others will run the tests.
1356 \end_layout
1357
1358 \begin_layout Itemize
1359 Understand how to interpret test failures.
1360  If your commit is found to have broken a test, you should be able to interpret
1361  the test results when made aware of them.
1362  See Section 
1363 \begin_inset CommandInset ref
1364 LatexCommand ref
1365 reference "subsec:Interpreting-export-tests"
1366
1367 \end_inset
1368
1369 .
1370 \end_layout
1371
1372 \begin_layout Paragraph
1373 Configuring the tests
1374 \end_layout
1375
1376 \begin_layout Standard
1377 To enable these tests, add the 
1378 \begin_inset Flex Code
1379 status collapsed
1380
1381 \begin_layout Plain Layout
1382 -DLYX_ENABLE_EXPORT_TESTS=ON
1383 \end_layout
1384
1385 \end_inset
1386
1387  flag.
1388  For example:
1389 \end_layout
1390
1391 \begin_layout Standard
1392 \begin_inset Flex Code
1393 status collapsed
1394
1395 \begin_layout Plain Layout
1396 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1397 \end_layout
1398
1399 \end_inset
1400
1401
1402 \end_layout
1403
1404 \begin_layout Standard
1405 \noindent
1406 This flag will increase the time for the cmake command by several seconds,
1407  mainly because of the process of inverting tests (see Section 
1408 \begin_inset CommandInset ref
1409 LatexCommand ref
1410 reference "subsec:Interpreting-export-tests"
1411
1412 \end_inset
1413
1414 ).
1415 \end_layout
1416
1417 \begin_layout Paragraph
1418 Running the tests
1419 \end_layout
1420
1421 \begin_layout Standard
1422 To run all tests, in the build directory simply run the command 
1423 \begin_inset Flex Code
1424 status collapsed
1425
1426 \begin_layout Plain Layout
1427 ctest
1428 \end_layout
1429
1430 \end_inset
1431
1432 .
1433  To run only some of the tests, use the command 
1434 \begin_inset Flex Code
1435 status collapsed
1436
1437 \begin_layout Plain Layout
1438 ctest -R <pattern>
1439 \end_layout
1440
1441 \end_inset
1442
1443 , where 
1444 \begin_inset Flex Code
1445 status collapsed
1446
1447 \begin_layout Plain Layout
1448 <pattern>
1449 \end_layout
1450
1451 \end_inset
1452
1453  is a regular expression that matches test names.
1454  To run only the export tests, you can use 
1455 \begin_inset Flex Code
1456 status collapsed
1457
1458 \begin_layout Plain Layout
1459 ctest -L export
1460 \end_layout
1461
1462 \end_inset
1463
1464 .
1465  For the list of test categories available in addition to 
1466 \begin_inset Quotes eld
1467 \end_inset
1468
1469 export
1470 \begin_inset Quotes erd
1471 \end_inset
1472
1473 , run 
1474 \begin_inset Flex Code
1475 status collapsed
1476
1477 \begin_layout Plain Layout
1478 ctest \SpecialChar nobreakdash
1479 \SpecialChar nobreakdash
1480 print-labels
1481 \end_layout
1482
1483 \end_inset
1484
1485 .
1486  It is often useful to list the tests without running them (e.g.
1487  if you want to know how many tests there are or whether your 
1488 \begin_inset Flex Code
1489 status collapsed
1490
1491 \begin_layout Plain Layout
1492 <pattern>
1493 \end_layout
1494
1495 \end_inset
1496
1497  regular expression did what you expected).
1498  This can be done with the 
1499 \begin_inset Flex Code
1500 status collapsed
1501
1502 \begin_layout Plain Layout
1503 -N
1504 \end_layout
1505
1506 \end_inset
1507
1508  or 
1509 \begin_inset Flex Code
1510 status collapsed
1511
1512 \begin_layout Plain Layout
1513 \SpecialChar nobreakdash
1514 \SpecialChar nobreakdash
1515 show-only
1516 \end_layout
1517
1518 \end_inset
1519
1520  argument.
1521  We are still working on getting the tests to run in parallel which is supported
1522  by the 
1523 \begin_inset Flex Code
1524 status collapsed
1525
1526 \begin_layout Plain Layout
1527 ctest
1528 \end_layout
1529
1530 \end_inset
1531
1532  command with the 
1533 \begin_inset Flex Code
1534 status collapsed
1535
1536 \begin_layout Plain Layout
1537 -j <jobs>
1538 \end_layout
1539
1540 \end_inset
1541
1542  or 
1543 \begin_inset Flex Code
1544 status collapsed
1545
1546 \begin_layout Plain Layout
1547 \SpecialChar nobreakdash
1548 \SpecialChar nobreakdash
1549 parallel <jobs>
1550 \end_layout
1551
1552 \end_inset
1553
1554  argument.
1555  However, when running the tests in parallel, sometimes tests fail that
1556  pass when run sequentially.
1557  A reasonable approach is to first run the tests in parallel and then run
1558  the failed tests sequentially.
1559  For example, to run 8 jobs at a time:
1560 \end_layout
1561
1562 \begin_layout Standard
1563 \begin_inset Flex Code
1564 status collapsed
1565
1566 \begin_layout Plain Layout
1567 ctest -j8
1568 \end_layout
1569
1570 \end_inset
1571
1572
1573 \end_layout
1574
1575 \begin_layout Standard
1576 \begin_inset Flex Code
1577 status collapsed
1578
1579 \begin_layout Plain Layout
1580 ctest \SpecialChar nobreakdash
1581 \SpecialChar nobreakdash
1582 rerun-failed
1583 \end_layout
1584
1585 \end_inset
1586
1587
1588 \end_layout
1589
1590 \begin_layout Standard
1591 \noindent
1592 Note that some tests cannot be run in parallel.
1593  These tests are marked in the code with the 
1594 \begin_inset Flex Code
1595 status collapsed
1596
1597 \begin_layout Plain Layout
1598 \noindent
1599 RUN_SERIAL ON
1600 \end_layout
1601
1602 \end_inset
1603
1604  CMake property.
1605 \end_layout
1606
1607 \begin_layout Standard
1608 In some situations the option 
1609 \begin_inset Flex Code
1610 status collapsed
1611
1612 \begin_layout Plain Layout
1613 \SpecialChar nobreakdash
1614 \SpecialChar nobreakdash
1615 timeout <seconds>
1616 \end_layout
1617
1618 \end_inset
1619
1620  is useful.
1621  There have been bugs in LyX and in \SpecialChar LaTeX
1622  which cause compilation to hang, and
1623  without a timeout a test might never stop (in one case there was even a
1624  memory leak).
1625  If a test times out, the 
1626 \begin_inset Flex Code
1627 status collapsed
1628
1629 \begin_layout Plain Layout
1630 ctest
1631 \end_layout
1632
1633 \end_inset
1634
1635  command exits with error, but you can distinguish between a timed out test
1636  and a failed test in the output reported at the end of the 
1637 \begin_inset Flex Code
1638 status collapsed
1639
1640 \begin_layout Plain Layout
1641 ctest
1642 \end_layout
1643
1644 \end_inset
1645
1646  command.
1647 \end_layout
1648
1649 \begin_layout Standard
1650 See the manual (
1651 \begin_inset Flex Code
1652 status collapsed
1653
1654 \begin_layout Plain Layout
1655 man ctest
1656 \end_layout
1657
1658 \end_inset
1659
1660 ) the full list of command line options.
1661 \end_layout
1662
1663 \begin_layout Paragraph
1664 \begin_inset CommandInset label
1665 LatexCommand label
1666 name "subsec:Interpreting-export-tests"
1667
1668 \end_inset
1669
1670 Interpreting the export test results
1671 \end_layout
1672
1673 \begin_layout Standard
1674 A test can fail for several reasons, not all of them bad.
1675 \end_layout
1676
1677 \begin_layout Enumerate
1678 The .lyx file could have been added recently and some formats are not expected
1679  to work well.
1680 \end_layout
1681
1682 \begin_layout Enumerate
1683 A dependency is not met (e.g.
1684  the \SpecialChar LaTeX
1685  class file).
1686  One hint that this is the case is that the corresponding 
1687 \begin_inset Flex Code
1688 status collapsed
1689
1690 \begin_layout Plain Layout
1691 check_load
1692 \end_layout
1693
1694 \end_inset
1695
1696  test will likely also fail.
1697 \end_layout
1698
1699 \begin_layout Enumerate
1700 An inverted test fails to fail (i.e.
1701  export that previously failed now works).
1702 \end_layout
1703
1704 \begin_layout Enumerate
1705 An external dependency was updated (e.g.
1706  \SpecialChar TeX
1707  Live).
1708 \end_layout
1709
1710 \begin_layout Enumerate
1711 A recent code change introduced a bug.
1712 \end_layout
1713
1714 \begin_layout Enumerate
1715 \begin_inset CommandInset label
1716 LatexCommand label
1717 name "enu:exposed"
1718
1719 \end_inset
1720
1721 A change in a document exposed a previously unknown bug or an incompatibility
1722  with an export format (e.g.
1723  Lua\SpecialChar LaTeX
1724 ).
1725 \end_layout
1726
1727 \begin_layout Standard
1728 Because the .lyx files are exported in several formats, it is not surprising
1729  that many of the exports fail.
1730  This expectation of failure is addressed by 
1731 \begin_inset Quotes eld
1732 \end_inset
1733
1734 inverting
1735 \begin_inset Quotes erd
1736 \end_inset
1737
1738  the tests, that is, by marking the test as 
1739 \begin_inset Quotes eld
1740 \end_inset
1741
1742 passing
1743 \begin_inset Quotes erd
1744 \end_inset
1745
1746  if the export exits with error and as 
1747 \begin_inset Quotes eld
1748 \end_inset
1749
1750 failing
1751 \begin_inset Quotes erd
1752 \end_inset
1753
1754  if the export succeeds
1755 \emph on
1756 .
1757
1758 \emph default
1759  It follows that these expected failures will not show up as failed tests
1760  in the test results and thus will not pollute the 
1761 \begin_inset Quotes eld
1762 \end_inset
1763
1764 good
1765 \begin_inset Quotes erd
1766 \end_inset
1767
1768  tests.
1769  If the export actually succeeds, then the test will fail.
1770  The purpose of this failure is to get your attention—something has changed,
1771  possibly for the better.
1772 \end_layout
1773
1774 \begin_layout Standard
1775 We try to document why a test is inverted or ignored.
1776  See the comment (prefixed with 
1777 \begin_inset Flex Code
1778 status collapsed
1779
1780 \begin_layout Plain Layout
1781 #
1782 \end_layout
1783
1784 \end_inset
1785
1786 ) above the block in which the test is listed as inverted or ignored in
1787  the files 
1788 \begin_inset Flex Code
1789 status collapsed
1790
1791 \begin_layout Plain Layout
1792 development/autotests/suspiciousTests
1793 \end_layout
1794
1795 \end_inset
1796
1797  and 
1798 \begin_inset Flex Code
1799 status collapsed
1800
1801 \begin_layout Plain Layout
1802 development/autotests/ignoredTests
1803 \end_layout
1804
1805 \end_inset
1806
1807 .
1808  It is possible that an export goes from succeeding to failing just because
1809  the document was changed and the document was never expected to work with
1810  a certain export format in the first case.
1811  Once this is confirmed to be the situation, the test can be inverted.
1812 \end_layout
1813
1814 \begin_layout Standard
1815 A good question is why do we enable the tests for non-default formats? The
1816  answer is that if a non-default route is broken it is often because a bug
1817  was introduced in LyX and not because a document-specific change was made
1818  that is not supported by the route.
1819  In other words, there is a high signal/noise ratio in the export tests
1820  for some non-default formats.
1821  
1822 \end_layout
1823
1824 \begin_layout Standard
1825 What action should you take if a test fails? This depends:
1826 \end_layout
1827
1828 \begin_layout Standard
1829 Generally, if a change breaks compilation for the target format (for the
1830  manuals pdf2) without solving some important other issue, fix or revert
1831  the commit that led to failure.
1832  If a change breaks compilation for some non-target format (for the manuals
1833  everything except pdf2), invert the test.
1834  
1835 \end_layout
1836
1837 \begin_layout Standard
1838 A special case is given, if the export was succeeding before but showing
1839  garbled text in the PDF output.
1840  Try to establish, that when the compilation succeeded before the resulting
1841  PDF was good.
1842  Otherwise, it is in fact an improvement when a test fails.
1843  Now it might fail with a clear message of "language xyz not supported".
1844  It is always good to check manually why something fails and if it passes
1845  if the PDF output is good.
1846 \end_layout
1847
1848 \begin_layout Standard
1849 Sometimes a test is fixed as side-effect of some change.
1850  We should uninvert a test (remove it from the 
1851 \begin_inset Flex Code
1852 status collapsed
1853
1854 \begin_layout Plain Layout
1855 suspiciousTests
1856 \end_layout
1857
1858 \end_inset
1859
1860  file) in order to preserve the fix.
1861 \end_layout
1862
1863 \begin_layout Standard
1864 When a test or several tests fail, consider checking the files in the 
1865 \begin_inset Flex Code
1866 status collapsed
1867
1868 \begin_layout Plain Layout
1869 Testing/Temporary/
1870 \end_layout
1871
1872 \end_inset
1873
1874  subdirectory of your build directory.
1875  In this subdirectory are three files: the file 
1876 \begin_inset Flex Code
1877 status collapsed
1878
1879 \begin_layout Plain Layout
1880 LastTestsFailed.log
1881 \end_layout
1882
1883 \end_inset
1884
1885  simply lists the tests that failed on your last 
1886 \begin_inset Flex Code
1887 status collapsed
1888
1889 \begin_layout Plain Layout
1890 ctest
1891 \end_layout
1892
1893 \end_inset
1894
1895  command; the 
1896 \begin_inset Flex Code
1897 status collapsed
1898
1899 \begin_layout Plain Layout
1900 LastTest.log
1901 \end_layout
1902
1903 \end_inset
1904
1905  file contains the output from the tests (and often has details explaining
1906  why a test failed); and the 
1907 \begin_inset Flex Code
1908 status collapsed
1909
1910 \begin_layout Plain Layout
1911 CTestCostData.txt
1912 \end_layout
1913
1914 \end_inset
1915
1916  file lists the times that it took to run the tests.
1917 \end_layout
1918
1919 \begin_layout Paragraph
1920 Inverted tests
1921 \end_layout
1922
1923 \begin_layout Standard
1924 These tests are expected to always fail.
1925 \end_layout
1926
1927 \begin_layout Description
1928 inverted These tests are expected to fail, but are subject to be examined.
1929  It is expected that they will pass in a foreseeable future.
1930  They are labeled 'inverted'.
1931 \end_layout
1932
1933 \begin_layout Description
1934 suspended Some inverted tests are labeled 'suspended'.
1935  This means, they are not executed using 
1936 \begin_inset Flex Code
1937 status collapsed
1938
1939 \begin_layout Plain Layout
1940 ctest -L export
1941 \end_layout
1942
1943 \end_inset
1944
1945  or 
1946 \begin_inset Flex Code
1947 status collapsed
1948
1949 \begin_layout Plain Layout
1950 ctest -L inverted
1951 \end_layout
1952
1953 \end_inset
1954
1955 .
1956  From time to time they still have to be checked using 
1957 \begin_inset Flex Code
1958 status collapsed
1959
1960 \begin_layout Plain Layout
1961 ctest -L suspended
1962 \end_layout
1963
1964 \end_inset
1965
1966 .
1967 \end_layout
1968
1969 \begin_deeper
1970 \begin_layout Standard
1971 These tests are suspended, because they fail for known reasons which cannot
1972  ATM be resolved.
1973  But it is expected the reason might disappear in the future.
1974  Be it new TL or better handling in \SpecialChar LyX
1975 .
1976 \end_layout
1977
1978 \begin_layout Standard
1979 For ctest commands without the 
1980 \begin_inset Flex Code
1981 status collapsed
1982
1983 \begin_layout Plain Layout
1984 -L
1985 \end_layout
1986
1987 \end_inset
1988
1989  parameter nothing changes.
1990  Suspended or not, tests will be executed depending only on the regexes
1991  parameters given to the ctest command.
1992 \end_layout
1993
1994 \end_deeper
1995 \begin_layout Paragraph
1996 Unreliable tests
1997 \end_layout
1998
1999 \begin_layout Description
2000 nonstandard Requires non-standard ressources (\SpecialChar LaTeX
2001  packages and document classes,
2002  fonts, ...) that are not a requirement for running this test suite.
2003 \end_layout
2004
2005 \begin_deeper
2006 \begin_layout Standard
2007 These tests are labeled as 
2008 \family typewriter
2009 'nonstandard'.
2010 \end_layout
2011
2012 \end_deeper
2013 \begin_layout Description
2014 erratic Tests with 
2015 \begin_inset Quotes eld
2016 \end_inset
2017
2018 arbitrary
2019 \begin_inset Quotes erd
2020 \end_inset
2021
2022  result, depending on local configuration, OS, \SpecialChar TeX
2023  distribution, package versions,
2024  or the phase of the moon.
2025 \end_layout
2026
2027 \begin_deeper
2028 \begin_layout Standard
2029 These tests are labeled as 
2030 \family typewriter
2031 'erratic'.
2032 \end_layout
2033
2034 \end_deeper
2035 \begin_layout Paragraph
2036 Export test filtering
2037 \end_layout
2038
2039 \begin_layout Standard
2040 There are files which control the assignment of a label to a test.
2041 \end_layout
2042
2043 \begin_layout Description
2044 ignoredTests (small file)
2045 \begin_inset Newline newline
2046 \end_inset
2047
2048 Tests selected here are withdrawn
2049 \end_layout
2050
2051 \begin_deeper
2052 \begin_layout Labeling
2053 \labelwidthstring 00.00.0000
2054 Input Test of any export combination
2055 \end_layout
2056
2057 \begin_layout Labeling
2058 \labelwidthstring 00.00.0000
2059 Output Stop if tests not selected here
2060 \end_layout
2061
2062 \end_deeper
2063 \begin_layout Description
2064 unreliableTests: Tests selected either pass or fail, but that is dependent
2065  on the system where the test is run.
2066  Selected tests gain the label 'unreliable'.
2067 \end_layout
2068
2069 \begin_deeper
2070 \begin_layout Labeling
2071 \labelwidthstring 00.00.0000
2072 Input Each test which passed 'ignoredTests'
2073 \end_layout
2074
2075 \begin_layout Labeling
2076 \labelwidthstring 00.00.0000
2077 Output Stop if test selected, gain label 'unreliable'.
2078 \end_layout
2079
2080 \end_deeper
2081 \begin_layout Description
2082 suspiciousTests 
2083 \begin_inset space \space{}
2084 \end_inset
2085
2086
2087 \end_layout
2088
2089 \begin_deeper
2090 \begin_layout Labeling
2091 \labelwidthstring 00.00.0000
2092 Input Each test which passed 'unreliableTests'
2093 \end_layout
2094
2095 \begin_layout Labeling
2096 \labelwidthstring 00.00.0000
2097 Output Stop if not selected.
2098 \end_layout
2099
2100 \begin_layout Standard
2101 The following file is meant as subselections of 'suspiciousTests'.
2102  If neither subselection applies, test gains labels 'export' and 'inverted'
2103 \end_layout
2104
2105 \begin_layout Description
2106 suspendedTests Tests selected here gain the label 'suspended' but _not_
2107  'export' or 'inverted', although in ctest they remain inverted.
2108  ('ctest' knows only 'inverted' or not, labels are used only for test selection)
2109 \end_layout
2110
2111 \begin_deeper
2112 \begin_layout Labeling
2113 \labelwidthstring 00.00.0000
2114 Input Each test selected by 'suspiciousTests' 
2115 \end_layout
2116
2117 \begin_layout Labeling
2118 \labelwidthstring 00.00.0000
2119 Output Selected test gains label 'suspended'.
2120  
2121 \end_layout
2122
2123 \end_deeper
2124 \end_deeper
2125 \begin_layout Standard
2126 The following table may clarify label assignement
2127 \end_layout
2128
2129 \begin_layout Standard
2130 \begin_inset Tabular
2131 <lyxtabular version="3" rows="7" columns="12">
2132 <features tabularvalignment="middle">
2133 <column alignment="left" valignment="top" width="0pt">
2134 <column alignment="left" valignment="top" width="0pt">
2135 <column alignment="left" valignment="top" width="0pt">
2136 <column alignment="left" valignment="top" width="0pt">
2137 <column alignment="center" valignment="top">
2138 <column alignment="center" valignment="top">
2139 <column alignment="center" valignment="top">
2140 <column alignment="center" valignment="top">
2141 <column alignment="center" valignment="top">
2142 <column alignment="center" valignment="top">
2143 <column alignment="center" valignment="top">
2144 <column alignment="center" valignment="top">
2145 <row>
2146 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2147 \begin_inset Text
2148
2149 \begin_layout Plain Layout
2150 Test found in file:
2151 \end_layout
2152
2153 \end_inset
2154 </cell>
2155 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2156 \begin_inset Text
2157
2158 \begin_layout Plain Layout
2159
2160 \end_layout
2161
2162 \end_inset
2163 </cell>
2164 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2165 \begin_inset Text
2166
2167 \begin_layout Plain Layout
2168
2169 \end_layout
2170
2171 \end_inset
2172 </cell>
2173 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2174 \begin_inset Text
2175
2176 \begin_layout Plain Layout
2177
2178 \end_layout
2179
2180 \end_inset
2181 </cell>
2182 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2183 \begin_inset Text
2184
2185 \begin_layout Plain Layout
2186 Marked in ctest, Assigned label
2187 \end_layout
2188
2189 \end_inset
2190 </cell>
2191 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
2192 \begin_inset Text
2193
2194 \begin_layout Plain Layout
2195
2196 \end_layout
2197
2198 \end_inset
2199 </cell>
2200 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2201 \begin_inset Text
2202
2203 \begin_layout Plain Layout
2204
2205 \end_layout
2206
2207 \end_inset
2208 </cell>
2209 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2210 \begin_inset Text
2211
2212 \begin_layout Plain Layout
2213
2214 \end_layout
2215
2216 \end_inset
2217 </cell>
2218 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2219 \begin_inset Text
2220
2221 \begin_layout Plain Layout
2222
2223 \end_layout
2224
2225 \end_inset
2226 </cell>
2227 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2228 \begin_inset Text
2229
2230 \begin_layout Plain Layout
2231
2232 \end_layout
2233
2234 \end_inset
2235 </cell>
2236 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2237 \begin_inset Text
2238
2239 \begin_layout Plain Layout
2240
2241 \end_layout
2242
2243 \end_inset
2244 </cell>
2245 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2246 \begin_inset Text
2247
2248 \begin_layout Plain Layout
2249
2250 \end_layout
2251
2252 \end_inset
2253 </cell>
2254 </row>
2255 <row>
2256 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2257 \begin_inset Text
2258
2259 \begin_layout Plain Layout
2260 Ignored
2261 \end_layout
2262
2263 \end_inset
2264 </cell>
2265 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2266 \begin_inset Text
2267
2268 \begin_layout Plain Layout
2269 Unreliable
2270 \end_layout
2271
2272 \end_inset
2273 </cell>
2274 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2275 \begin_inset Text
2276
2277 \begin_layout Plain Layout
2278 Suspicious
2279 \end_layout
2280
2281 \end_inset
2282 </cell>
2283 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2284 \begin_inset Text
2285
2286 \begin_layout Plain Layout
2287 Suspended
2288 \end_layout
2289
2290 \end_inset
2291 </cell>
2292 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2293 \begin_inset Text
2294
2295 \begin_layout Plain Layout
2296 export
2297 \end_layout
2298
2299 \end_inset
2300 </cell>
2301 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2302 \begin_inset Text
2303
2304 \begin_layout Plain Layout
2305
2306 \end_layout
2307
2308 \end_inset
2309 </cell>
2310 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2311 \begin_inset Text
2312
2313 \begin_layout Plain Layout
2314 unreliable
2315 \end_layout
2316
2317 \end_inset
2318 </cell>
2319 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2320 \begin_inset Text
2321
2322 \begin_layout Plain Layout
2323
2324 \end_layout
2325
2326 \end_inset
2327 </cell>
2328 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2329 \begin_inset Text
2330
2331 \begin_layout Plain Layout
2332 inverted
2333 \end_layout
2334
2335 \end_inset
2336 </cell>
2337 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2338 \begin_inset Text
2339
2340 \begin_layout Plain Layout
2341
2342 \end_layout
2343
2344 \end_inset
2345 </cell>
2346 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2347 \begin_inset Text
2348
2349 \begin_layout Plain Layout
2350 suspended
2351 \end_layout
2352
2353 \end_inset
2354 </cell>
2355 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2356 \begin_inset Text
2357
2358 \begin_layout Plain Layout
2359
2360 \end_layout
2361
2362 \end_inset
2363 </cell>
2364 </row>
2365 <row>
2366 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2367 \begin_inset Text
2368
2369 \begin_layout Plain Layout
2370 Yes
2371 \end_layout
2372
2373 \end_inset
2374 </cell>
2375 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2376 \begin_inset Text
2377
2378 \begin_layout Plain Layout
2379 -
2380 \end_layout
2381
2382 \end_inset
2383 </cell>
2384 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2385 \begin_inset Text
2386
2387 \begin_layout Plain Layout
2388 -
2389 \end_layout
2390
2391 \end_inset
2392 </cell>
2393 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2394 \begin_inset Text
2395
2396 \begin_layout Plain Layout
2397 -
2398 \end_layout
2399
2400 \end_inset
2401 </cell>
2402 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2403 \begin_inset Text
2404
2405 \begin_layout Plain Layout
2406 -
2407 \end_layout
2408
2409 \end_inset
2410 </cell>
2411 <cell alignment="center" valignment="top" topline="true" usebox="none">
2412 \begin_inset Text
2413
2414 \begin_layout Plain Layout
2415 -
2416 \end_layout
2417
2418 \end_inset
2419 </cell>
2420 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2421 \begin_inset Text
2422
2423 \begin_layout Plain Layout
2424 -
2425 \end_layout
2426
2427 \end_inset
2428 </cell>
2429 <cell alignment="center" valignment="top" topline="true" usebox="none">
2430 \begin_inset Text
2431
2432 \begin_layout Plain Layout
2433
2434 \end_layout
2435
2436 \end_inset
2437 </cell>
2438 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2439 \begin_inset Text
2440
2441 \begin_layout Plain Layout
2442 -
2443 \end_layout
2444
2445 \end_inset
2446 </cell>
2447 <cell alignment="center" valignment="top" topline="true" usebox="none">
2448 \begin_inset Text
2449
2450 \begin_layout Plain Layout
2451 -
2452 \end_layout
2453
2454 \end_inset
2455 </cell>
2456 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2457 \begin_inset Text
2458
2459 \begin_layout Plain Layout
2460 -
2461 \end_layout
2462
2463 \end_inset
2464 </cell>
2465 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2466 \begin_inset Text
2467
2468 \begin_layout Plain Layout
2469 -
2470 \end_layout
2471
2472 \end_inset
2473 </cell>
2474 </row>
2475 <row>
2476 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2477 \begin_inset Text
2478
2479 \begin_layout Plain Layout
2480 No
2481 \end_layout
2482
2483 \end_inset
2484 </cell>
2485 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2486 \begin_inset Text
2487
2488 \begin_layout Plain Layout
2489 Yes
2490 \end_layout
2491
2492 \end_inset
2493 </cell>
2494 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2495 \begin_inset Text
2496
2497 \begin_layout Plain Layout
2498 -
2499 \end_layout
2500
2501 \end_inset
2502 </cell>
2503 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2504 \begin_inset Text
2505
2506 \begin_layout Plain Layout
2507 -
2508 \end_layout
2509
2510 \end_inset
2511 </cell>
2512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2513 \begin_inset Text
2514
2515 \begin_layout Plain Layout
2516 -
2517 \end_layout
2518
2519 \end_inset
2520 </cell>
2521 <cell alignment="center" valignment="top" topline="true" usebox="none">
2522 \begin_inset Text
2523
2524 \begin_layout Plain Layout
2525 -
2526 \end_layout
2527
2528 \end_inset
2529 </cell>
2530 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2531 \begin_inset Text
2532
2533 \begin_layout Plain Layout
2534 -
2535 \end_layout
2536
2537 \end_inset
2538 </cell>
2539 <cell alignment="center" valignment="top" topline="true" usebox="none">
2540 \begin_inset Text
2541
2542 \begin_layout Plain Layout
2543 +
2544 \end_layout
2545
2546 \end_inset
2547 </cell>
2548 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2549 \begin_inset Text
2550
2551 \begin_layout Plain Layout
2552 -
2553 \end_layout
2554
2555 \end_inset
2556 </cell>
2557 <cell alignment="center" valignment="top" topline="true" usebox="none">
2558 \begin_inset Text
2559
2560 \begin_layout Plain Layout
2561 -
2562 \end_layout
2563
2564 \end_inset
2565 </cell>
2566 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2567 \begin_inset Text
2568
2569 \begin_layout Plain Layout
2570 -
2571 \end_layout
2572
2573 \end_inset
2574 </cell>
2575 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2576 \begin_inset Text
2577
2578 \begin_layout Plain Layout
2579 -
2580 \end_layout
2581
2582 \end_inset
2583 </cell>
2584 </row>
2585 <row>
2586 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
2587 \begin_inset Text
2588
2589 \begin_layout Plain Layout
2590
2591 \end_layout
2592
2593 \end_inset
2594 </cell>
2595 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2596 \begin_inset Text
2597
2598 \begin_layout Plain Layout
2599 No
2600 \end_layout
2601
2602 \end_inset
2603 </cell>
2604 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
2605 \begin_inset Text
2606
2607 \begin_layout Plain Layout
2608 Yes
2609 \end_layout
2610
2611 \end_inset
2612 </cell>
2613 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2614 \begin_inset Text
2615
2616 \begin_layout Plain Layout
2617 Yes
2618 \end_layout
2619
2620 \end_inset
2621 </cell>
2622 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2623 \begin_inset Text
2624
2625 \begin_layout Plain Layout
2626 -
2627 \end_layout
2628
2629 \end_inset
2630 </cell>
2631 <cell alignment="center" valignment="top" topline="true" usebox="none">
2632 \begin_inset Text
2633
2634 \begin_layout Plain Layout
2635 -
2636 \end_layout
2637
2638 \end_inset
2639 </cell>
2640 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2641 \begin_inset Text
2642
2643 \begin_layout Plain Layout
2644 -
2645 \end_layout
2646
2647 \end_inset
2648 </cell>
2649 <cell alignment="center" valignment="top" topline="true" usebox="none">
2650 \begin_inset Text
2651
2652 \begin_layout Plain Layout
2653 -
2654 \end_layout
2655
2656 \end_inset
2657 </cell>
2658 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2659 \begin_inset Text
2660
2661 \begin_layout Plain Layout
2662 +
2663 \end_layout
2664
2665 \end_inset
2666 </cell>
2667 <cell alignment="center" valignment="top" topline="true" usebox="none">
2668 \begin_inset Text
2669
2670 \begin_layout Plain Layout
2671 -
2672 \end_layout
2673
2674 \end_inset
2675 </cell>
2676 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2677 \begin_inset Text
2678
2679 \begin_layout Plain Layout
2680 -
2681 \end_layout
2682
2683 \end_inset
2684 </cell>
2685 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2686 \begin_inset Text
2687
2688 \begin_layout Plain Layout
2689 +
2690 \end_layout
2691
2692 \end_inset
2693 </cell>
2694 </row>
2695 <row>
2696 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2697 \begin_inset Text
2698
2699 \begin_layout Plain Layout
2700
2701 \end_layout
2702
2703 \end_inset
2704 </cell>
2705 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2706 \begin_inset Text
2707
2708 \begin_layout Plain Layout
2709
2710 \end_layout
2711
2712 \end_inset
2713 </cell>
2714 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2715 \begin_inset Text
2716
2717 \begin_layout Plain Layout
2718
2719 \end_layout
2720
2721 \end_inset
2722 </cell>
2723 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2724 \begin_inset Text
2725
2726 \begin_layout Plain Layout
2727 No
2728 \end_layout
2729
2730 \end_inset
2731 </cell>
2732 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2733 \begin_inset Text
2734
2735 \begin_layout Plain Layout
2736 -
2737 \end_layout
2738
2739 \end_inset
2740 </cell>
2741 <cell alignment="center" valignment="top" topline="true" usebox="none">
2742 \begin_inset Text
2743
2744 \begin_layout Plain Layout
2745 +
2746 \end_layout
2747
2748 \end_inset
2749 </cell>
2750 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2751 \begin_inset Text
2752
2753 \begin_layout Plain Layout
2754 -
2755 \end_layout
2756
2757 \end_inset
2758 </cell>
2759 <cell alignment="center" valignment="top" topline="true" usebox="none">
2760 \begin_inset Text
2761
2762 \begin_layout Plain Layout
2763 -
2764 \end_layout
2765
2766 \end_inset
2767 </cell>
2768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2769 \begin_inset Text
2770
2771 \begin_layout Plain Layout
2772 +
2773 \end_layout
2774
2775 \end_inset
2776 </cell>
2777 <cell alignment="center" valignment="top" topline="true" usebox="none">
2778 \begin_inset Text
2779
2780 \begin_layout Plain Layout
2781 +
2782 \end_layout
2783
2784 \end_inset
2785 </cell>
2786 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2787 \begin_inset Text
2788
2789 \begin_layout Plain Layout
2790 -
2791 \end_layout
2792
2793 \end_inset
2794 </cell>
2795 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2796 \begin_inset Text
2797
2798 \begin_layout Plain Layout
2799 -
2800 \end_layout
2801
2802 \end_inset
2803 </cell>
2804 </row>
2805 <row>
2806 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2807 \begin_inset Text
2808
2809 \begin_layout Plain Layout
2810
2811 \end_layout
2812
2813 \end_inset
2814 </cell>
2815 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2816 \begin_inset Text
2817
2818 \begin_layout Plain Layout
2819
2820 \end_layout
2821
2822 \end_inset
2823 </cell>
2824 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2825 \begin_inset Text
2826
2827 \begin_layout Plain Layout
2828 No
2829 \end_layout
2830
2831 \end_inset
2832 </cell>
2833 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2834 \begin_inset Text
2835
2836 \begin_layout Plain Layout
2837 -
2838 \end_layout
2839
2840 \end_inset
2841 </cell>
2842 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2843 \begin_inset Text
2844
2845 \begin_layout Plain Layout
2846 -
2847 \end_layout
2848
2849 \end_inset
2850 </cell>
2851 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
2852 \begin_inset Text
2853
2854 \begin_layout Plain Layout
2855 +
2856 \end_layout
2857
2858 \end_inset
2859 </cell>
2860 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2861 \begin_inset Text
2862
2863 \begin_layout Plain Layout
2864 -
2865 \end_layout
2866
2867 \end_inset
2868 </cell>
2869 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
2870 \begin_inset Text
2871
2872 \begin_layout Plain Layout
2873 -
2874 \end_layout
2875
2876 \end_inset
2877 </cell>
2878 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2879 \begin_inset Text
2880
2881 \begin_layout Plain Layout
2882 -
2883 \end_layout
2884
2885 \end_inset
2886 </cell>
2887 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
2888 \begin_inset Text
2889
2890 \begin_layout Plain Layout
2891 -
2892 \end_layout
2893
2894 \end_inset
2895 </cell>
2896 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2897 \begin_inset Text
2898
2899 \begin_layout Plain Layout
2900 -
2901 \end_layout
2902
2903 \end_inset
2904 </cell>
2905 <cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
2906 \begin_inset Text
2907
2908 \begin_layout Plain Layout
2909 -
2910 \end_layout
2911
2912 \end_inset
2913 </cell>
2914 </row>
2915 </lyxtabular>
2916
2917 \end_inset
2918
2919
2920 \end_layout
2921
2922 \begin_layout Subsubsection
2923 check_load tests
2924 \end_layout
2925
2926 \begin_layout Standard
2927 These tests check whether a .lyx file loads without any terminal messages.
2928  They correspond to the manual operations of simply opening a .lyx file on
2929  the terminal, exiting LyX once the file is loaded, and then checking whether
2930  there is any output from the terminal.
2931  These tests are useful for catching malformed .lyx files and parsing bugs.
2932  They can also be used to find a .lyx file in which an instance of something
2933  happens.
2934  To do this, compile LyX with a local patch that outputs something to the
2935  terminal when an instance is found, and then run the check_load tests to
2936  see if any fail, which would mean that the situation occurs in the LyX
2937  documentation files corresponding to the failed tests.
2938  These tests are expectedly fragile: any LyX diagnostic message, which is
2939  not necessarily an error, would cause the tests to fail.
2940  Similarly, any message output by a library (e.g.
2941  Qt) would also cause failure.
2942  There are some messages that the check_load tests are instructed to ignore,
2943  which are stored in the file 
2944 \begin_inset Flex Code
2945 status collapsed
2946
2947 \begin_layout Plain Layout
2948 development/autotests/filterCheckWarnings
2949 \end_layout
2950
2951 \end_inset
2952
2953 .
2954 \end_layout
2955
2956 \begin_layout Standard
2957 Under cmake, the tests are labeled as 'load'.
2958 \end_layout
2959
2960 \begin_layout Subsubsection
2961 URL tests
2962 \end_layout
2963
2964 \begin_layout Standard
2965 The URL tests are enabled with the 
2966 \begin_inset Flex Code
2967 status collapsed
2968
2969 \begin_layout Plain Layout
2970 -DLYX_ENABLE_URLTESTS=ON
2971 \end_layout
2972
2973 \end_inset
2974
2975  CMake flag and are useful for finding broken links in our documentation
2976  files.
2977  If a URL test fails, to see which link in particular was reported as broken,
2978  see the output in 
2979 \begin_inset Flex Code
2980 status collapsed
2981
2982 \begin_layout Plain Layout
2983 LastTest.log
2984 \end_layout
2985
2986 \end_inset
2987
2988 .
2989  These tests are extremely fragile (e.g.
2990  a test can depend on your Internet connection) and a failed URL test should
2991  not be taken too seriously.
2992  URL tests are labeled as 
2993 \family typewriter
2994 'url'.
2995 \end_layout
2996
2997 \begin_layout Paragraph
2998 Running URL tests
2999 \end_layout
3000
3001 \begin_layout Standard
3002 cmake is required to run the \SpecialChar LyX
3003  tests, running them is not implemented for
3004  autotools.
3005 \end_layout
3006
3007 \begin_layout Standard
3008 The appropriate commands are:
3009 \end_layout
3010
3011 \begin_layout Itemize
3012
3013 \family typewriter
3014 ctest -L url
3015 \family default
3016
3017 \begin_inset Newline newline
3018 \end_inset
3019
3020 runns all tests with label 
3021 \family typewriter
3022 'url'
3023 \end_layout
3024
3025 \begin_layout Itemize
3026
3027 \family typewriter
3028 ctest -R 'check_.*urls'
3029 \family default
3030
3031 \begin_inset Newline newline
3032 \end_inset
3033
3034 runns the tests 'check_accessible_urls'
3035 \end_layout
3036
3037 \begin_layout Standard
3038 Associated test results can be examined in ctest-log directory in files
3039  of the form 'LastFailed.*URLS.log'
3040 \end_layout
3041
3042 \begin_layout Subsubsection
3043 Test labels
3044 \end_layout
3045
3046 \begin_layout Standard
3047 ctest label commands:
3048 \end_layout
3049
3050 \begin_layout Description
3051 \SpecialChar nobreakdash
3052 \SpecialChar nobreakdash
3053 print-labels shows all assigned labels
3054 \end_layout
3055
3056 \begin_layout Description
3057 \SpecialChar nobreakdash
3058 L
3059 \begin_inset space ~
3060 \end_inset
3061
3062 labelname executes all tests to which this label is assigned to.
3063  A test may have more that one label.
3064 \end_layout
3065
3066 \begin_layout Description
3067 \SpecialChar nobreakdash
3068 j
3069 \begin_inset space ~
3070 \end_inset
3071
3072 number executes tests in parallel using 'number' simultaneously processes.
3073  Some tests are marked as 'sequencial', for them this parameter has no effect.
3074 \end_layout
3075
3076 \begin_layout Section
3077 Development policies
3078 \end_layout
3079
3080 \begin_layout Standard
3081 This chapter lists some guidelines that should be followed.
3082  This list is not complete, and many guidelines are in separate chapters,
3083  such as 
3084 \begin_inset Quotes eld
3085 \end_inset
3086
3087 When is an update of the .lyx file format number needed?
3088 \begin_inset Quotes erd
3089 \end_inset
3090
3091  in Section 
3092 \begin_inset CommandInset ref
3093 LatexCommand ref
3094 reference "sec:When-is-an"
3095
3096 \end_inset
3097
3098 .
3099 \end_layout
3100
3101 \begin_layout Subsection
3102 When to set a fixed milestone?
3103 \end_layout
3104
3105 \begin_layout Standard
3106 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
3107  holds:
3108 \end_layout
3109
3110 \begin_layout Enumerate
3111 Somebody is actively working on a fix.
3112 \end_layout
3113
3114 \begin_layout Enumerate
3115 The bug is so severe that it would block the release if it is not fixed.
3116 \end_layout
3117
3118 \begin_layout Standard
3119 If a bug is important, but nobody is working on it, and it is no showstopper,
3120  use a milestone like 2.1.x or 2.2.x.
3121  For all other bugs, do not set a milestone at all.
3122 \end_layout
3123
3124 \begin_layout Subsection
3125 Can we add rc entries in stable branch?
3126 \end_layout
3127
3128 \begin_layout Standard
3129 No.
3130  We are supposed to increase the prefs2prefs version number with such things.
3131 \end_layout
3132
3133 \begin_layout Section
3134 Documentation policies
3135 \end_layout
3136
3137 \begin_layout Standard
3138 The main documentation consists of these files:
3139 \end_layout
3140
3141 \begin_layout Description
3142 splash.lyx it is the first file you see after an installation.
3143  We assume that a new user sees this.
3144  It is therefore designed to be as simple as possible.
3145  Therefore please don't add any new formatting, only fix typos etc.
3146  Splash.lyx is up to date for \SpecialChar LyX
3147  2.1.x, currently maintained by Uwe Stöhr.
3148 \end_layout
3149
3150 \begin_layout Description
3151 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
3152 .
3153  It therefore uses a limited set of formatting.
3154  For example a standard document class.
3155  Since new users will first learn about the formatting possibilities of
3156  \SpecialChar LyX
3157  please keep this file that simple.
3158  Intro.lyx is up to date for \SpecialChar LyX
3159  2.1.x, currently maintained by Uwe Stöhr.
3160 \end_layout
3161
3162 \begin_layout Description
3163 Tutorial.lyx our tutorial.
3164  It must be always up to date.
3165  Normally there is nothing to add since we don't want to overwhelm new users
3166  with too much details.
3167  The will learn these details while using \SpecialChar LyX
3168  and we have special manuals.
3169  Tutorial.lyx is up to date for \SpecialChar LyX
3170  2.1.x, currently maintained by Uwe Stöhr.
3171 \end_layout
3172
3173 \begin_layout Description
3174 UserGuide.lyx our main user guide.
3175  It covers a mixture of basic and detailed information.
3176  Some information is also in the Math and EmbeddedObjects manual so that
3177  the UserGuide refers to these files.
3178  UserGuide.lyx is up to date for \SpecialChar LyX
3179  2.1.x, currently maintained by Uwe Stöhr.
3180 \end_layout
3181
3182 \begin_layout Description
3183 EmbeddedObjects.lyx a special manual to explain things like tables floats
3184  boxes etc.
3185  in all detail.
3186  EmbeddedObjects.lyx is up to date for \SpecialChar LyX
3187  2.1.x, currently maintained by Uwe
3188  Stöhr.
3189 \end_layout
3190
3191 \begin_layout Description
3192 Math.lyx a special manual to explain everything regarding math in all detail.
3193  Math.lyx is up to date for \SpecialChar LyX
3194  2.1.x, currently maintained by Uwe Stöhr.
3195 \end_layout
3196
3197 \begin_layout Description
3198 Additional.lyx this manual covers information that would be too much detail
3199  for the UserGuide or would make the UserGuide uncompilable or only compilable
3200  when installing a lot of special \SpecialChar LaTeX
3201 -packages.
3202  What should be in the UserGuide or better in Additional is a matter of
3203  taste.
3204  it is up to you to decide that.
3205  Additional.lyx is not completely up to date for \SpecialChar LyX
3206  2.1.x.
3207  Only chapter
3208 \begin_inset space ~
3209 \end_inset
3210
3211 8 is up to date and currently maintained by Uwe Stöhr.
3212  It certainly needs a rewrite and update.
3213  For example many info in chapter
3214 \begin_inset space ~
3215 \end_inset
3216
3217 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
3218  manual.
3219 \end_layout
3220
3221 \begin_layout Description
3222 Customization.lyx this manual covers information how to customize \SpecialChar LyX
3223  for certain
3224  output formats, operating systems, languages etc.
3225  It is currently completely out of date and needs a major rewrite and update.
3226  If you do this please assure that your information are given for all OSes
3227  and \SpecialChar LaTeX
3228  distributions (meaning be as objective as possible).
3229 \end_layout
3230
3231 \begin_layout Standard
3232 There are only 4
3233 \begin_inset space ~
3234 \end_inset
3235
3236 rules in editing the docs:
3237 \end_layout
3238
3239 \begin_layout Enumerate
3240 If you are not the maintainer of a doc file or a chapter/section, you MUST
3241  use change tracking so that the maintainer could review your changes
3242 \end_layout
3243
3244 \begin_layout Enumerate
3245 Respect the formatting of the document.
3246  The different files use different formatting styles.
3247  That is OK and has historic reasons nobody fully know ;-).
3248  But it is important to be consistent within one file.
3249 \end_layout
3250
3251 \begin_layout Enumerate
3252 All changes you make to a file in one language MUST also go the file in
3253  the other actively maintained languages.
3254  Normally the maintainer does this for you, if you are the maintainer, you
3255  must do this by copying or changing the changed or added text to the other
3256  files so that the translators sees the blue underlined text and know what
3257  they have to translate and what was changed.
3258 \end_layout
3259
3260 \begin_layout Enumerate
3261 You MUST assure that the document is compilable as 
3262 \begin_inset Quotes eld
3263 \end_inset
3264
3265 PDF (pdflatex)
3266 \begin_inset Quotes erd
3267 \end_inset
3268
3269  after your changes.
3270 \end_layout
3271
3272 \end_body
3273 \end_document