]> git.lyx.org Git - features.git/blob - lib/doc/Development.lyx
d55a926bedad55e3269866a2d9b54e6242cc1ef0
[features.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 pdf2
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 not support converting layouts to
668  older layout formats, as we do for the 
669 \begin_inset Flex Code
670 status collapsed
671
672 \begin_layout Plain Layout
673 .lyx
674 \end_layout
675
676 \end_inset
677
678  file format.
679 \end_layout
680
681 \begin_layout Subsection
682 Updating the file format number of bind/ui files
683 \end_layout
684
685 \begin_layout Standard
686 See step 
687 \begin_inset CommandInset ref
688 LatexCommand ref
689 reference "enu:updatefiles"
690
691 \end_inset
692
693  in section 
694 \begin_inset CommandInset ref
695 LatexCommand ref
696 reference "subsec:update_lyx_files"
697
698 \end_inset
699
700  but instead of the 
701 \begin_inset Flex Code
702 status collapsed
703
704 \begin_layout Plain Layout
705 updatedocs.py
706 \end_layout
707
708 \end_inset
709
710  command, use this command: 
711 \begin_inset Flex Code
712 status collapsed
713
714 \begin_layout Plain Layout
715 bash development/tools/updatelfuns.sh
716 \end_layout
717
718 \end_inset
719
720 .
721 \end_layout
722
723 \begin_layout Subsection
724 Backporting new styles to the stable version
725 \end_layout
726
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
735  needed:
736 \end_layout
737
738 \begin_layout Enumerate
739 Add the line 
740 \begin_inset Flex Code
741 status collapsed
742
743 \begin_layout Plain Layout
744 ForceLocal -1
745 \end_layout
746
747 \end_inset
748
749  to the style definition in the development version.
750 \end_layout
751
752 \begin_layout Enumerate
753 Copy the style definition to the stable version, but use 
754 \begin_inset Flex Code
755 status collapsed
756
757 \begin_layout Plain Layout
758 ForceLocal 1
759 \end_layout
760
761 \end_inset
762
763  instead.
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).
766 \end_layout
767
768 \begin_layout Enumerate
769 For each update of the style in a later stable version, increase the argument
770  of 
771 \begin_inset Flex Code
772 status collapsed
773
774 \begin_layout Plain Layout
775 ForceLocal
776 \end_layout
777
778 \end_inset
779
780  by one (in the stable version, the development version should not be touched).
781 \end_layout
782
783 \begin_layout Standard
784 For details about the 
785 \begin_inset Flex Code
786 status collapsed
787
788 \begin_layout Plain Layout
789 ForceLocal
790 \end_layout
791
792 \end_inset
793
794  flag see the customization manual.
795  No 
796 \begin_inset Flex Code
797 status collapsed
798
799 \begin_layout Plain Layout
800 lyx2lyx
801 \end_layout
802
803 \end_inset
804
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
809  version.
810 \end_layout
811
812 \begin_layout Standard
813 \begin_inset Newpage newpage
814 \end_inset
815
816
817 \end_layout
818
819 \begin_layout Section
820 Tests
821 \end_layout
822
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.
831 \end_layout
832
833 \begin_layout Subsection
834 unit tests
835 \end_layout
836
837 \begin_layout Standard
838 There are attempts to set up a suite of unit tests for LyX.
839 \end_layout
840
841 \begin_layout Standard
842 TODO: describe what is done and what is still to do.
843 \end_layout
844
845 \begin_layout Subsection
846 tex2lyx tests
847 \end_layout
848
849 \begin_layout Standard
850 The tex2lyx tests are located in the 
851 \begin_inset Flex Code
852 status collapsed
853
854 \begin_layout Plain Layout
855 src/tex2lyx/test
856 \end_layout
857
858 \end_inset
859
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
864 status collapsed
865
866 \begin_layout Plain Layout
867 src/tex2lyx/test/runtests.py
868 \end_layout
869
870 \end_inset
871
872 .
873  Each test consists of two files: 
874 \begin_inset Flex Code
875 status collapsed
876
877 \begin_layout Plain Layout
878 <test name>.tex
879 \end_layout
880
881 \end_inset
882
883  contains the \SpecialChar LaTeX
884  code that should be tested.
885  
886 \begin_inset Flex Code
887 status collapsed
888
889 \begin_layout Plain Layout
890 <test name>.lyx.lyx
891 \end_layout
892
893 \end_inset
894
895  contains the expected output of tex2lyx.
896  When a test is run, the actual produced output is compared with the stored
897  reference output.
898  The test passes if both are identical.
899  The test machinery is also able to generate a file 
900 \begin_inset Flex Code
901 status collapsed
902
903 \begin_layout Plain Layout
904 <test name>.lyx.tex
905 \end_layout
906
907 \end_inset
908
909  by exporting the produced .lyx file with \SpecialChar LyX
910  again.
911  This may be useful for roundtrip comparisons.
912 \end_layout
913
914 \begin_layout Subsubsection
915 Running the tests
916 \end_layout
917
918 \begin_layout Standard
919 The tex2lyx tests can be run in several ways.
920  When in the 
921 \begin_inset Flex Code
922 status collapsed
923
924 \begin_layout Plain Layout
925 src/tex2lyx
926 \end_layout
927
928 \end_inset
929
930  subfolder of the build directory, the commands 
931 \begin_inset Flex Code
932 status collapsed
933
934 \begin_layout Plain Layout
935 ctest
936 \end_layout
937
938 \end_inset
939
940  (cmake, all platforms), 
941 \begin_inset Flex Code
942 status collapsed
943
944 \begin_layout Plain Layout
945 make test
946 \end_layout
947
948 \end_inset
949
950  (cmake, when using a make based build system and not MSVC) or 
951 \begin_inset Flex Code
952 status collapsed
953
954 \begin_layout Plain Layout
955 make alltests
956 \end_layout
957
958 \end_inset
959
960  (autotools) will run the tex2lyx tests.
961  Alternatively, in the root of the build directory, the command 
962 \begin_inset Flex Code
963 status collapsed
964
965 \begin_layout Plain Layout
966 ctest -R tex2lyx
967 \end_layout
968
969 \end_inset
970
971  runs all tests whose names match the regex 
972 \begin_inset Quotes eld
973 \end_inset
974
975 tex2lyx
976 \begin_inset Quotes erd
977 \end_inset
978
979 .
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
983 status collapsed
984
985 \begin_layout Plain Layout
986 ctest -L '(cmplyx|roundtrip)'
987 \end_layout
988
989 \end_inset
990
991 , which runs all tests categorized with the label 
992 \begin_inset Quotes eld
993 \end_inset
994
995 roundtrip
996 \begin_inset Quotes erd
997 \end_inset
998
999  or 
1000 \begin_inset Quotes eld
1001 \end_inset
1002
1003 cmplyx
1004 \begin_inset Quotes erd
1005 \end_inset
1006
1007 .
1008  If a test fails, the differences between the expected and actual results
1009  are output in unified diff format.
1010 \end_layout
1011
1012 \begin_layout Subsubsection
1013 Updating test references
1014 \begin_inset CommandInset label
1015 LatexCommand label
1016 name "sec:Updating-test-references"
1017
1018 \end_inset
1019
1020
1021 \end_layout
1022
1023 \begin_layout Standard
1024 In some cases a changed tex2lyx output is not a test failure, but wanted,
1025  e.
1026 \begin_inset space \thinspace{}
1027 \end_inset
1028
1029 g.
1030 \begin_inset space \space{}
1031 \end_inset
1032
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
1037 status collapsed
1038
1039 \begin_layout Plain Layout
1040 make updatetests
1041 \end_layout
1042
1043 \end_inset
1044
1045  in the 
1046 \begin_inset Flex Code
1047 status collapsed
1048
1049 \begin_layout Plain Layout
1050 src/tex2lyx
1051 \end_layout
1052
1053 \end_inset
1054
1055  subdirectory of the build directory.
1056  If instead using CMake, call 
1057 \begin_inset Flex Code
1058 status collapsed
1059
1060 \begin_layout Plain Layout
1061 make updatetex2lyxtests
1062 \end_layout
1063
1064 \end_inset
1065
1066  in the build directory or in the 
1067 \begin_inset Flex Code
1068 status collapsed
1069
1070 \begin_layout Plain Layout
1071 src/tex2lyx/test
1072 \end_layout
1073
1074 \end_inset
1075
1076  subdirectory of the build directory.
1077 \begin_inset Foot
1078 status collapsed
1079
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.
1083 \end_layout
1084
1085 \end_inset
1086
1087  On Windows do the following:
1088 \end_layout
1089
1090 \begin_layout Itemize
1091 Assure that the path to the python.exe is in your system PATH variable.
1092 \end_layout
1093
1094 \begin_layout Itemize
1095 Double-click on the file 
1096 \begin_inset Flex Code
1097 status collapsed
1098
1099 \begin_layout Plain Layout
1100 updatetex2lyxtests.vcxproj
1101 \end_layout
1102
1103 \end_inset
1104
1105  in the build directory or in the 
1106 \begin_inset Flex Code
1107 status collapsed
1108
1109 \begin_layout Plain Layout
1110 src/tex2lyx/test
1111 \end_layout
1112
1113 \end_inset
1114
1115  subdirectory of your build directory.
1116 \end_layout
1117
1118 \begin_layout Itemize
1119 In the appearing MSVC program right-click on the project 
1120 \family sans
1121 updatetex2lyxtests
1122 \family default
1123  in the project explorer and chose 
1124 \family sans
1125 Create
1126 \family default
1127 .
1128 \end_layout
1129
1130 \begin_layout Standard
1131 For convenience, these commands also produce re-exported roundtrip .lyx.tex
1132  files.
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
1135  test .tex 
1136 \begin_inset Formula $\Rightarrow$
1137 \end_inset
1138
1139  .lyx 
1140 \begin_inset Formula $\Rightarrow$
1141 \end_inset
1142
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
1145 .
1146  There is only one chance to detect wrong output: before committing a new
1147  reference.
1148  Once it is committed, it is quite difficult to verify whether it is correct.
1149 \end_layout
1150
1151 \begin_layout Standard
1152 Please 
1153 \emph on
1154 do not
1155 \emph default
1156  update the test references by opening them with \SpecialChar LyX
1157  or directly running lyx2lyx
1158  on them.
1159  This would not work, since lyx2lyx and \SpecialChar LyX
1160  produce slightly different files
1161  regarding insignificant whitespace and line breaks.
1162 \end_layout
1163
1164 \begin_layout Subsubsection
1165 Adding a new test
1166 \end_layout
1167
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:
1172 \end_layout
1173
1174 \begin_layout Enumerate
1175 Create the new file 
1176 \begin_inset Flex Code
1177 status collapsed
1178
1179 \begin_layout Plain Layout
1180 src/tex2lyx/test/<test name>.tex
1181 \end_layout
1182
1183 \end_inset
1184
1185  and run tex2lyx in roundtrip mode to produce the file 
1186 \begin_inset Flex Code
1187 status collapsed
1188
1189 \begin_layout Plain Layout
1190 src/tex2lyx/test/<test name>.lyx.lyx
1191 \end_layout
1192
1193 \end_inset
1194
1195 .
1196  This file will be the new reference.
1197 \end_layout
1198
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
1203 status collapsed
1204
1205 \begin_layout Plain Layout
1206 src/tex2lyx/test/runtests.py
1207 \end_layout
1208
1209 \end_inset
1210
1211
1212 \begin_inset Flex Code
1213 status collapsed
1214
1215 \begin_layout Plain Layout
1216 src/tex2lyx/Makefile.am
1217 \end_layout
1218
1219 \end_inset
1220
1221  and 
1222 \begin_inset Flex Code
1223 status collapsed
1224
1225 \begin_layout Plain Layout
1226 src/tex2lyx/test/CMakeLists.txt
1227 \end_layout
1228
1229 \end_inset
1230
1231 .
1232 \end_layout
1233
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.
1237 \end_layout
1238
1239 \begin_layout Subsection
1240 ctest automatic tests (cmake only)
1241 \end_layout
1242
1243 \begin_layout Standard
1244 Some tests are located in the 
1245 \begin_inset Flex Code
1246 status collapsed
1247
1248 \begin_layout Plain Layout
1249 development/autotests
1250 \end_layout
1251
1252 \end_inset
1253
1254  subfolder of the \SpecialChar LyX
1255  source code distribution.
1256  
1257 \begin_inset Flex Code
1258 status collapsed
1259
1260 \begin_layout Plain Layout
1261 cmake
1262 \end_layout
1263
1264 \end_inset
1265
1266  is required to run the automatic \SpecialChar LyX
1267  tests, running them is not implemented
1268  for autotools.
1269  
1270 \end_layout
1271
1272 \begin_layout Standard
1273 The \SpecialChar LyX
1274  tests can be run by the commands 
1275 \begin_inset Flex Code
1276 status collapsed
1277
1278 \begin_layout Plain Layout
1279 ctest
1280 \end_layout
1281
1282 \end_inset
1283
1284  (all platforms) or 
1285 \begin_inset Flex Code
1286 status collapsed
1287
1288 \begin_layout Plain Layout
1289 make test
1290 \end_layout
1291
1292 \end_inset
1293
1294  (when using a make based build system and not MSVC) in the 
1295 \begin_inset Flex Code
1296 status collapsed
1297
1298 \begin_layout Plain Layout
1299 autotests
1300 \end_layout
1301
1302 \end_inset
1303
1304  subfolder of the build directory.
1305 \end_layout
1306
1307 \begin_layout Subsubsection
1308 Export tests 
1309 \end_layout
1310
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.
1316 \end_layout
1317
1318 \begin_layout Standard
1319 The export tests 
1320 \begin_inset Quotes eld
1321 \end_inset
1322
1323 reuse
1324 \begin_inset Quotes erd
1325 \end_inset
1326
1327  documentation, template, and example files trying to export them to all
1328  supported output formats.
1329 \end_layout
1330
1331 \begin_layout Paragraph
1332 Expectations of LyX developers
1333 \end_layout
1334
1335 \begin_layout Standard
1336 Because the export tests are integration tests and take a long time to run,
1337  LyX developers are rarely expected to run all of the tests.
1338  Here are some good practices to follow by developers:
1339 \end_layout
1340
1341 \begin_layout Itemize
1342 When making a non-trivial change to a .layout file, run the export and layout
1343  tests corresponding with that .layout file.
1344 \end_layout
1345
1346 \begin_layout Itemize
1347 When making non-trivial changes to a .lyx file, run the export tests correspondin
1348 g to that .lyx file.
1349 \end_layout
1350
1351 \begin_layout Itemize
1352 When making non-trivial changes to LyX's \SpecialChar LaTeX
1353  export code (e.g.
1354  touching the encoding code or package handling code that you expect will
1355  change the exported \SpecialChar LaTeX
1356  in some way):
1357 \end_layout
1358
1359 \begin_deeper
1360 \begin_layout Standard
1361 \paragraph_spacing single
1362 Consider running all of the export tests before and after your change.
1363  If there are differences, please reconcile these (i.e.
1364  fix the bug or fix the tests) 
1365 \emph on
1366 before
1367 \emph default
1368  committing.
1369  Ask for help if you're not sure what to.
1370 \end_layout
1371
1372 \begin_layout Standard
1373 If you do not want to run the tests,
1374 \end_layout
1375
1376 \begin_layout Itemize
1377 post the patch on the list and others will run the tests and eventually
1378  ask for fixes, or
1379 \end_layout
1380
1381 \begin_layout Itemize
1382 commit, but be prepared to fix eventually arising problems or to revert
1383  the commit if there is no easy fix.
1384 \end_layout
1385
1386 \end_deeper
1387 \begin_layout Itemize
1388 Understand how to interpret test failures.
1389  If your commit is found to have broken a test, you should be able to interpret
1390  the test results when made aware of them.
1391  See Section 
1392 \begin_inset CommandInset ref
1393 LatexCommand ref
1394 reference "subsec:Interpreting-export-tests"
1395
1396 \end_inset
1397
1398 .
1399 \end_layout
1400
1401 \begin_layout Paragraph
1402 Configuring the tests
1403 \end_layout
1404
1405 \begin_layout Standard
1406 To enable the export autotests, add the 
1407 \begin_inset Flex Code
1408 status collapsed
1409
1410 \begin_layout Plain Layout
1411 -DLYX_ENABLE_EXPORT_TESTS=ON
1412 \end_layout
1413
1414 \end_inset
1415
1416  flag.
1417  For example:
1418 \end_layout
1419
1420 \begin_layout Standard
1421 \begin_inset Flex Code
1422 status collapsed
1423
1424 \begin_layout Plain Layout
1425 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1426 \end_layout
1427
1428 \end_inset
1429
1430
1431 \end_layout
1432
1433 \begin_layout Standard
1434 \noindent
1435 This flag will increase the time for the cmake command by several seconds,
1436  mainly because of the process of inverting tests (see Section 
1437 \begin_inset CommandInset ref
1438 LatexCommand ref
1439 reference "subsec:Interpreting-export-tests"
1440
1441 \end_inset
1442
1443 ).
1444 \end_layout
1445
1446 \begin_layout Paragraph
1447 Running the tests
1448 \end_layout
1449
1450 \begin_layout Standard
1451 To run all tests, in the build directory simply run the command 
1452 \begin_inset Flex Code
1453 status collapsed
1454
1455 \begin_layout Plain Layout
1456 ctest
1457 \end_layout
1458
1459 \end_inset
1460
1461 .
1462  
1463 \end_layout
1464
1465 \begin_layout Standard
1466 To run only some of the tests, use command line options:
1467 \end_layout
1468
1469 \begin_layout Labeling
1470 \labelwidthstring -R
1471 \begin_inset Flex Code
1472 status collapsed
1473
1474 \begin_layout Plain Layout
1475 -R <pattern>
1476 \end_layout
1477
1478 \end_inset
1479
1480  Run only the tests whose names match the given regular expression.
1481 \end_layout
1482
1483 \begin_layout Labeling
1484 \labelwidthstring -R
1485 \begin_inset Flex Code
1486 status collapsed
1487
1488 \begin_layout Plain Layout
1489 -L <pattern>
1490 \end_layout
1491
1492 \end_inset
1493
1494  Run only the tests whose labels match the given regular expression.
1495  For example, to run only the export tests, you can use 
1496 \begin_inset Flex Code
1497 status collapsed
1498
1499 \begin_layout Plain Layout
1500 ctest -L export
1501 \end_layout
1502
1503 \end_inset
1504
1505 .
1506  
1507 \end_layout
1508
1509 \begin_layout Labeling
1510 \labelwidthstring -R
1511 \begin_inset Flex Code
1512 status collapsed
1513
1514 \begin_layout Plain Layout
1515 -E <pattern>
1516 \end_layout
1517
1518 \end_inset
1519
1520  Exclude the tests whose names match the given regular expression.
1521 \end_layout
1522
1523 \begin_layout Labeling
1524 \labelwidthstring -R
1525 \begin_inset Flex Code
1526 status collapsed
1527
1528 \begin_layout Plain Layout
1529 -LE <pattern>
1530 \end_layout
1531
1532 \end_inset
1533
1534  Exclude the tests whose labels match the given regular expression.
1535 \end_layout
1536
1537 \begin_layout Standard
1538 The following options help to find good selection patterns:
1539 \end_layout
1540
1541 \begin_layout Labeling
1542 \labelwidthstring -R
1543 \begin_inset Flex Code
1544 status collapsed
1545
1546 \begin_layout Plain Layout
1547 -N
1548 \end_layout
1549
1550 \end_inset
1551
1552  List the tests that would be run but not actually run them.
1553  
1554 \end_layout
1555
1556 \begin_deeper
1557 \begin_layout Standard
1558 Useful in conjunction with the -R, -L, -E and -LE options, e.g., if you want
1559  to know how many tests there are or whether your 
1560 \begin_inset Flex Code
1561 status collapsed
1562
1563 \begin_layout Plain Layout
1564 <pattern>
1565 \end_layout
1566
1567 \end_inset
1568
1569  regular expression did what you expected.
1570 \end_layout
1571
1572 \end_deeper
1573 \begin_layout Labeling
1574 \labelwidthstring -R
1575 \begin_inset Flex Code
1576 status collapsed
1577
1578 \begin_layout Plain Layout
1579 \SpecialChar nobreakdash
1580 \SpecialChar nobreakdash
1581 print-labels
1582 \end_layout
1583
1584 \end_inset
1585
1586  print the list of all labels associated with the test set.
1587  Can also be combined with -R, -L, -E, ...
1588  
1589 \end_layout
1590
1591 \begin_layout Standard
1592 Other relevant options are:
1593 \end_layout
1594
1595 \begin_layout Labeling
1596 \labelwidthstring -R
1597 \begin_inset Flex Code
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 -j <jobs>
1602 \end_layout
1603
1604 \end_inset
1605
1606  Run the tests in parallel using the given number of jobs.
1607 \end_layout
1608
1609 \begin_deeper
1610 \begin_layout Standard
1611 We are still working on getting the tests to run in parallel.
1612  However, when running the tests in parallel, sometimes tests fail that
1613  pass when run sequentially.
1614  A reasonable approach is to first run the tests in parallel and then run
1615  the failed tests sequentially.
1616  For example, to run 8 jobs at a time:
1617 \end_layout
1618
1619 \begin_layout Standard
1620 \begin_inset Flex Code
1621 status collapsed
1622
1623 \begin_layout Plain Layout
1624 ctest -j8
1625 \end_layout
1626
1627 \end_inset
1628
1629
1630 \end_layout
1631
1632 \begin_layout Standard
1633 \begin_inset Flex Code
1634 status collapsed
1635
1636 \begin_layout Plain Layout
1637 ctest \SpecialChar nobreakdash
1638 \SpecialChar nobreakdash
1639 rerun-failed
1640 \end_layout
1641
1642 \end_inset
1643
1644
1645 \end_layout
1646
1647 \begin_layout Standard
1648 \noindent
1649 Note that some tests cannot be run in parallel.
1650  These tests are marked in the code with the 
1651 \begin_inset Flex Code
1652 status collapsed
1653
1654 \begin_layout Plain Layout
1655 \noindent
1656 RUN_SERIAL ON
1657 \end_layout
1658
1659 \end_inset
1660
1661  CMake property.
1662 \end_layout
1663
1664 \end_deeper
1665 \begin_layout Labeling
1666 \labelwidthstring -R
1667 \begin_inset Flex Code
1668 status collapsed
1669
1670 \begin_layout Plain Layout
1671 \SpecialChar nobreakdash
1672 \SpecialChar nobreakdash
1673 timeout <seconds>
1674 \end_layout
1675
1676 \end_inset
1677
1678  Set a global timeout on all tests that do not already have a timeout set
1679  on them.
1680 \end_layout
1681
1682 \begin_deeper
1683 \begin_layout Standard
1684 There have been bugs in LyX and in \SpecialChar LaTeX
1685  which cause compilation to hang, and
1686  without a timeout a test might never stop (in one case there was even a
1687  memory leak).
1688  If a test times out, the 
1689 \begin_inset Flex Code
1690 status collapsed
1691
1692 \begin_layout Plain Layout
1693 ctest
1694 \end_layout
1695
1696 \end_inset
1697
1698  command exits with error, but you can distinguish between a timed out test
1699  and a failed test in the output reported at the end of the 
1700 \begin_inset Flex Code
1701 status collapsed
1702
1703 \begin_layout Plain Layout
1704 ctest
1705 \end_layout
1706
1707 \end_inset
1708
1709  command.
1710 \end_layout
1711
1712 \end_deeper
1713 \begin_layout Standard
1714 See the manual (
1715 \begin_inset Flex Code
1716 status collapsed
1717
1718 \begin_layout Plain Layout
1719 man ctest
1720 \end_layout
1721
1722 \end_inset
1723
1724 ) the full list of command line options.
1725 \end_layout
1726
1727 \begin_layout Paragraph
1728 \begin_inset CommandInset label
1729 LatexCommand label
1730 name "subsec:Interpreting-export-tests"
1731
1732 \end_inset
1733
1734 Interpreting the export test results
1735 \end_layout
1736
1737 \begin_layout Standard
1738 A test can fail for several reasons, not all of them bad.
1739 \end_layout
1740
1741 \begin_layout Enumerate
1742 The .lyx file could have been added recently and some formats are not expected
1743  to work well.
1744 \end_layout
1745
1746 \begin_layout Enumerate
1747 A dependency is not met (e.g.
1748  the \SpecialChar LaTeX
1749  class file).
1750  One hint that this is the case is that the corresponding 
1751 \begin_inset Flex Code
1752 status collapsed
1753
1754 \begin_layout Plain Layout
1755 check_load
1756 \end_layout
1757
1758 \end_inset
1759
1760  test will likely also fail.
1761 \end_layout
1762
1763 \begin_layout Enumerate
1764 An inverted test fails to fail (i.e.
1765  export that previously failed now works).
1766 \end_layout
1767
1768 \begin_layout Enumerate
1769 An external dependency was updated (e.g.
1770  \SpecialChar TeX
1771  Live).
1772 \end_layout
1773
1774 \begin_layout Enumerate
1775 A recent code change introduced a bug.
1776 \end_layout
1777
1778 \begin_layout Enumerate
1779 \begin_inset CommandInset label
1780 LatexCommand label
1781 name "enu:exposed"
1782
1783 \end_inset
1784
1785 A change in a document exposed a previously unknown bug or an incompatibility
1786  with an export format (e.g.
1787  Lua\SpecialChar LaTeX
1788 ).
1789 \end_layout
1790
1791 \begin_layout Standard
1792 Because the .lyx files are exported in several formats, it is not surprising
1793  that many of the exports fail.
1794  This expectation of failure is addressed by 
1795 \begin_inset Quotes eld
1796 \end_inset
1797
1798 inverting
1799 \begin_inset Quotes erd
1800 \end_inset
1801
1802  the tests, that is, by marking the test as 
1803 \begin_inset Quotes eld
1804 \end_inset
1805
1806 passing
1807 \begin_inset Quotes erd
1808 \end_inset
1809
1810  if the export exits with error and as 
1811 \begin_inset Quotes eld
1812 \end_inset
1813
1814 failing
1815 \begin_inset Quotes erd
1816 \end_inset
1817
1818  if the export succeeds
1819 \emph on
1820 .
1821
1822 \emph default
1823  It follows that these expected failures will not show up as failed tests
1824  in the test results and thus will not pollute the 
1825 \begin_inset Quotes eld
1826 \end_inset
1827
1828 good
1829 \begin_inset Quotes erd
1830 \end_inset
1831
1832  tests.
1833  If the export actually succeeds, then the test will fail.
1834  The purpose of this failure is to get your attention—something has changed,
1835  possibly for the better.
1836 \end_layout
1837
1838 \begin_layout Standard
1839 We try to document why a test is inverted or ignored.
1840  See the comment (prefixed with 
1841 \begin_inset Flex Code
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845 #
1846 \end_layout
1847
1848 \end_inset
1849
1850 ) above the block in which the test is listed as inverted or ignored in
1851  the files 
1852 \begin_inset Flex Code
1853 status collapsed
1854
1855 \begin_layout Plain Layout
1856 development/autotests/suspiciousTests
1857 \end_layout
1858
1859 \end_inset
1860
1861  and 
1862 \begin_inset Flex Code
1863 status collapsed
1864
1865 \begin_layout Plain Layout
1866 development/autotests/ignoredTests
1867 \end_layout
1868
1869 \end_inset
1870
1871 .
1872  It is possible that an export goes from succeeding to failing just because
1873  the document was changed and the document was never expected to work with
1874  a certain export format in the first case.
1875  Once this is confirmed to be the situation, the test can be inverted.
1876 \end_layout
1877
1878 \begin_layout Standard
1879 A good question is why do we enable the tests for non-default formats? The
1880  answer is that if a non-default route is broken it is often because a bug
1881  was introduced in LyX and not because a document-specific change was made
1882  that is not supported by the route.
1883  In other words, there is a high signal/noise ratio in the export tests
1884  for some non-default formats.
1885  
1886 \end_layout
1887
1888 \begin_layout Standard
1889 What action should you take if a test fails? This depends:
1890 \end_layout
1891
1892 \begin_layout Standard
1893 Generally, if a change breaks compilation for the target format (for the
1894  manuals pdf2) without solving some important other issue, fix or revert
1895  the commit that led to failure.
1896  If a change breaks compilation for some non-target format (for the manuals
1897  everything except pdf2), invert the test.
1898  
1899 \end_layout
1900
1901 \begin_layout Standard
1902 A special case is given, if the export was succeeding before but showing
1903  garbled text in the PDF output.
1904  Try to establish, that when the compilation succeeded before the resulting
1905  PDF was good.
1906  Otherwise, it is in fact an improvement when a test fails.
1907  Now it might fail with a clear message of "language xyz not supported".
1908  It is always good to check manually why something fails and if it passes
1909  if the PDF output is good.
1910 \end_layout
1911
1912 \begin_layout Standard
1913 Sometimes a test is fixed as side-effect of some change.
1914  We should uninvert a test (remove it from the 
1915 \begin_inset Flex Code
1916 status collapsed
1917
1918 \begin_layout Plain Layout
1919 suspiciousTests
1920 \end_layout
1921
1922 \end_inset
1923
1924  file) in order to preserve the fix.
1925 \end_layout
1926
1927 \begin_layout Standard
1928 When a test or several tests fail, consider checking the files in the 
1929 \begin_inset Flex Code
1930 status collapsed
1931
1932 \begin_layout Plain Layout
1933 Testing/Temporary/
1934 \end_layout
1935
1936 \end_inset
1937
1938  subdirectory of your build directory.
1939  In this subdirectory are three files: the file 
1940 \begin_inset Flex Code
1941 status collapsed
1942
1943 \begin_layout Plain Layout
1944 LastTestsFailed.log
1945 \end_layout
1946
1947 \end_inset
1948
1949  simply lists the tests that failed on your last 
1950 \begin_inset Flex Code
1951 status collapsed
1952
1953 \begin_layout Plain Layout
1954 ctest
1955 \end_layout
1956
1957 \end_inset
1958
1959  command; the 
1960 \begin_inset Flex Code
1961 status collapsed
1962
1963 \begin_layout Plain Layout
1964 LastTest.log
1965 \end_layout
1966
1967 \end_inset
1968
1969  file contains the output from the tests (and often has details explaining
1970  why a test failed); and the 
1971 \begin_inset Flex Code
1972 status collapsed
1973
1974 \begin_layout Plain Layout
1975 CTestCostData.txt
1976 \end_layout
1977
1978 \end_inset
1979
1980  file lists the times that it took to run the tests.
1981 \end_layout
1982
1983 \begin_layout Paragraph
1984 Inverted tests
1985 \end_layout
1986
1987 \begin_layout Standard
1988 These tests are expected to always fail.
1989 \end_layout
1990
1991 \begin_layout Description
1992 inverted These tests are expected to fail, but are subject to be examined.
1993  It is expected that they will pass in a foreseeable future.
1994  They are labeled 'inverted'.
1995 \end_layout
1996
1997 \begin_layout Description
1998 suspended Some inverted tests are labeled 'suspended'.
1999  This means, they are not executed using 
2000 \begin_inset Flex Code
2001 status collapsed
2002
2003 \begin_layout Plain Layout
2004 ctest -L export
2005 \end_layout
2006
2007 \end_inset
2008
2009  or 
2010 \begin_inset Flex Code
2011 status collapsed
2012
2013 \begin_layout Plain Layout
2014 ctest -L inverted
2015 \end_layout
2016
2017 \end_inset
2018
2019 .
2020  From time to time they still have to be checked using 
2021 \begin_inset Flex Code
2022 status collapsed
2023
2024 \begin_layout Plain Layout
2025 ctest -L suspended
2026 \end_layout
2027
2028 \end_inset
2029
2030 .
2031 \end_layout
2032
2033 \begin_deeper
2034 \begin_layout Standard
2035 These tests are suspended, because they fail for known reasons which cannot
2036  ATM be resolved.
2037  But it is expected the reason might disappear in the future.
2038  Be it new TL or better handling in \SpecialChar LyX
2039 .
2040 \end_layout
2041
2042 \begin_layout Standard
2043 For ctest commands without the 
2044 \begin_inset Flex Code
2045 status collapsed
2046
2047 \begin_layout Plain Layout
2048 -L
2049 \end_layout
2050
2051 \end_inset
2052
2053  parameter nothing changes.
2054  Suspended or not, tests will be executed depending only on the regexes
2055  parameters given to the ctest command.
2056 \end_layout
2057
2058 \end_deeper
2059 \begin_layout Paragraph
2060 Unreliable tests
2061 \end_layout
2062
2063 \begin_layout Description
2064 nonstandard Requires non-standard ressources (\SpecialChar LaTeX
2065  packages and document classes,
2066  fonts, ...) that are not a requirement for running this test suite.
2067 \end_layout
2068
2069 \begin_deeper
2070 \begin_layout Standard
2071 These tests are labeled as 
2072 \family typewriter
2073 'nonstandard'.
2074 \end_layout
2075
2076 \end_deeper
2077 \begin_layout Description
2078 erratic Tests with 
2079 \begin_inset Quotes eld
2080 \end_inset
2081
2082 arbitrary
2083 \begin_inset Quotes erd
2084 \end_inset
2085
2086  result, depending on local configuration, OS, \SpecialChar TeX
2087  distribution, package versions,
2088  or the phase of the moon.
2089 \end_layout
2090
2091 \begin_deeper
2092 \begin_layout Standard
2093 These tests are labeled as 
2094 \family typewriter
2095 'erratic'.
2096 \end_layout
2097
2098 \end_deeper
2099 \begin_layout Paragraph
2100 Export test filtering
2101 \end_layout
2102
2103 \begin_layout Standard
2104 There are files which control the assignment of a label to a test.
2105 \end_layout
2106
2107 \begin_layout Description
2108 ignoredTests (small file)
2109 \begin_inset Newline newline
2110 \end_inset
2111
2112 Tests selected here are withdrawn
2113 \end_layout
2114
2115 \begin_deeper
2116 \begin_layout Labeling
2117 \labelwidthstring 00.00.0000
2118 Input Test of any export combination
2119 \end_layout
2120
2121 \begin_layout Labeling
2122 \labelwidthstring 00.00.0000
2123 Output Stop if tests not selected here
2124 \end_layout
2125
2126 \end_deeper
2127 \begin_layout Description
2128 unreliableTests: Tests selected either pass or fail, but that is dependent
2129  on the system where the test is run.
2130  Selected tests gain the label 'unreliable'.
2131 \end_layout
2132
2133 \begin_deeper
2134 \begin_layout Labeling
2135 \labelwidthstring 00.00.0000
2136 Input Each test which passed 'ignoredTests'
2137 \end_layout
2138
2139 \begin_layout Labeling
2140 \labelwidthstring 00.00.0000
2141 Output Stop if test selected, gain label 'unreliable'.
2142 \end_layout
2143
2144 \end_deeper
2145 \begin_layout Description
2146 suspiciousTests 
2147 \begin_inset space \space{}
2148 \end_inset
2149
2150
2151 \end_layout
2152
2153 \begin_deeper
2154 \begin_layout Labeling
2155 \labelwidthstring 00.00.0000
2156 Input Each test which passed 'unreliableTests'
2157 \end_layout
2158
2159 \begin_layout Labeling
2160 \labelwidthstring 00.00.0000
2161 Output Stop if not selected.
2162 \end_layout
2163
2164 \begin_layout Standard
2165 The following file is meant as subselections of 'suspiciousTests'.
2166  If neither subselection applies, test gains labels 'export' and 'inverted'
2167 \end_layout
2168
2169 \begin_layout Description
2170 suspendedTests Tests selected here gain the label 'suspended' but _not_
2171  'export' or 'inverted', although in ctest they remain inverted.
2172  ('ctest' knows only 'inverted' or not, labels are used only for test selection)
2173 \end_layout
2174
2175 \begin_deeper
2176 \begin_layout Labeling
2177 \labelwidthstring 00.00.0000
2178 Input Each test selected by 'suspiciousTests' 
2179 \end_layout
2180
2181 \begin_layout Labeling
2182 \labelwidthstring 00.00.0000
2183 Output Selected test gains label 'suspended'.
2184  
2185 \end_layout
2186
2187 \end_deeper
2188 \end_deeper
2189 \begin_layout Standard
2190 The following table may clarify label assignement
2191 \end_layout
2192
2193 \begin_layout Standard
2194 \begin_inset Tabular
2195 <lyxtabular version="3" rows="7" columns="12">
2196 <features tabularvalignment="middle">
2197 <column alignment="left" valignment="top" width="0pt">
2198 <column alignment="left" valignment="top" width="0pt">
2199 <column alignment="left" valignment="top" width="0pt">
2200 <column alignment="left" valignment="top" width="0pt">
2201 <column alignment="center" valignment="top">
2202 <column alignment="center" valignment="top">
2203 <column alignment="center" valignment="top">
2204 <column alignment="center" valignment="top">
2205 <column alignment="center" valignment="top">
2206 <column alignment="center" valignment="top">
2207 <column alignment="center" valignment="top">
2208 <column alignment="center" valignment="top">
2209 <row>
2210 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2211 \begin_inset Text
2212
2213 \begin_layout Plain Layout
2214 Test found in file:
2215 \end_layout
2216
2217 \end_inset
2218 </cell>
2219 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2220 \begin_inset Text
2221
2222 \begin_layout Plain Layout
2223
2224 \end_layout
2225
2226 \end_inset
2227 </cell>
2228 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2229 \begin_inset Text
2230
2231 \begin_layout Plain Layout
2232
2233 \end_layout
2234
2235 \end_inset
2236 </cell>
2237 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2238 \begin_inset Text
2239
2240 \begin_layout Plain Layout
2241
2242 \end_layout
2243
2244 \end_inset
2245 </cell>
2246 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2247 \begin_inset Text
2248
2249 \begin_layout Plain Layout
2250 Marked in ctest, Assigned label
2251 \end_layout
2252
2253 \end_inset
2254 </cell>
2255 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
2256 \begin_inset Text
2257
2258 \begin_layout Plain Layout
2259
2260 \end_layout
2261
2262 \end_inset
2263 </cell>
2264 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2265 \begin_inset Text
2266
2267 \begin_layout Plain Layout
2268
2269 \end_layout
2270
2271 \end_inset
2272 </cell>
2273 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2274 \begin_inset Text
2275
2276 \begin_layout Plain Layout
2277
2278 \end_layout
2279
2280 \end_inset
2281 </cell>
2282 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2283 \begin_inset Text
2284
2285 \begin_layout Plain Layout
2286
2287 \end_layout
2288
2289 \end_inset
2290 </cell>
2291 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2292 \begin_inset Text
2293
2294 \begin_layout Plain Layout
2295
2296 \end_layout
2297
2298 \end_inset
2299 </cell>
2300 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2301 \begin_inset Text
2302
2303 \begin_layout Plain Layout
2304
2305 \end_layout
2306
2307 \end_inset
2308 </cell>
2309 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2310 \begin_inset Text
2311
2312 \begin_layout Plain Layout
2313
2314 \end_layout
2315
2316 \end_inset
2317 </cell>
2318 </row>
2319 <row>
2320 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2321 \begin_inset Text
2322
2323 \begin_layout Plain Layout
2324 Ignored
2325 \end_layout
2326
2327 \end_inset
2328 </cell>
2329 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2330 \begin_inset Text
2331
2332 \begin_layout Plain Layout
2333 Unreliable
2334 \end_layout
2335
2336 \end_inset
2337 </cell>
2338 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2339 \begin_inset Text
2340
2341 \begin_layout Plain Layout
2342 Suspicious
2343 \end_layout
2344
2345 \end_inset
2346 </cell>
2347 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2348 \begin_inset Text
2349
2350 \begin_layout Plain Layout
2351 Suspended
2352 \end_layout
2353
2354 \end_inset
2355 </cell>
2356 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2357 \begin_inset Text
2358
2359 \begin_layout Plain Layout
2360 export
2361 \end_layout
2362
2363 \end_inset
2364 </cell>
2365 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2366 \begin_inset Text
2367
2368 \begin_layout Plain Layout
2369
2370 \end_layout
2371
2372 \end_inset
2373 </cell>
2374 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2375 \begin_inset Text
2376
2377 \begin_layout Plain Layout
2378 unreliable
2379 \end_layout
2380
2381 \end_inset
2382 </cell>
2383 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2384 \begin_inset Text
2385
2386 \begin_layout Plain Layout
2387
2388 \end_layout
2389
2390 \end_inset
2391 </cell>
2392 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2393 \begin_inset Text
2394
2395 \begin_layout Plain Layout
2396 inverted
2397 \end_layout
2398
2399 \end_inset
2400 </cell>
2401 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2402 \begin_inset Text
2403
2404 \begin_layout Plain Layout
2405
2406 \end_layout
2407
2408 \end_inset
2409 </cell>
2410 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2411 \begin_inset Text
2412
2413 \begin_layout Plain Layout
2414 suspended
2415 \end_layout
2416
2417 \end_inset
2418 </cell>
2419 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2420 \begin_inset Text
2421
2422 \begin_layout Plain Layout
2423
2424 \end_layout
2425
2426 \end_inset
2427 </cell>
2428 </row>
2429 <row>
2430 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2431 \begin_inset Text
2432
2433 \begin_layout Plain Layout
2434 Yes
2435 \end_layout
2436
2437 \end_inset
2438 </cell>
2439 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2440 \begin_inset Text
2441
2442 \begin_layout Plain Layout
2443 -
2444 \end_layout
2445
2446 \end_inset
2447 </cell>
2448 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2449 \begin_inset Text
2450
2451 \begin_layout Plain Layout
2452 -
2453 \end_layout
2454
2455 \end_inset
2456 </cell>
2457 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2458 \begin_inset Text
2459
2460 \begin_layout Plain Layout
2461 -
2462 \end_layout
2463
2464 \end_inset
2465 </cell>
2466 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2467 \begin_inset Text
2468
2469 \begin_layout Plain Layout
2470 -
2471 \end_layout
2472
2473 \end_inset
2474 </cell>
2475 <cell alignment="center" valignment="top" topline="true" usebox="none">
2476 \begin_inset Text
2477
2478 \begin_layout Plain Layout
2479 -
2480 \end_layout
2481
2482 \end_inset
2483 </cell>
2484 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2485 \begin_inset Text
2486
2487 \begin_layout Plain Layout
2488 -
2489 \end_layout
2490
2491 \end_inset
2492 </cell>
2493 <cell alignment="center" valignment="top" topline="true" usebox="none">
2494 \begin_inset Text
2495
2496 \begin_layout Plain Layout
2497
2498 \end_layout
2499
2500 \end_inset
2501 </cell>
2502 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2503 \begin_inset Text
2504
2505 \begin_layout Plain Layout
2506 -
2507 \end_layout
2508
2509 \end_inset
2510 </cell>
2511 <cell alignment="center" valignment="top" topline="true" usebox="none">
2512 \begin_inset Text
2513
2514 \begin_layout Plain Layout
2515 -
2516 \end_layout
2517
2518 \end_inset
2519 </cell>
2520 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2521 \begin_inset Text
2522
2523 \begin_layout Plain Layout
2524 -
2525 \end_layout
2526
2527 \end_inset
2528 </cell>
2529 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2530 \begin_inset Text
2531
2532 \begin_layout Plain Layout
2533 -
2534 \end_layout
2535
2536 \end_inset
2537 </cell>
2538 </row>
2539 <row>
2540 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2541 \begin_inset Text
2542
2543 \begin_layout Plain Layout
2544 No
2545 \end_layout
2546
2547 \end_inset
2548 </cell>
2549 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2550 \begin_inset Text
2551
2552 \begin_layout Plain Layout
2553 Yes
2554 \end_layout
2555
2556 \end_inset
2557 </cell>
2558 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2559 \begin_inset Text
2560
2561 \begin_layout Plain Layout
2562 -
2563 \end_layout
2564
2565 \end_inset
2566 </cell>
2567 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2568 \begin_inset Text
2569
2570 \begin_layout Plain Layout
2571 -
2572 \end_layout
2573
2574 \end_inset
2575 </cell>
2576 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2577 \begin_inset Text
2578
2579 \begin_layout Plain Layout
2580 -
2581 \end_layout
2582
2583 \end_inset
2584 </cell>
2585 <cell alignment="center" valignment="top" topline="true" usebox="none">
2586 \begin_inset Text
2587
2588 \begin_layout Plain Layout
2589 -
2590 \end_layout
2591
2592 \end_inset
2593 </cell>
2594 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2595 \begin_inset Text
2596
2597 \begin_layout Plain Layout
2598 -
2599 \end_layout
2600
2601 \end_inset
2602 </cell>
2603 <cell alignment="center" valignment="top" topline="true" usebox="none">
2604 \begin_inset Text
2605
2606 \begin_layout Plain Layout
2607 +
2608 \end_layout
2609
2610 \end_inset
2611 </cell>
2612 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2613 \begin_inset Text
2614
2615 \begin_layout Plain Layout
2616 -
2617 \end_layout
2618
2619 \end_inset
2620 </cell>
2621 <cell alignment="center" valignment="top" topline="true" usebox="none">
2622 \begin_inset Text
2623
2624 \begin_layout Plain Layout
2625 -
2626 \end_layout
2627
2628 \end_inset
2629 </cell>
2630 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2631 \begin_inset Text
2632
2633 \begin_layout Plain Layout
2634 -
2635 \end_layout
2636
2637 \end_inset
2638 </cell>
2639 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2640 \begin_inset Text
2641
2642 \begin_layout Plain Layout
2643 -
2644 \end_layout
2645
2646 \end_inset
2647 </cell>
2648 </row>
2649 <row>
2650 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
2651 \begin_inset Text
2652
2653 \begin_layout Plain Layout
2654
2655 \end_layout
2656
2657 \end_inset
2658 </cell>
2659 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2660 \begin_inset Text
2661
2662 \begin_layout Plain Layout
2663 No
2664 \end_layout
2665
2666 \end_inset
2667 </cell>
2668 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
2669 \begin_inset Text
2670
2671 \begin_layout Plain Layout
2672 Yes
2673 \end_layout
2674
2675 \end_inset
2676 </cell>
2677 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2678 \begin_inset Text
2679
2680 \begin_layout Plain Layout
2681 Yes
2682 \end_layout
2683
2684 \end_inset
2685 </cell>
2686 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2687 \begin_inset Text
2688
2689 \begin_layout Plain Layout
2690 -
2691 \end_layout
2692
2693 \end_inset
2694 </cell>
2695 <cell alignment="center" valignment="top" topline="true" usebox="none">
2696 \begin_inset Text
2697
2698 \begin_layout Plain Layout
2699 -
2700 \end_layout
2701
2702 \end_inset
2703 </cell>
2704 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2705 \begin_inset Text
2706
2707 \begin_layout Plain Layout
2708 -
2709 \end_layout
2710
2711 \end_inset
2712 </cell>
2713 <cell alignment="center" valignment="top" topline="true" usebox="none">
2714 \begin_inset Text
2715
2716 \begin_layout Plain Layout
2717 -
2718 \end_layout
2719
2720 \end_inset
2721 </cell>
2722 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2723 \begin_inset Text
2724
2725 \begin_layout Plain Layout
2726 +
2727 \end_layout
2728
2729 \end_inset
2730 </cell>
2731 <cell alignment="center" valignment="top" topline="true" usebox="none">
2732 \begin_inset Text
2733
2734 \begin_layout Plain Layout
2735 -
2736 \end_layout
2737
2738 \end_inset
2739 </cell>
2740 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2741 \begin_inset Text
2742
2743 \begin_layout Plain Layout
2744 -
2745 \end_layout
2746
2747 \end_inset
2748 </cell>
2749 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2750 \begin_inset Text
2751
2752 \begin_layout Plain Layout
2753 +
2754 \end_layout
2755
2756 \end_inset
2757 </cell>
2758 </row>
2759 <row>
2760 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2761 \begin_inset Text
2762
2763 \begin_layout Plain Layout
2764
2765 \end_layout
2766
2767 \end_inset
2768 </cell>
2769 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2770 \begin_inset Text
2771
2772 \begin_layout Plain Layout
2773
2774 \end_layout
2775
2776 \end_inset
2777 </cell>
2778 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2779 \begin_inset Text
2780
2781 \begin_layout Plain Layout
2782
2783 \end_layout
2784
2785 \end_inset
2786 </cell>
2787 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2788 \begin_inset Text
2789
2790 \begin_layout Plain Layout
2791 No
2792 \end_layout
2793
2794 \end_inset
2795 </cell>
2796 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2797 \begin_inset Text
2798
2799 \begin_layout Plain Layout
2800 -
2801 \end_layout
2802
2803 \end_inset
2804 </cell>
2805 <cell alignment="center" valignment="top" topline="true" usebox="none">
2806 \begin_inset Text
2807
2808 \begin_layout Plain Layout
2809 +
2810 \end_layout
2811
2812 \end_inset
2813 </cell>
2814 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2815 \begin_inset Text
2816
2817 \begin_layout Plain Layout
2818 -
2819 \end_layout
2820
2821 \end_inset
2822 </cell>
2823 <cell alignment="center" valignment="top" topline="true" usebox="none">
2824 \begin_inset Text
2825
2826 \begin_layout Plain Layout
2827 -
2828 \end_layout
2829
2830 \end_inset
2831 </cell>
2832 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2833 \begin_inset Text
2834
2835 \begin_layout Plain Layout
2836 +
2837 \end_layout
2838
2839 \end_inset
2840 </cell>
2841 <cell alignment="center" valignment="top" topline="true" usebox="none">
2842 \begin_inset Text
2843
2844 \begin_layout Plain Layout
2845 +
2846 \end_layout
2847
2848 \end_inset
2849 </cell>
2850 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2851 \begin_inset Text
2852
2853 \begin_layout Plain Layout
2854 -
2855 \end_layout
2856
2857 \end_inset
2858 </cell>
2859 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2860 \begin_inset Text
2861
2862 \begin_layout Plain Layout
2863 -
2864 \end_layout
2865
2866 \end_inset
2867 </cell>
2868 </row>
2869 <row>
2870 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2871 \begin_inset Text
2872
2873 \begin_layout Plain Layout
2874
2875 \end_layout
2876
2877 \end_inset
2878 </cell>
2879 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2880 \begin_inset Text
2881
2882 \begin_layout Plain Layout
2883
2884 \end_layout
2885
2886 \end_inset
2887 </cell>
2888 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2889 \begin_inset Text
2890
2891 \begin_layout Plain Layout
2892 No
2893 \end_layout
2894
2895 \end_inset
2896 </cell>
2897 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2898 \begin_inset Text
2899
2900 \begin_layout Plain Layout
2901 -
2902 \end_layout
2903
2904 \end_inset
2905 </cell>
2906 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2907 \begin_inset Text
2908
2909 \begin_layout Plain Layout
2910 -
2911 \end_layout
2912
2913 \end_inset
2914 </cell>
2915 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
2916 \begin_inset Text
2917
2918 \begin_layout Plain Layout
2919 +
2920 \end_layout
2921
2922 \end_inset
2923 </cell>
2924 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2925 \begin_inset Text
2926
2927 \begin_layout Plain Layout
2928 -
2929 \end_layout
2930
2931 \end_inset
2932 </cell>
2933 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
2934 \begin_inset Text
2935
2936 \begin_layout Plain Layout
2937 -
2938 \end_layout
2939
2940 \end_inset
2941 </cell>
2942 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2943 \begin_inset Text
2944
2945 \begin_layout Plain Layout
2946 -
2947 \end_layout
2948
2949 \end_inset
2950 </cell>
2951 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
2952 \begin_inset Text
2953
2954 \begin_layout Plain Layout
2955 -
2956 \end_layout
2957
2958 \end_inset
2959 </cell>
2960 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2961 \begin_inset Text
2962
2963 \begin_layout Plain Layout
2964 -
2965 \end_layout
2966
2967 \end_inset
2968 </cell>
2969 <cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
2970 \begin_inset Text
2971
2972 \begin_layout Plain Layout
2973 -
2974 \end_layout
2975
2976 \end_inset
2977 </cell>
2978 </row>
2979 </lyxtabular>
2980
2981 \end_inset
2982
2983
2984 \end_layout
2985
2986 \begin_layout Subsubsection
2987 check_load tests
2988 \end_layout
2989
2990 \begin_layout Standard
2991 These tests check whether a .lyx file loads without any terminal messages.
2992  They correspond to the manual operations of simply opening a .lyx file on
2993  the terminal, exiting LyX once the file is loaded, and then checking whether
2994  there is any output from the terminal.
2995  These tests are useful for catching malformed .lyx files and parsing bugs.
2996  They can also be used to find a .lyx file in which an instance of something
2997  happens.
2998  To do this, compile LyX with a local patch that outputs something to the
2999  terminal when an instance is found, and then run the check_load tests to
3000  see if any fail, which would mean that the situation occurs in the LyX
3001  documentation files corresponding to the failed tests.
3002  These tests are expectedly fragile: any LyX diagnostic message, which is
3003  not necessarily an error, would cause the tests to fail.
3004  Similarly, any message output by a library (e.g.
3005  Qt) would also cause failure.
3006  There are some messages that the check_load tests are instructed to ignore,
3007  which are stored in the file 
3008 \begin_inset Flex Code
3009 status collapsed
3010
3011 \begin_layout Plain Layout
3012 development/autotests/filterCheckWarnings
3013 \end_layout
3014
3015 \end_inset
3016
3017 .
3018 \end_layout
3019
3020 \begin_layout Standard
3021 Under cmake, the tests are labeled as 'load'.
3022 \end_layout
3023
3024 \begin_layout Subsubsection
3025 URL tests
3026 \end_layout
3027
3028 \begin_layout Standard
3029 The URL tests are enabled with the 
3030 \begin_inset Flex Code
3031 status collapsed
3032
3033 \begin_layout Plain Layout
3034 -DLYX_ENABLE_URLTESTS=ON
3035 \end_layout
3036
3037 \end_inset
3038
3039  CMake flag and are useful for finding broken links in our documentation
3040  files.
3041  If a URL test fails, to see which link in particular was reported as broken,
3042  see the output in 
3043 \begin_inset Flex Code
3044 status collapsed
3045
3046 \begin_layout Plain Layout
3047 LastTest.log
3048 \end_layout
3049
3050 \end_inset
3051
3052 .
3053  These tests are extremely fragile (e.g.
3054  a test can depend on your Internet connection) and a failed URL test should
3055  not be taken too seriously.
3056  URL tests are labeled as 
3057 \family typewriter
3058 'url'.
3059 \end_layout
3060
3061 \begin_layout Paragraph
3062 Running URL tests
3063 \end_layout
3064
3065 \begin_layout Standard
3066 cmake is required to run the \SpecialChar LyX
3067  tests, running them is not implemented for
3068  autotools.
3069 \end_layout
3070
3071 \begin_layout Standard
3072 The appropriate commands are:
3073 \end_layout
3074
3075 \begin_layout Itemize
3076
3077 \family typewriter
3078 ctest -L url
3079 \family default
3080
3081 \begin_inset Newline newline
3082 \end_inset
3083
3084 runns all tests with label 
3085 \family typewriter
3086 'url'
3087 \end_layout
3088
3089 \begin_layout Itemize
3090
3091 \family typewriter
3092 ctest -R 'check_.*urls'
3093 \family default
3094
3095 \begin_inset Newline newline
3096 \end_inset
3097
3098 runns the tests 'check_accessible_urls'
3099 \end_layout
3100
3101 \begin_layout Standard
3102 Associated test results can be examined in ctest-log directory in files
3103  of the form 'LastFailed.*URLS.log'
3104 \end_layout
3105
3106 \begin_layout Subsubsection
3107 Test labels
3108 \end_layout
3109
3110 \begin_layout Standard
3111 ctest label commands:
3112 \end_layout
3113
3114 \begin_layout Description
3115 \SpecialChar nobreakdash
3116 \SpecialChar nobreakdash
3117 print-labels shows all assigned labels
3118 \end_layout
3119
3120 \begin_layout Description
3121 \SpecialChar nobreakdash
3122 L
3123 \begin_inset space ~
3124 \end_inset
3125
3126 labelname executes all tests to which this label is assigned to.
3127  A test may have more that one label.
3128 \end_layout
3129
3130 \begin_layout Description
3131 \SpecialChar nobreakdash
3132 j
3133 \begin_inset space ~
3134 \end_inset
3135
3136 number executes tests in parallel using 'number' simultaneously processes.
3137  Some tests are marked as 'sequencial', for them this parameter has no effect.
3138 \end_layout
3139
3140 \begin_layout Section
3141 Development policies
3142 \end_layout
3143
3144 \begin_layout Standard
3145 This chapter lists some guidelines that should be followed.
3146  This list is not complete, and many guidelines are in separate chapters,
3147  such as 
3148 \begin_inset Quotes eld
3149 \end_inset
3150
3151 When is an update of the .lyx file format number needed?
3152 \begin_inset Quotes erd
3153 \end_inset
3154
3155  in Section 
3156 \begin_inset CommandInset ref
3157 LatexCommand ref
3158 reference "sec:When-is-an"
3159
3160 \end_inset
3161
3162 .
3163 \end_layout
3164
3165 \begin_layout Subsection
3166 When to set a fixed milestone?
3167 \end_layout
3168
3169 \begin_layout Standard
3170 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
3171  holds:
3172 \end_layout
3173
3174 \begin_layout Enumerate
3175 Somebody is actively working on a fix.
3176 \end_layout
3177
3178 \begin_layout Enumerate
3179 The bug is so severe that it would block the release if it is not fixed.
3180 \end_layout
3181
3182 \begin_layout Standard
3183 If a bug is important, but nobody is working on it, and it is no showstopper,
3184  use a milestone like 2.1.x or 2.2.x.
3185  For all other bugs, do not set a milestone at all.
3186 \end_layout
3187
3188 \begin_layout Subsection
3189 Can we add rc entries in stable branch?
3190 \end_layout
3191
3192 \begin_layout Standard
3193 No.
3194  We are supposed to increase the prefs2prefs version number with such things.
3195 \end_layout
3196
3197 \begin_layout Section
3198 Documentation policies
3199 \end_layout
3200
3201 \begin_layout Standard
3202 The main documentation consists of these files:
3203 \end_layout
3204
3205 \begin_layout Description
3206 splash.lyx it is the first file you see after an installation.
3207  We assume that a new user sees this.
3208  It is therefore designed to be as simple as possible.
3209  Therefore please don't add any new formatting, only fix typos etc.
3210  Splash.lyx is up to date for \SpecialChar LyX
3211  2.1.x, currently maintained by Uwe Stöhr.
3212 \end_layout
3213
3214 \begin_layout Description
3215 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
3216 .
3217  It therefore uses a limited set of formatting.
3218  For example a standard document class.
3219  Since new users will first learn about the formatting possibilities of
3220  \SpecialChar LyX
3221  please keep this file that simple.
3222  Intro.lyx is up to date for \SpecialChar LyX
3223  2.1.x, currently maintained by Uwe Stöhr.
3224 \end_layout
3225
3226 \begin_layout Description
3227 Tutorial.lyx our tutorial.
3228  It must be always up to date.
3229  Normally there is nothing to add since we don't want to overwhelm new users
3230  with too much details.
3231  The will learn these details while using \SpecialChar LyX
3232  and we have special manuals.
3233  Tutorial.lyx is up to date for \SpecialChar LyX
3234  2.1.x, currently maintained by Uwe Stöhr.
3235 \end_layout
3236
3237 \begin_layout Description
3238 UserGuide.lyx our main user guide.
3239  It covers a mixture of basic and detailed information.
3240  Some information is also in the Math and EmbeddedObjects manual so that
3241  the UserGuide refers to these files.
3242  UserGuide.lyx is up to date for \SpecialChar LyX
3243  2.1.x, currently maintained by Uwe Stöhr.
3244 \end_layout
3245
3246 \begin_layout Description
3247 EmbeddedObjects.lyx a special manual to explain things like tables floats
3248  boxes etc.
3249  in all detail.
3250  EmbeddedObjects.lyx is up to date for \SpecialChar LyX
3251  2.1.x, currently maintained by Uwe
3252  Stöhr.
3253 \end_layout
3254
3255 \begin_layout Description
3256 Math.lyx a special manual to explain everything regarding math in all detail.
3257  Math.lyx is up to date for \SpecialChar LyX
3258  2.1.x, currently maintained by Uwe Stöhr.
3259 \end_layout
3260
3261 \begin_layout Description
3262 Additional.lyx this manual covers information that would be too much detail
3263  for the UserGuide or would make the UserGuide uncompilable or only compilable
3264  when installing a lot of special \SpecialChar LaTeX
3265 -packages.
3266  What should be in the UserGuide or better in Additional is a matter of
3267  taste.
3268  it is up to you to decide that.
3269  Additional.lyx is not completely up to date for \SpecialChar LyX
3270  2.1.x.
3271  Only chapter
3272 \begin_inset space ~
3273 \end_inset
3274
3275 8 is up to date and currently maintained by Uwe Stöhr.
3276  It certainly needs a rewrite and update.
3277  For example many info in chapter
3278 \begin_inset space ~
3279 \end_inset
3280
3281 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
3282  manual.
3283 \end_layout
3284
3285 \begin_layout Description
3286 Customization.lyx this manual covers information how to customize \SpecialChar LyX
3287  for certain
3288  output formats, operating systems, languages etc.
3289  It is currently completely out of date and needs a major rewrite and update.
3290  If you do this please assure that your information are given for all OSes
3291  and \SpecialChar LaTeX
3292  distributions (meaning be as objective as possible).
3293 \end_layout
3294
3295 \begin_layout Standard
3296 There are only 4
3297 \begin_inset space ~
3298 \end_inset
3299
3300 rules in editing the docs:
3301 \end_layout
3302
3303 \begin_layout Enumerate
3304 If you are not the maintainer of a doc file or a chapter/section, you MUST
3305  use change tracking so that the maintainer could review your changes
3306 \end_layout
3307
3308 \begin_layout Enumerate
3309 Respect the formatting of the document.
3310  The different files use different formatting styles.
3311  That is OK and has historic reasons nobody fully know ;-).
3312  But it is important to be consistent within one file.
3313 \end_layout
3314
3315 \begin_layout Enumerate
3316 All changes you make to a file in one language MUST also go the file in
3317  the other actively maintained languages.
3318  Normally the maintainer does this for you, if you are the maintainer, you
3319  must do this by copying or changing the changed or added text to the other
3320  files so that the translators sees the blue underlined text and know what
3321  they have to translate and what was changed.
3322 \end_layout
3323
3324 \begin_layout Enumerate
3325 You MUST assure that the document is compilable as 
3326 \begin_inset Quotes eld
3327 \end_inset
3328
3329 PDF (pdflatex)
3330 \begin_inset Quotes erd
3331 \end_inset
3332
3333  after your changes.
3334 \end_layout
3335
3336 \end_body
3337 \end_document