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