]> git.lyx.org Git - features.git/blob - lib/doc/Development.lyx
a4a7a6a1f897989db6a3a2e379d7b1470aa29961
[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 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 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  the documentation, template, and example files trying to export them to
1328  all 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), consider running all of the export tests
1357  before and after your change.
1358  If there are differences, please reconcile these (i.e.
1359  fix the bug or fix the tests) 
1360 \emph on
1361 before
1362 \emph default
1363  committing.
1364  Ask for help if you're not sure what to do or if you do not want to run
1365  the tests, post the patch on the list and others will run the tests.
1366 \end_layout
1367
1368 \begin_layout Itemize
1369 Understand how to interpret test failures.
1370  If your commit is found to have broken a test, you should be able to interpret
1371  the test results when made aware of them.
1372  See Section 
1373 \begin_inset CommandInset ref
1374 LatexCommand ref
1375 reference "subsec:Interpreting-export-tests"
1376
1377 \end_inset
1378
1379 .
1380 \end_layout
1381
1382 \begin_layout Paragraph
1383 Configuring the tests
1384 \end_layout
1385
1386 \begin_layout Standard
1387 To enable these tests, add the 
1388 \begin_inset Flex Code
1389 status collapsed
1390
1391 \begin_layout Plain Layout
1392 -DLYX_ENABLE_EXPORT_TESTS=ON
1393 \end_layout
1394
1395 \end_inset
1396
1397  flag.
1398  For example:
1399 \end_layout
1400
1401 \begin_layout Standard
1402 \begin_inset Flex Code
1403 status collapsed
1404
1405 \begin_layout Plain Layout
1406 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1407 \end_layout
1408
1409 \end_inset
1410
1411
1412 \end_layout
1413
1414 \begin_layout Standard
1415 \noindent
1416 This flag will increase the time for the cmake command by several seconds,
1417  mainly because of the process of inverting tests (see Section 
1418 \begin_inset CommandInset ref
1419 LatexCommand ref
1420 reference "subsec:Interpreting-export-tests"
1421
1422 \end_inset
1423
1424 ).
1425 \end_layout
1426
1427 \begin_layout Paragraph
1428 Running the tests
1429 \end_layout
1430
1431 \begin_layout Standard
1432 To run all tests, in the build directory simply run the command 
1433 \begin_inset Flex Code
1434 status collapsed
1435
1436 \begin_layout Plain Layout
1437 ctest
1438 \end_layout
1439
1440 \end_inset
1441
1442 .
1443  To run only some of the tests, use the command 
1444 \begin_inset Flex Code
1445 status collapsed
1446
1447 \begin_layout Plain Layout
1448 ctest -R <pattern>
1449 \end_layout
1450
1451 \end_inset
1452
1453 , where 
1454 \begin_inset Flex Code
1455 status collapsed
1456
1457 \begin_layout Plain Layout
1458 <pattern>
1459 \end_layout
1460
1461 \end_inset
1462
1463  is a regular expression that matches test names.
1464  To run only the export tests, you can use 
1465 \begin_inset Flex Code
1466 status collapsed
1467
1468 \begin_layout Plain Layout
1469 ctest -L export
1470 \end_layout
1471
1472 \end_inset
1473
1474 .
1475  For the list of test categories available in addition to 
1476 \begin_inset Quotes eld
1477 \end_inset
1478
1479 export
1480 \begin_inset Quotes erd
1481 \end_inset
1482
1483 , run 
1484 \begin_inset Flex Code
1485 status collapsed
1486
1487 \begin_layout Plain Layout
1488 ctest \SpecialChar nobreakdash
1489 \SpecialChar nobreakdash
1490 print-labels
1491 \end_layout
1492
1493 \end_inset
1494
1495 .
1496  It is often useful to list the tests without running them (e.g.
1497  if you want to know how many tests there are or whether your 
1498 \begin_inset Flex Code
1499 status collapsed
1500
1501 \begin_layout Plain Layout
1502 <pattern>
1503 \end_layout
1504
1505 \end_inset
1506
1507  regular expression did what you expected).
1508  This can be done with the 
1509 \begin_inset Flex Code
1510 status collapsed
1511
1512 \begin_layout Plain Layout
1513 -N
1514 \end_layout
1515
1516 \end_inset
1517
1518  or 
1519 \begin_inset Flex Code
1520 status collapsed
1521
1522 \begin_layout Plain Layout
1523 \SpecialChar nobreakdash
1524 \SpecialChar nobreakdash
1525 show-only
1526 \end_layout
1527
1528 \end_inset
1529
1530  argument.
1531  We are still working on getting the tests to run in parallel which is supported
1532  by the 
1533 \begin_inset Flex Code
1534 status collapsed
1535
1536 \begin_layout Plain Layout
1537 ctest
1538 \end_layout
1539
1540 \end_inset
1541
1542  command with the 
1543 \begin_inset Flex Code
1544 status collapsed
1545
1546 \begin_layout Plain Layout
1547 -j <jobs>
1548 \end_layout
1549
1550 \end_inset
1551
1552  or 
1553 \begin_inset Flex Code
1554 status collapsed
1555
1556 \begin_layout Plain Layout
1557 \SpecialChar nobreakdash
1558 \SpecialChar nobreakdash
1559 parallel <jobs>
1560 \end_layout
1561
1562 \end_inset
1563
1564  argument.
1565  However, when running the tests in parallel, sometimes tests fail that
1566  pass when run sequentially.
1567  A reasonable approach is to first run the tests in parallel and then run
1568  the failed tests sequentially.
1569  For example, to run 8 jobs at a time:
1570 \end_layout
1571
1572 \begin_layout Standard
1573 \begin_inset Flex Code
1574 status collapsed
1575
1576 \begin_layout Plain Layout
1577 ctest -j8
1578 \end_layout
1579
1580 \end_inset
1581
1582
1583 \end_layout
1584
1585 \begin_layout Standard
1586 \begin_inset Flex Code
1587 status collapsed
1588
1589 \begin_layout Plain Layout
1590 ctest \SpecialChar nobreakdash
1591 \SpecialChar nobreakdash
1592 rerun-failed
1593 \end_layout
1594
1595 \end_inset
1596
1597
1598 \end_layout
1599
1600 \begin_layout Standard
1601 \noindent
1602 Note that some tests cannot be run in parallel.
1603  These tests are marked in the code with the 
1604 \begin_inset Flex Code
1605 status collapsed
1606
1607 \begin_layout Plain Layout
1608 \noindent
1609 RUN_SERIAL ON
1610 \end_layout
1611
1612 \end_inset
1613
1614  CMake property.
1615 \end_layout
1616
1617 \begin_layout Standard
1618 In some situations the option 
1619 \begin_inset Flex Code
1620 status collapsed
1621
1622 \begin_layout Plain Layout
1623 \SpecialChar nobreakdash
1624 \SpecialChar nobreakdash
1625 timeout <seconds>
1626 \end_layout
1627
1628 \end_inset
1629
1630  is useful.
1631  There have been bugs in LyX and in \SpecialChar LaTeX
1632  which cause compilation to hang, and
1633  without a timeout a test might never stop (in one case there was even a
1634  memory leak).
1635  If a test times out, the 
1636 \begin_inset Flex Code
1637 status collapsed
1638
1639 \begin_layout Plain Layout
1640 ctest
1641 \end_layout
1642
1643 \end_inset
1644
1645  command exits with error, but you can distinguish between a timed out test
1646  and a failed test in the output reported at the end of the 
1647 \begin_inset Flex Code
1648 status collapsed
1649
1650 \begin_layout Plain Layout
1651 ctest
1652 \end_layout
1653
1654 \end_inset
1655
1656  command.
1657 \end_layout
1658
1659 \begin_layout Standard
1660 See the manual (
1661 \begin_inset Flex Code
1662 status collapsed
1663
1664 \begin_layout Plain Layout
1665 man ctest
1666 \end_layout
1667
1668 \end_inset
1669
1670 ) the full list of command line options.
1671 \end_layout
1672
1673 \begin_layout Paragraph
1674 \begin_inset CommandInset label
1675 LatexCommand label
1676 name "subsec:Interpreting-export-tests"
1677
1678 \end_inset
1679
1680 Interpreting the export test results
1681 \end_layout
1682
1683 \begin_layout Standard
1684 A test can fail for several reasons, not all of them bad.
1685 \end_layout
1686
1687 \begin_layout Enumerate
1688 The .lyx file could have been added recently and some formats are not expected
1689  to work well.
1690 \end_layout
1691
1692 \begin_layout Enumerate
1693 A dependency is not met (e.g.
1694  the \SpecialChar LaTeX
1695  class file).
1696  One hint that this is the case is that the corresponding 
1697 \begin_inset Flex Code
1698 status collapsed
1699
1700 \begin_layout Plain Layout
1701 check_load
1702 \end_layout
1703
1704 \end_inset
1705
1706  test will likely also fail.
1707 \end_layout
1708
1709 \begin_layout Enumerate
1710 An inverted test fails to fail (i.e.
1711  export that previously failed now works).
1712 \end_layout
1713
1714 \begin_layout Enumerate
1715 An external dependency was updated (e.g.
1716  \SpecialChar TeX
1717  Live).
1718 \end_layout
1719
1720 \begin_layout Enumerate
1721 A recent code change introduced a bug.
1722 \end_layout
1723
1724 \begin_layout Enumerate
1725 \begin_inset CommandInset label
1726 LatexCommand label
1727 name "enu:exposed"
1728
1729 \end_inset
1730
1731 A change in a document exposed a previously unknown bug or an incompatibility
1732  with an export format (e.g.
1733  Lua\SpecialChar LaTeX
1734 ).
1735 \end_layout
1736
1737 \begin_layout Standard
1738 Because the .lyx files are exported in several formats, it is not surprising
1739  that many of the exports fail.
1740  This expectation of failure is addressed by 
1741 \begin_inset Quotes eld
1742 \end_inset
1743
1744 inverting
1745 \begin_inset Quotes erd
1746 \end_inset
1747
1748  the tests, that is, by marking the test as 
1749 \begin_inset Quotes eld
1750 \end_inset
1751
1752 passing
1753 \begin_inset Quotes erd
1754 \end_inset
1755
1756  if the export exits with error and as 
1757 \begin_inset Quotes eld
1758 \end_inset
1759
1760 failing
1761 \begin_inset Quotes erd
1762 \end_inset
1763
1764  if the export succeeds
1765 \emph on
1766 .
1767
1768 \emph default
1769  It follows that these expected failures will not show up as failed tests
1770  in the test results and thus will not pollute the 
1771 \begin_inset Quotes eld
1772 \end_inset
1773
1774 good
1775 \begin_inset Quotes erd
1776 \end_inset
1777
1778  tests.
1779  If the export actually succeeds, then the test will fail.
1780  The purpose of this failure is to get your attention—something has changed,
1781  possibly for the better.
1782 \end_layout
1783
1784 \begin_layout Standard
1785 We try to document why a test is inverted or ignored.
1786  See the comment (prefixed with 
1787 \begin_inset Flex Code
1788 status collapsed
1789
1790 \begin_layout Plain Layout
1791 #
1792 \end_layout
1793
1794 \end_inset
1795
1796 ) above the block in which the test is listed as inverted or ignored in
1797  the files 
1798 \begin_inset Flex Code
1799 status collapsed
1800
1801 \begin_layout Plain Layout
1802 development/autotests/suspiciousTests
1803 \end_layout
1804
1805 \end_inset
1806
1807  and 
1808 \begin_inset Flex Code
1809 status collapsed
1810
1811 \begin_layout Plain Layout
1812 development/autotests/ignoredTests
1813 \end_layout
1814
1815 \end_inset
1816
1817 .
1818  It is possible that an export goes from succeeding to failing just because
1819  the document was changed and the document was never expected to work with
1820  a certain export format in the first case.
1821  Once this is confirmed to be the situation, the test can be inverted.
1822 \end_layout
1823
1824 \begin_layout Standard
1825 A good question is why do we enable the tests for non-default formats? The
1826  answer is that if a non-default route is broken it is often because a bug
1827  was introduced in LyX and not because a document-specific change was made
1828  that is not supported by the route.
1829  In other words, there is a high signal/noise ratio in the export tests
1830  for some non-default formats.
1831  
1832 \end_layout
1833
1834 \begin_layout Standard
1835 What action should you take if a test fails? This depends:
1836 \end_layout
1837
1838 \begin_layout Standard
1839 Generally, if a change breaks compilation for the target format (for the
1840  manuals pdf2) without solving some important other issue, fix or revert
1841  the commit that led to failure.
1842  If a change breaks compilation for some non-target format (for the manuals
1843  everything except pdf2), invert the test.
1844  
1845 \end_layout
1846
1847 \begin_layout Standard
1848 A special case is given, if the export was succeeding before but showing
1849  garbled text in the PDF output.
1850  Try to establish, that when the compilation succeeded before the resulting
1851  PDF was good.
1852  Otherwise, it is in fact an improvement when a test fails.
1853  Now it might fail with a clear message of "language xyz not supported".
1854  It is always good to check manually why something fails and if it passes
1855  if the PDF output is good.
1856 \end_layout
1857
1858 \begin_layout Standard
1859 Sometimes a test is fixed as side-effect of some change.
1860  We should uninvert a test (remove it from the 
1861 \begin_inset Flex Code
1862 status collapsed
1863
1864 \begin_layout Plain Layout
1865 suspiciousTests
1866 \end_layout
1867
1868 \end_inset
1869
1870  file) in order to preserve the fix.
1871 \end_layout
1872
1873 \begin_layout Standard
1874 When a test or several tests fail, consider checking the files in the 
1875 \begin_inset Flex Code
1876 status collapsed
1877
1878 \begin_layout Plain Layout
1879 Testing/Temporary/
1880 \end_layout
1881
1882 \end_inset
1883
1884  subdirectory of your build directory.
1885  In this subdirectory are three files: the file 
1886 \begin_inset Flex Code
1887 status collapsed
1888
1889 \begin_layout Plain Layout
1890 LastTestsFailed.log
1891 \end_layout
1892
1893 \end_inset
1894
1895  simply lists the tests that failed on your last 
1896 \begin_inset Flex Code
1897 status collapsed
1898
1899 \begin_layout Plain Layout
1900 ctest
1901 \end_layout
1902
1903 \end_inset
1904
1905  command; the 
1906 \begin_inset Flex Code
1907 status collapsed
1908
1909 \begin_layout Plain Layout
1910 LastTest.log
1911 \end_layout
1912
1913 \end_inset
1914
1915  file contains the output from the tests (and often has details explaining
1916  why a test failed); and the 
1917 \begin_inset Flex Code
1918 status collapsed
1919
1920 \begin_layout Plain Layout
1921 CTestCostData.txt
1922 \end_layout
1923
1924 \end_inset
1925
1926  file lists the times that it took to run the tests.
1927 \end_layout
1928
1929 \begin_layout Paragraph
1930 Inverted tests
1931 \end_layout
1932
1933 \begin_layout Standard
1934 These tests are expected to always fail.
1935 \end_layout
1936
1937 \begin_layout Description
1938 inverted These tests are expected to fail, but are subject to be examined.
1939  It is expected that they will pass in a foreseeable future.
1940  They are labeled 'inverted'.
1941 \end_layout
1942
1943 \begin_layout Description
1944 suspended Some inverted tests are labeled 'suspended'.
1945  This means, they are not executed using 
1946 \begin_inset Flex Code
1947 status collapsed
1948
1949 \begin_layout Plain Layout
1950 ctest -L export
1951 \end_layout
1952
1953 \end_inset
1954
1955  or 
1956 \begin_inset Flex Code
1957 status collapsed
1958
1959 \begin_layout Plain Layout
1960 ctest -L inverted
1961 \end_layout
1962
1963 \end_inset
1964
1965 .
1966  From time to time they still have to be checked using 
1967 \begin_inset Flex Code
1968 status collapsed
1969
1970 \begin_layout Plain Layout
1971 ctest -L suspended
1972 \end_layout
1973
1974 \end_inset
1975
1976 .
1977 \end_layout
1978
1979 \begin_deeper
1980 \begin_layout Standard
1981 These tests are suspended, because they fail for known reasons which cannot
1982  ATM be resolved.
1983  But it is expected the reason might disappear in the future.
1984  Be it new TL or better handling in \SpecialChar LyX
1985 .
1986 \end_layout
1987
1988 \begin_layout Standard
1989 For ctest commands without the 
1990 \begin_inset Flex Code
1991 status collapsed
1992
1993 \begin_layout Plain Layout
1994 -L
1995 \end_layout
1996
1997 \end_inset
1998
1999  parameter nothing changes.
2000  Suspended or not, tests will be executed depending only on the regexes
2001  parameters given to the ctest command.
2002 \end_layout
2003
2004 \end_deeper
2005 \begin_layout Paragraph
2006 Unreliable tests
2007 \end_layout
2008
2009 \begin_layout Description
2010 nonstandard Requires non-standard ressources (\SpecialChar LaTeX
2011  packages and document classes,
2012  fonts, ...) that are not a requirement for running this test suite.
2013 \end_layout
2014
2015 \begin_deeper
2016 \begin_layout Standard
2017 These tests are labeled as 
2018 \family typewriter
2019 'nonstandard'.
2020 \end_layout
2021
2022 \end_deeper
2023 \begin_layout Description
2024 erratic Tests with 
2025 \begin_inset Quotes eld
2026 \end_inset
2027
2028 arbitrary
2029 \begin_inset Quotes erd
2030 \end_inset
2031
2032  result, depending on local configuration, OS, \SpecialChar TeX
2033  distribution, package versions,
2034  or the phase of the moon.
2035 \end_layout
2036
2037 \begin_deeper
2038 \begin_layout Standard
2039 These tests are labeled as 
2040 \family typewriter
2041 'erratic'.
2042 \end_layout
2043
2044 \end_deeper
2045 \begin_layout Paragraph
2046 Export test filtering
2047 \end_layout
2048
2049 \begin_layout Standard
2050 There are files which control the assignment of a label to a test.
2051 \end_layout
2052
2053 \begin_layout Description
2054 ignoredTests (small file)
2055 \begin_inset Newline newline
2056 \end_inset
2057
2058 Tests selected here are withdrawn
2059 \end_layout
2060
2061 \begin_deeper
2062 \begin_layout Labeling
2063 \labelwidthstring 00.00.0000
2064 Input Test of any export combination
2065 \end_layout
2066
2067 \begin_layout Labeling
2068 \labelwidthstring 00.00.0000
2069 Output Stop if tests not selected here
2070 \end_layout
2071
2072 \end_deeper
2073 \begin_layout Description
2074 unreliableTests: Tests selected either pass or fail, but that is dependent
2075  on the system where the test is run.
2076  Selected tests gain the label 'unreliable'.
2077 \end_layout
2078
2079 \begin_deeper
2080 \begin_layout Labeling
2081 \labelwidthstring 00.00.0000
2082 Input Each test which passed 'ignoredTests'
2083 \end_layout
2084
2085 \begin_layout Labeling
2086 \labelwidthstring 00.00.0000
2087 Output Stop if test selected, gain label 'unreliable'.
2088 \end_layout
2089
2090 \end_deeper
2091 \begin_layout Description
2092 suspiciousTests 
2093 \begin_inset space \space{}
2094 \end_inset
2095
2096
2097 \end_layout
2098
2099 \begin_deeper
2100 \begin_layout Labeling
2101 \labelwidthstring 00.00.0000
2102 Input Each test which passed 'unreliableTests'
2103 \end_layout
2104
2105 \begin_layout Labeling
2106 \labelwidthstring 00.00.0000
2107 Output Stop if not selected.
2108 \end_layout
2109
2110 \begin_layout Standard
2111 The following file is meant as subselections of 'suspiciousTests'.
2112  If neither subselection applies, test gains labels 'export' and 'inverted'
2113 \end_layout
2114
2115 \begin_layout Description
2116 suspendedTests Tests selected here gain the label 'suspended' but _not_
2117  'export' or 'inverted', although in ctest they remain inverted.
2118  ('ctest' knows only 'inverted' or not, labels are used only for test selection)
2119 \end_layout
2120
2121 \begin_deeper
2122 \begin_layout Labeling
2123 \labelwidthstring 00.00.0000
2124 Input Each test selected by 'suspiciousTests' 
2125 \end_layout
2126
2127 \begin_layout Labeling
2128 \labelwidthstring 00.00.0000
2129 Output Selected test gains label 'suspended'.
2130  
2131 \end_layout
2132
2133 \end_deeper
2134 \end_deeper
2135 \begin_layout Standard
2136 The following table may clarify label assignement
2137 \end_layout
2138
2139 \begin_layout Standard
2140 \begin_inset Tabular
2141 <lyxtabular version="3" rows="7" columns="12">
2142 <features tabularvalignment="middle">
2143 <column alignment="left" valignment="top" width="0pt">
2144 <column alignment="left" valignment="top" width="0pt">
2145 <column alignment="left" valignment="top" width="0pt">
2146 <column alignment="left" valignment="top" width="0pt">
2147 <column alignment="center" valignment="top">
2148 <column alignment="center" valignment="top">
2149 <column alignment="center" valignment="top">
2150 <column alignment="center" valignment="top">
2151 <column alignment="center" valignment="top">
2152 <column alignment="center" valignment="top">
2153 <column alignment="center" valignment="top">
2154 <column alignment="center" valignment="top">
2155 <row>
2156 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2157 \begin_inset Text
2158
2159 \begin_layout Plain Layout
2160 Test found in file:
2161 \end_layout
2162
2163 \end_inset
2164 </cell>
2165 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2166 \begin_inset Text
2167
2168 \begin_layout Plain Layout
2169
2170 \end_layout
2171
2172 \end_inset
2173 </cell>
2174 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2175 \begin_inset Text
2176
2177 \begin_layout Plain Layout
2178
2179 \end_layout
2180
2181 \end_inset
2182 </cell>
2183 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2184 \begin_inset Text
2185
2186 \begin_layout Plain Layout
2187
2188 \end_layout
2189
2190 \end_inset
2191 </cell>
2192 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2193 \begin_inset Text
2194
2195 \begin_layout Plain Layout
2196 Marked in ctest, Assigned label
2197 \end_layout
2198
2199 \end_inset
2200 </cell>
2201 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
2202 \begin_inset Text
2203
2204 \begin_layout Plain Layout
2205
2206 \end_layout
2207
2208 \end_inset
2209 </cell>
2210 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2211 \begin_inset Text
2212
2213 \begin_layout Plain Layout
2214
2215 \end_layout
2216
2217 \end_inset
2218 </cell>
2219 <cell multicolumn="2" alignment="center" 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="center" 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="center" 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="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2247 \begin_inset Text
2248
2249 \begin_layout Plain Layout
2250
2251 \end_layout
2252
2253 \end_inset
2254 </cell>
2255 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2256 \begin_inset Text
2257
2258 \begin_layout Plain Layout
2259
2260 \end_layout
2261
2262 \end_inset
2263 </cell>
2264 </row>
2265 <row>
2266 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2267 \begin_inset Text
2268
2269 \begin_layout Plain Layout
2270 Ignored
2271 \end_layout
2272
2273 \end_inset
2274 </cell>
2275 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2276 \begin_inset Text
2277
2278 \begin_layout Plain Layout
2279 Unreliable
2280 \end_layout
2281
2282 \end_inset
2283 </cell>
2284 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2285 \begin_inset Text
2286
2287 \begin_layout Plain Layout
2288 Suspicious
2289 \end_layout
2290
2291 \end_inset
2292 </cell>
2293 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2294 \begin_inset Text
2295
2296 \begin_layout Plain Layout
2297 Suspended
2298 \end_layout
2299
2300 \end_inset
2301 </cell>
2302 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2303 \begin_inset Text
2304
2305 \begin_layout Plain Layout
2306 export
2307 \end_layout
2308
2309 \end_inset
2310 </cell>
2311 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2312 \begin_inset Text
2313
2314 \begin_layout Plain Layout
2315
2316 \end_layout
2317
2318 \end_inset
2319 </cell>
2320 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2321 \begin_inset Text
2322
2323 \begin_layout Plain Layout
2324 unreliable
2325 \end_layout
2326
2327 \end_inset
2328 </cell>
2329 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2330 \begin_inset Text
2331
2332 \begin_layout Plain Layout
2333
2334 \end_layout
2335
2336 \end_inset
2337 </cell>
2338 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2339 \begin_inset Text
2340
2341 \begin_layout Plain Layout
2342 inverted
2343 \end_layout
2344
2345 \end_inset
2346 </cell>
2347 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
2348 \begin_inset Text
2349
2350 \begin_layout Plain Layout
2351
2352 \end_layout
2353
2354 \end_inset
2355 </cell>
2356 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2357 \begin_inset Text
2358
2359 \begin_layout Plain Layout
2360 suspended
2361 \end_layout
2362
2363 \end_inset
2364 </cell>
2365 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
2366 \begin_inset Text
2367
2368 \begin_layout Plain Layout
2369
2370 \end_layout
2371
2372 \end_inset
2373 </cell>
2374 </row>
2375 <row>
2376 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2377 \begin_inset Text
2378
2379 \begin_layout Plain Layout
2380 Yes
2381 \end_layout
2382
2383 \end_inset
2384 </cell>
2385 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2386 \begin_inset Text
2387
2388 \begin_layout Plain Layout
2389 -
2390 \end_layout
2391
2392 \end_inset
2393 </cell>
2394 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2395 \begin_inset Text
2396
2397 \begin_layout Plain Layout
2398 -
2399 \end_layout
2400
2401 \end_inset
2402 </cell>
2403 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2404 \begin_inset Text
2405
2406 \begin_layout Plain Layout
2407 -
2408 \end_layout
2409
2410 \end_inset
2411 </cell>
2412 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2413 \begin_inset Text
2414
2415 \begin_layout Plain Layout
2416 -
2417 \end_layout
2418
2419 \end_inset
2420 </cell>
2421 <cell alignment="center" valignment="top" topline="true" usebox="none">
2422 \begin_inset Text
2423
2424 \begin_layout Plain Layout
2425 -
2426 \end_layout
2427
2428 \end_inset
2429 </cell>
2430 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2431 \begin_inset Text
2432
2433 \begin_layout Plain Layout
2434 -
2435 \end_layout
2436
2437 \end_inset
2438 </cell>
2439 <cell alignment="center" valignment="top" topline="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="center" valignment="top" topline="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="center" valignment="top" topline="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" rightline="true" usebox="none">
2476 \begin_inset Text
2477
2478 \begin_layout Plain Layout
2479 -
2480 \end_layout
2481
2482 \end_inset
2483 </cell>
2484 </row>
2485 <row>
2486 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2487 \begin_inset Text
2488
2489 \begin_layout Plain Layout
2490 No
2491 \end_layout
2492
2493 \end_inset
2494 </cell>
2495 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2496 \begin_inset Text
2497
2498 \begin_layout Plain Layout
2499 Yes
2500 \end_layout
2501
2502 \end_inset
2503 </cell>
2504 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2505 \begin_inset Text
2506
2507 \begin_layout Plain Layout
2508 -
2509 \end_layout
2510
2511 \end_inset
2512 </cell>
2513 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2514 \begin_inset Text
2515
2516 \begin_layout Plain Layout
2517 -
2518 \end_layout
2519
2520 \end_inset
2521 </cell>
2522 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2523 \begin_inset Text
2524
2525 \begin_layout Plain Layout
2526 -
2527 \end_layout
2528
2529 \end_inset
2530 </cell>
2531 <cell alignment="center" valignment="top" topline="true" usebox="none">
2532 \begin_inset Text
2533
2534 \begin_layout Plain Layout
2535 -
2536 \end_layout
2537
2538 \end_inset
2539 </cell>
2540 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2541 \begin_inset Text
2542
2543 \begin_layout Plain Layout
2544 -
2545 \end_layout
2546
2547 \end_inset
2548 </cell>
2549 <cell alignment="center" valignment="top" topline="true" usebox="none">
2550 \begin_inset Text
2551
2552 \begin_layout Plain Layout
2553 +
2554 \end_layout
2555
2556 \end_inset
2557 </cell>
2558 <cell alignment="center" valignment="top" topline="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="center" valignment="top" topline="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" rightline="true" usebox="none">
2586 \begin_inset Text
2587
2588 \begin_layout Plain Layout
2589 -
2590 \end_layout
2591
2592 \end_inset
2593 </cell>
2594 </row>
2595 <row>
2596 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
2597 \begin_inset Text
2598
2599 \begin_layout Plain Layout
2600
2601 \end_layout
2602
2603 \end_inset
2604 </cell>
2605 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2606 \begin_inset Text
2607
2608 \begin_layout Plain Layout
2609 No
2610 \end_layout
2611
2612 \end_inset
2613 </cell>
2614 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
2615 \begin_inset Text
2616
2617 \begin_layout Plain Layout
2618 Yes
2619 \end_layout
2620
2621 \end_inset
2622 </cell>
2623 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2624 \begin_inset Text
2625
2626 \begin_layout Plain Layout
2627 Yes
2628 \end_layout
2629
2630 \end_inset
2631 </cell>
2632 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2633 \begin_inset Text
2634
2635 \begin_layout Plain Layout
2636 -
2637 \end_layout
2638
2639 \end_inset
2640 </cell>
2641 <cell alignment="center" valignment="top" topline="true" usebox="none">
2642 \begin_inset Text
2643
2644 \begin_layout Plain Layout
2645 -
2646 \end_layout
2647
2648 \end_inset
2649 </cell>
2650 <cell alignment="center" valignment="top" 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 alignment="center" valignment="top" topline="true" usebox="none">
2660 \begin_inset Text
2661
2662 \begin_layout Plain Layout
2663 -
2664 \end_layout
2665
2666 \end_inset
2667 </cell>
2668 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2669 \begin_inset Text
2670
2671 \begin_layout Plain Layout
2672 +
2673 \end_layout
2674
2675 \end_inset
2676 </cell>
2677 <cell alignment="center" valignment="top" topline="true" usebox="none">
2678 \begin_inset Text
2679
2680 \begin_layout Plain Layout
2681 -
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" rightline="true" usebox="none">
2696 \begin_inset Text
2697
2698 \begin_layout Plain Layout
2699 +
2700 \end_layout
2701
2702 \end_inset
2703 </cell>
2704 </row>
2705 <row>
2706 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2707 \begin_inset Text
2708
2709 \begin_layout Plain Layout
2710
2711 \end_layout
2712
2713 \end_inset
2714 </cell>
2715 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2716 \begin_inset Text
2717
2718 \begin_layout Plain Layout
2719
2720 \end_layout
2721
2722 \end_inset
2723 </cell>
2724 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2725 \begin_inset Text
2726
2727 \begin_layout Plain Layout
2728
2729 \end_layout
2730
2731 \end_inset
2732 </cell>
2733 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2734 \begin_inset Text
2735
2736 \begin_layout Plain Layout
2737 No
2738 \end_layout
2739
2740 \end_inset
2741 </cell>
2742 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2743 \begin_inset Text
2744
2745 \begin_layout Plain Layout
2746 -
2747 \end_layout
2748
2749 \end_inset
2750 </cell>
2751 <cell alignment="center" valignment="top" topline="true" usebox="none">
2752 \begin_inset Text
2753
2754 \begin_layout Plain Layout
2755 +
2756 \end_layout
2757
2758 \end_inset
2759 </cell>
2760 <cell alignment="center" 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 alignment="center" valignment="top" topline="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 alignment="center" valignment="top" topline="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="center" valignment="top" topline="true" usebox="none">
2788 \begin_inset Text
2789
2790 \begin_layout Plain Layout
2791 +
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" rightline="true" usebox="none">
2806 \begin_inset Text
2807
2808 \begin_layout Plain Layout
2809 -
2810 \end_layout
2811
2812 \end_inset
2813 </cell>
2814 </row>
2815 <row>
2816 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2817 \begin_inset Text
2818
2819 \begin_layout Plain Layout
2820
2821 \end_layout
2822
2823 \end_inset
2824 </cell>
2825 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2826 \begin_inset Text
2827
2828 \begin_layout Plain Layout
2829
2830 \end_layout
2831
2832 \end_inset
2833 </cell>
2834 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2835 \begin_inset Text
2836
2837 \begin_layout Plain Layout
2838 No
2839 \end_layout
2840
2841 \end_inset
2842 </cell>
2843 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2844 \begin_inset Text
2845
2846 \begin_layout Plain Layout
2847 -
2848 \end_layout
2849
2850 \end_inset
2851 </cell>
2852 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2853 \begin_inset Text
2854
2855 \begin_layout Plain Layout
2856 -
2857 \end_layout
2858
2859 \end_inset
2860 </cell>
2861 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
2862 \begin_inset Text
2863
2864 \begin_layout Plain Layout
2865 +
2866 \end_layout
2867
2868 \end_inset
2869 </cell>
2870 <cell alignment="center" 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 alignment="center" valignment="top" topline="true" bottomline="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="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2889 \begin_inset Text
2890
2891 \begin_layout Plain Layout
2892 -
2893 \end_layout
2894
2895 \end_inset
2896 </cell>
2897 <cell alignment="center" valignment="top" topline="true" bottomline="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" rightline="true" usebox="none">
2916 \begin_inset Text
2917
2918 \begin_layout Plain Layout
2919 -
2920 \end_layout
2921
2922 \end_inset
2923 </cell>
2924 </row>
2925 </lyxtabular>
2926
2927 \end_inset
2928
2929
2930 \end_layout
2931
2932 \begin_layout Subsubsection
2933 check_load tests
2934 \end_layout
2935
2936 \begin_layout Standard
2937 These tests check whether a .lyx file loads without any terminal messages.
2938  They correspond to the manual operations of simply opening a .lyx file on
2939  the terminal, exiting LyX once the file is loaded, and then checking whether
2940  there is any output from the terminal.
2941  These tests are useful for catching malformed .lyx files and parsing bugs.
2942  They can also be used to find a .lyx file in which an instance of something
2943  happens.
2944  To do this, compile LyX with a local patch that outputs something to the
2945  terminal when an instance is found, and then run the check_load tests to
2946  see if any fail, which would mean that the situation occurs in the LyX
2947  documentation files corresponding to the failed tests.
2948  These tests are expectedly fragile: any LyX diagnostic message, which is
2949  not necessarily an error, would cause the tests to fail.
2950  Similarly, any message output by a library (e.g.
2951  Qt) would also cause failure.
2952  There are some messages that the check_load tests are instructed to ignore,
2953  which are stored in the file 
2954 \begin_inset Flex Code
2955 status collapsed
2956
2957 \begin_layout Plain Layout
2958 development/autotests/filterCheckWarnings
2959 \end_layout
2960
2961 \end_inset
2962
2963 .
2964 \end_layout
2965
2966 \begin_layout Standard
2967 Under cmake, the tests are labeled as 'load'.
2968 \end_layout
2969
2970 \begin_layout Subsubsection
2971 URL tests
2972 \end_layout
2973
2974 \begin_layout Standard
2975 The URL tests are enabled with the 
2976 \begin_inset Flex Code
2977 status collapsed
2978
2979 \begin_layout Plain Layout
2980 -DLYX_ENABLE_URLTESTS=ON
2981 \end_layout
2982
2983 \end_inset
2984
2985  CMake flag and are useful for finding broken links in our documentation
2986  files.
2987  If a URL test fails, to see which link in particular was reported as broken,
2988  see the output in 
2989 \begin_inset Flex Code
2990 status collapsed
2991
2992 \begin_layout Plain Layout
2993 LastTest.log
2994 \end_layout
2995
2996 \end_inset
2997
2998 .
2999  These tests are extremely fragile (e.g.
3000  a test can depend on your Internet connection) and a failed URL test should
3001  not be taken too seriously.
3002  URL tests are labeled as 
3003 \family typewriter
3004 'url'.
3005 \end_layout
3006
3007 \begin_layout Paragraph
3008 Running URL tests
3009 \end_layout
3010
3011 \begin_layout Standard
3012 cmake is required to run the \SpecialChar LyX
3013  tests, running them is not implemented for
3014  autotools.
3015 \end_layout
3016
3017 \begin_layout Standard
3018 The appropriate commands are:
3019 \end_layout
3020
3021 \begin_layout Itemize
3022
3023 \family typewriter
3024 ctest -L url
3025 \family default
3026
3027 \begin_inset Newline newline
3028 \end_inset
3029
3030 runns all tests with label 
3031 \family typewriter
3032 'url'
3033 \end_layout
3034
3035 \begin_layout Itemize
3036
3037 \family typewriter
3038 ctest -R 'check_.*urls'
3039 \family default
3040
3041 \begin_inset Newline newline
3042 \end_inset
3043
3044 runns the tests 'check_accessible_urls'
3045 \end_layout
3046
3047 \begin_layout Standard
3048 Associated test results can be examined in ctest-log directory in files
3049  of the form 'LastFailed.*URLS.log'
3050 \end_layout
3051
3052 \begin_layout Subsubsection
3053 Test labels
3054 \end_layout
3055
3056 \begin_layout Standard
3057 ctest label commands:
3058 \end_layout
3059
3060 \begin_layout Description
3061 \SpecialChar nobreakdash
3062 \SpecialChar nobreakdash
3063 print-labels shows all assigned labels
3064 \end_layout
3065
3066 \begin_layout Description
3067 \SpecialChar nobreakdash
3068 L
3069 \begin_inset space ~
3070 \end_inset
3071
3072 labelname executes all tests to which this label is assigned to.
3073  A test may have more that one label.
3074 \end_layout
3075
3076 \begin_layout Description
3077 \SpecialChar nobreakdash
3078 j
3079 \begin_inset space ~
3080 \end_inset
3081
3082 number executes tests in parallel using 'number' simultaneously processes.
3083  Some tests are marked as 'sequencial', for them this parameter has no effect.
3084 \end_layout
3085
3086 \begin_layout Section
3087 Development policies
3088 \end_layout
3089
3090 \begin_layout Standard
3091 This chapter lists some guidelines that should be followed.
3092  This list is not complete, and many guidelines are in separate chapters,
3093  such as 
3094 \begin_inset Quotes eld
3095 \end_inset
3096
3097 When is an update of the .lyx file format number needed?
3098 \begin_inset Quotes erd
3099 \end_inset
3100
3101  in Section 
3102 \begin_inset CommandInset ref
3103 LatexCommand ref
3104 reference "sec:When-is-an"
3105
3106 \end_inset
3107
3108 .
3109 \end_layout
3110
3111 \begin_layout Subsection
3112 When to set a fixed milestone?
3113 \end_layout
3114
3115 \begin_layout Standard
3116 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
3117  holds:
3118 \end_layout
3119
3120 \begin_layout Enumerate
3121 Somebody is actively working on a fix.
3122 \end_layout
3123
3124 \begin_layout Enumerate
3125 The bug is so severe that it would block the release if it is not fixed.
3126 \end_layout
3127
3128 \begin_layout Standard
3129 If a bug is important, but nobody is working on it, and it is no showstopper,
3130  use a milestone like 2.1.x or 2.2.x.
3131  For all other bugs, do not set a milestone at all.
3132 \end_layout
3133
3134 \begin_layout Subsection
3135 Can we add rc entries in stable branch?
3136 \end_layout
3137
3138 \begin_layout Standard
3139 No.
3140  We are supposed to increase the prefs2prefs version number with such things.
3141 \end_layout
3142
3143 \begin_layout Section
3144 Documentation policies
3145 \end_layout
3146
3147 \begin_layout Standard
3148 The main documentation consists of these files:
3149 \end_layout
3150
3151 \begin_layout Description
3152 splash.lyx it is the first file you see after an installation.
3153  We assume that a new user sees this.
3154  It is therefore designed to be as simple as possible.
3155  Therefore please don't add any new formatting, only fix typos etc.
3156  Splash.lyx is up to date for \SpecialChar LyX
3157  2.1.x, currently maintained by Uwe Stöhr.
3158 \end_layout
3159
3160 \begin_layout Description
3161 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
3162 .
3163  It therefore uses a limited set of formatting.
3164  For example a standard document class.
3165  Since new users will first learn about the formatting possibilities of
3166  \SpecialChar LyX
3167  please keep this file that simple.
3168  Intro.lyx is up to date for \SpecialChar LyX
3169  2.1.x, currently maintained by Uwe Stöhr.
3170 \end_layout
3171
3172 \begin_layout Description
3173 Tutorial.lyx our tutorial.
3174  It must be always up to date.
3175  Normally there is nothing to add since we don't want to overwhelm new users
3176  with too much details.
3177  The will learn these details while using \SpecialChar LyX
3178  and we have special manuals.
3179  Tutorial.lyx is up to date for \SpecialChar LyX
3180  2.1.x, currently maintained by Uwe Stöhr.
3181 \end_layout
3182
3183 \begin_layout Description
3184 UserGuide.lyx our main user guide.
3185  It covers a mixture of basic and detailed information.
3186  Some information is also in the Math and EmbeddedObjects manual so that
3187  the UserGuide refers to these files.
3188  UserGuide.lyx is up to date for \SpecialChar LyX
3189  2.1.x, currently maintained by Uwe Stöhr.
3190 \end_layout
3191
3192 \begin_layout Description
3193 EmbeddedObjects.lyx a special manual to explain things like tables floats
3194  boxes etc.
3195  in all detail.
3196  EmbeddedObjects.lyx is up to date for \SpecialChar LyX
3197  2.1.x, currently maintained by Uwe
3198  Stöhr.
3199 \end_layout
3200
3201 \begin_layout Description
3202 Math.lyx a special manual to explain everything regarding math in all detail.
3203  Math.lyx is up to date for \SpecialChar LyX
3204  2.1.x, currently maintained by Uwe Stöhr.
3205 \end_layout
3206
3207 \begin_layout Description
3208 Additional.lyx this manual covers information that would be too much detail
3209  for the UserGuide or would make the UserGuide uncompilable or only compilable
3210  when installing a lot of special \SpecialChar LaTeX
3211 -packages.
3212  What should be in the UserGuide or better in Additional is a matter of
3213  taste.
3214  it is up to you to decide that.
3215  Additional.lyx is not completely up to date for \SpecialChar LyX
3216  2.1.x.
3217  Only chapter
3218 \begin_inset space ~
3219 \end_inset
3220
3221 8 is up to date and currently maintained by Uwe Stöhr.
3222  It certainly needs a rewrite and update.
3223  For example many info in chapter
3224 \begin_inset space ~
3225 \end_inset
3226
3227 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
3228  manual.
3229 \end_layout
3230
3231 \begin_layout Description
3232 Customization.lyx this manual covers information how to customize \SpecialChar LyX
3233  for certain
3234  output formats, operating systems, languages etc.
3235  It is currently completely out of date and needs a major rewrite and update.
3236  If you do this please assure that your information are given for all OSes
3237  and \SpecialChar LaTeX
3238  distributions (meaning be as objective as possible).
3239 \end_layout
3240
3241 \begin_layout Standard
3242 There are only 4
3243 \begin_inset space ~
3244 \end_inset
3245
3246 rules in editing the docs:
3247 \end_layout
3248
3249 \begin_layout Enumerate
3250 If you are not the maintainer of a doc file or a chapter/section, you MUST
3251  use change tracking so that the maintainer could review your changes
3252 \end_layout
3253
3254 \begin_layout Enumerate
3255 Respect the formatting of the document.
3256  The different files use different formatting styles.
3257  That is OK and has historic reasons nobody fully know ;-).
3258  But it is important to be consistent within one file.
3259 \end_layout
3260
3261 \begin_layout Enumerate
3262 All changes you make to a file in one language MUST also go the file in
3263  the other actively maintained languages.
3264  Normally the maintainer does this for you, if you are the maintainer, you
3265  must do this by copying or changing the changed or added text to the other
3266  files so that the translators sees the blue underlined text and know what
3267  they have to translate and what was changed.
3268 \end_layout
3269
3270 \begin_layout Enumerate
3271 You MUST assure that the document is compilable as 
3272 \begin_inset Quotes eld
3273 \end_inset
3274
3275 PDF (pdflatex)
3276 \begin_inset Quotes erd
3277 \end_inset
3278
3279  after your changes.
3280 \end_layout
3281
3282 \end_body
3283 \end_document