]> git.lyx.org Git - lyx.git/blob - development/autotests/ExportTests.cmake
Cmake tests: Save the number of ignored tests in file for later review
[lyx.git] / development / autotests / ExportTests.cmake
1 #
2 #  Copyright (c) 2014 Kornel Benko <kornel@lyx.org>
3 #  Copyright (c) 2014 Scott Kostyshak <skotysh@lyx.org>
4 #
5 #  Redistribution and use in source and binary forms, with or without
6 #  modification, are permitted provided that the following conditions
7 #  are met:
8 #
9 #  1. Redistributions of source code must retain the copyright
10 #         notice, this list of conditions and the following disclaimer.
11 #  2. Redistributions in binary form must reproduce the copyright
12 #         notice, this list of conditions and the following disclaimer in the
13 #         documentation and/or other materials provided with the distribution.
14 #  3. The name of the author may not be used to endorse or promote products
15 #         derived from this software without specific prior written permission.
16 #
17 #  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 #  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 #  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 #  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 #  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 #  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 #  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 #  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 #
28
29 find_package(Perl)
30 find_program(XMLLINT_EXECUTABLE xmllint)
31 find_program(JAVA_EXECUTABLE java)
32 set(jingjava)
33 if (JAVA_EXECUTABLE)
34   if (EXISTS "${TOP_SRC_DIR}/development/tools/jing.jar")
35     set(jingjava ${JAVA_EXECUTABLE})
36   endif()
37 endif()
38
39 if(PERL_FOUND)
40   set(DVI_FORMATS "dvi" "dvi3")
41   set(PDF_FORMATS "pdf" "pdf2" "pdf3" "pdf4" "pdf5")
42 else()
43   set(DVI_FORMATS "dvi")
44   set(PDF_FORMATS "pdf" "pdf2" "pdf3")
45 endif()
46
47 set(potential_languages "ca" "cs" "da" "de" "el" "es" "eu" "fa" "fr" "gl" "he" "hu" "id" "it" "ja" "ko" "nb" "nl" "pl" "pt" "ro" "ru" "sk" "sl" "sr" "sv" "uk" "zh_CN")
48
49 # Used to select labels from .*Tests files
50 set(label_chars "[a-zA-Z:_]+")
51
52 macro(initLangVars varname)
53   foreach(_l ${potential_languages})
54     set(${varname}_${_l})
55   endforeach()
56 endmacro()
57
58 macro(getoutputformats filepath varname format_set)
59   file(STRINGS "${filepath}" lines)
60   # What should we test, if default_output_format is not defined?
61   # For now we test everything ...
62   set(out_formats "xhtml" "docbook5" ${DVI_FORMATS} ${PDF_FORMATS})
63   foreach(_l IN LISTS lines)
64     if(_l MATCHES "^\\\\default_output_format +\([^ ]+\)")
65       set(_format ${CMAKE_MATCH_1})
66       if(_format STREQUAL "default")
67         set(out_formats "xhtml" "docbook5" ${DVI_FORMATS} ${PDF_FORMATS})
68       else()
69         set(${format_set} ${_format})
70         if(_format STREQUAL "pdf2" AND "${filepath}" MATCHES "/doc/")
71           set(out_formats "xhtml" "docbook5" ${DVI_FORMATS} ${PDF_FORMATS})
72         elseif(_format MATCHES "pdf$")
73           set(out_formats "xhtml" "docbook5" ${PDF_FORMATS})
74         elseif(_format MATCHES "dvi$")
75           set(out_formats "xhtml" "docbook5" ${DVI_FORMATS})
76         elseif(_format MATCHES "docbook5")
77           set(out_formats "docbook5")
78         elseif(_format MATCHES "xhtml")
79           set(out_formats "xhtml")
80         else()
81           # Respect all other output formats
82           # like "eps3"
83           set(out_formats "xhtml" ${_format})
84         endif()
85       endif()
86       break()
87     endif()
88   endforeach()
89   set(${varname} ${out_formats})
90 endmacro()
91
92 macro(findexpr found testname listname rsublabel)
93   set(_found 0)
94   set(tmpsublabel "")
95   foreach(_itrx ${${listname}})
96     if ("${_itrx}" MATCHES "^Sublabel:")
97       set(tmpsublabel "")
98       string(REGEX REPLACE "^Sublabel:[ \t]*" "" _itrlabels ${_itrx})
99       string(REGEX MATCHALL ${label_chars} _labels ${_itrlabels})
100       foreach(subl ${_labels})
101         if (subl STREQUAL "RESET")
102           set(tmpsublabel "")
103         else()
104           list(APPEND tmpsublabel ${subl})
105         endif()
106       endforeach()
107       # remove doubles in sublabel
108       list(REMOVE_DUPLICATES tmpsublabel)
109     else()
110       if (_itrx MATCHES "^!\(.*\)$")
111         set(_itr "^${CMAKE_MATCH_1}$")
112         set(_foundval 0)
113       else()
114         set(_itr "^${_itrx}$")
115         set(_foundval 1)
116       endif()
117       if (${testname} MATCHES "${_itr}")
118         set(_found ${_foundval})
119         break()
120       endif()
121     endif()
122   endforeach()
123   if (${_found})
124     if (NOT "${tmpsublabel}" STREQUAL "")
125       list(APPEND ${rsublabel} ${tmpsublabel})
126     endif()
127   endif()
128   set(${found} ${_found})
129 endmacro()
130
131 function(join rvalues glue routput)
132   set(locallist ${${rvalues}})
133   set(removelist "export" "lyx2lyx" "load")
134   foreach(_l ${locallist})
135     if (depth_${_l} LESS 0)
136       list(APPEND removelist ${_l})
137     endif()
138   endforeach()
139   list(REMOVE_ITEM locallist ${removelist})
140   string(REGEX REPLACE "([^\\]|^);" "\\1${glue}" out "${locallist}")
141   set(${routput} ${out} PARENT_SCOPE)
142 endfunction()
143
144 macro(maketestname testname inverted listinverted listignored listunreliable listlabels)
145   # initialize output variable
146   set(${inverted} 0)
147   string(REGEX MATCH "\\/[a-z][a-z](_[A-Z][A-Z])?\\/" _v ${${testname}})
148   if(_v)
149     string(REGEX REPLACE "\\/" "" _v ${_v})
150     set(listinvertedx ${listinverted}_${_v})
151     set(listignoredx ${listignored}_${_v})
152     set(listunreliablex ${listunreliable}_${_v})
153     set(listsuspendedx suspendedTests_${_v})
154   else()
155     set(listinvertedx ${listinverted})
156     set(listignoredx ${listignored})
157     set(listunreliablex ${listunreliable})
158     set(listsuspendedx suspendedTests)
159   endif()
160   set(sublabel "${${listlabels}}")
161   findexpr(mfound ${testname} ${listignoredx} sublabel)
162   if (mfound)
163     MATH(EXPR lyx_ignored_count "${lyx_ignored_count}+1")
164     # No testname because ignored
165     set(${testname} "")
166   else()
167     set(sublabel2 "")
168     findexpr(foundunreliable ${testname} ${listunreliablex} sublabel2)
169     if (foundunreliable)
170       set(sublabel "unreliable" ${sublabel} ${sublabel2})
171       list(REMOVE_ITEM sublabel "export" "inverted" "templates" "tabletemplates" "mathmacros" "manuals" "autotests")
172     endif()
173     string(REGEX MATCH "(^check_load|_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx[0-9][0-9]|xhtml)$)" _v ${${testname}})
174     # check if test _may_ be in listinverted
175     set(sublabel2 "")
176     findexpr(mfound ${testname} ${listinvertedx} sublabel2)
177     if (mfound)
178       set(sublabel3 "")
179       findexpr(foundsuspended ${testname} ${listsuspendedx} sublabel3)
180       set(${inverted} 1)
181       if (foundsuspended)
182         set(sublabel "suspended" ${sublabel} ${sublabel2} ${sublabel3})
183         list(REMOVE_ITEM sublabel "export" "inverted" )
184       else()
185         set(sublabel "inverted" ${sublabel} ${sublabel2} ${sublabel3})
186       endif()
187     else()
188       set(${inverted} 0)
189     endif()
190     list(REMOVE_DUPLICATES sublabel)
191     if (NOT sublabel STREQUAL "")
192       join(sublabel "." tmpprefixx)
193       if (tmpprefixx)
194         string(TOUPPER "${tmpprefixx}_" tmpprefix)
195       else()
196         set(tmpprefix "")
197       endif()
198       set(${testname} "${tmpprefix}${${testname}}")
199       set(${listlabels} ${sublabel})
200     endif()
201   endif()
202 endmacro()
203
204 macro(loadTestList filename resList depth splitlangs)
205   # Create list of strings from a file without comments
206   # ENCODING parameter is a new feature in cmake 3.1
207   initLangVars(${resList})
208   initLangVars("sublabel")
209   if (CMAKE_VERSION VERSION_GREATER "3.1")
210     file(STRINGS ${filename} tempList ENCODING "UTF-8")
211   else()
212     file(STRINGS ${filename} tempList)
213   endif()
214   set(${resList})
215   set(sublabel)
216   set(mylabels "")
217   set(languages "")
218   message(STATUS "Reading list ${filename}")
219   foreach(_l ${tempList})
220     set(_newl "${_l}")
221     string(REGEX REPLACE "[ \t]+$" "" _newl "${_l}")
222     string(REGEX REPLACE "[ \t]*#.*$" "" _newl "${_l}")
223     if(_newl)
224       list(APPEND ${resList} "${_newl}")
225       if (_newl MATCHES "^Sublabel:")
226         string(REGEX REPLACE "^Sublabel:[ \t]*" "" _newlabels ${_newl})
227         string(REGEX MATCHALL "([0-9]*${label_chars})" _labels ${_newlabels})
228         foreach(labname ${_labels})
229           if (NOT labname STREQUAL "RESET")
230             list(APPEND mylabels ${labname})
231           endif()
232         endforeach()
233         list(REMOVE_DUPLICATES mylabels)
234         set(sublabel ${_newl})
235       else()
236         if (${splitlangs} MATCHES "ON")
237           string(REGEX REPLACE "(\\/|\\||\\(|\\))" "  " _vxx ${_newl})
238           string(REGEX MATCHALL " ([a-z][a-z](_[A-Z][A-Z])?) " _vx ${_vxx})
239         else()
240           set(_vx OFF)
241         endif()
242         if(_vx)
243           foreach(_v ${_vx})
244             string(REGEX REPLACE " " "" _v ${_v})
245             #message(STATUS " ==> ${resList}_${_v}")
246             #message(STATUS "sublabel = ${sublabel}, sublabel_${_v} = ${sublabel_${_v}}")
247             if (NOT sublabel STREQUAL "${sublabel_${_v}}")
248               list(APPEND ${resList}_${_v} "${sublabel}")
249               set(sublabel_${_v} "${sublabel}")
250               #message(STATUS "Setting variable sublabel_${_v} with \"${sublabel}\"")
251             endif()
252             list(APPEND ${resList}_${_v} "${_newl}")
253             list(APPEND languages ${_v})
254           endforeach()
255           list(REMOVE_DUPLICATES languages)
256           #message(STATUS "languages = ${languages}")
257         endif()
258       endif()
259     endif()
260   endforeach()
261   foreach(_l1 ${mylabels})
262     if (_l1 MATCHES "^([0-9]+)(${label_chars})$")
263       set(_l ${CMAKE_MATCH_2})
264       set(depth1 ${CMAKE_MATCH_1})
265     else()
266       set(_l ${_l1})
267       set(depth1 "0")
268     endif()
269     list(FIND known_labels ${_l} _ff)
270     if (_ff GREATER -1)
271       message(STATUS "Label \"${_l}\" already in use. Reused in ${filename}")
272     else()
273       assignLabelDepth(${depth}${depth1} ${_l})
274     endif()
275   endforeach()
276   foreach(_lg ${languages})
277     # reset label for each used language string at end of file
278     #message(STATUS "Resetting variable sublabel_${_lg}, previously set to ${sublabel_${_lg}}")
279     set(sublabel_${_lg} "")
280   endforeach()
281 endmacro()
282
283 # This labels should not be used in .*Tests files
284 set(known_labels "")
285 # Create depth info to each label
286 macro(assignLabelDepth depth)
287   foreach(_lab ${ARGN})
288     list(APPEND known_labels ${_lab})
289     set(depth_${_lab} ${depth})
290   endforeach()
291 endmacro()
292
293 assignLabelDepth(0 "export" "key" "layout" "load" "lyx2lyx" "module" "roundtrip" "url")
294 assignLabelDepth(1 "unreliable" "inverted")
295 assignLabelDepth(2 "suspended")
296 assignLabelDepth(-1 "examples" "manuals" "mathmacros" "templates" "tabletemplates" "autotests")
297
298 loadTestList(invertedTests invertedTests 7 ON)
299 loadTestList(ignoredTests ignoredTests 0 ON)
300 loadTestList(suspendedTests suspendedTests 6 ON)
301 loadTestList(unreliableTests unreliableTests 5 ON)
302 loadTestList(ignoreLatexErrorsTests ignoreLatexErrorsTests 8 OFF)
303
304 foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates lib/tabletemplates autotests/mathmacros)
305   set(testlabel "export")
306   if (libsubfolderx MATCHES "lib/doc")
307     list(APPEND testlabel "manuals")
308   elseif (libsubfolderx MATCHES "lib/examples")
309     list(APPEND testlabel "examples")
310   elseif (libsubfolderx MATCHES "lib/templates")
311     list(APPEND testlabel "templates")
312   elseif (libsubfolderx MATCHES "lib/tabletemplates")
313     list(APPEND testlabel "tabletemplates")
314   elseif (libsubfolderx MATCHES "autotests/mathmacros")
315     list(APPEND testlabel "mathmacros")
316   elseif (libsubfolderx MATCHES "autotests/.+")
317     list(APPEND testlabel "autotests")
318   endif()
319   set(LIBSUB_SRC_DIR "${TOP_SRC_DIR}/${libsubfolderx}")
320   string(REGEX REPLACE "^(lib|development|autotests)/" "" libsubfolder "${libsubfolderx}")
321   set(LIBSUB_SRC_DIR "${TOP_SRC_DIR}/${libsubfolderx}")
322   message(STATUS "Handling export dir ${LIBSUB_SRC_DIR}")
323   file(GLOB_RECURSE lyx_files RELATIVE "${LIBSUB_SRC_DIR}" "${LIBSUB_SRC_DIR}/*.lyx")
324   list(SORT lyx_files)
325   # Now create 2 lists. One for files in a language dir, one without
326   set(lang_lyx_files)
327   set(nolang_lyx_files)
328   foreach(f ${lyx_files})
329     if (${f} MATCHES "#")
330       # Do nothing, probably wrong temporary file
331     else()
332       string(REGEX MATCHALL "^[a-z][a-z](_[A-Z][A-Z])?\\/" _v ${f})
333       if(_v)
334         list(APPEND lang_lyx_files ${f})
335       else()
336         list(APPEND nolang_lyx_files ${f})
337       endif()
338     endif()
339   endforeach()
340   foreach(f ${nolang_lyx_files} ${lang_lyx_files})
341     # Strip extension
342     string(REGEX REPLACE "\\.lyx$" "" f ${f})
343     foreach(_lyx_format_num 16 20 21 22 23)
344       set(TestName1 "export/${libsubfolder}/${f}_lyx${_lyx_format_num}")
345       string(REGEX REPLACE "[\\(\\)]" "_" TestName "${TestName1}")
346       set(mytestlabel ${testlabel} "lyx2lyx" "load")
347       maketestname(TestName inverted invertedTests ignoredTests unreliableTests mytestlabel)
348       if(TestName)
349         add_test(NAME ${TestName}
350           WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
351           COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${LIBSUB_SRC_DIR}
352           -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
353           -Dlyx=$<TARGET_FILE:${_lyx}>
354           -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
355           -DLYX_USERDIR_VER=${LYX_USERDIR_VER}
356           -Dformat=lyx${_lyx_format_num}x
357           -Dextension=${_lyx_format_num}.lyx
358           -DLYX_FORMAT_NUM=${_lyx_format_num}
359           -Dfile=${f}
360           -Dinverted=${inverted}
361           -DTOP_SRC_DIR=${TOP_SRC_DIR}
362           -DPERL_EXECUTABLE=${PERL_EXECUTABLE}
363           -P "${TOP_SRC_DIR}/development/autotests/export.cmake")
364         setmarkedtestlabel(${TestName} ${mytestlabel})
365       endif()
366     endforeach()
367     if(LYX_PYTHON_EXECUTABLE)
368       set(lyx2lyxtestlabel "lyx2lyx")
369       # For use of lyx2lyx we need the python executable
370       set(mytestlabel ${lyx2lyxtestlabel})
371       set(TestName1 "lyx2lyx/${libsubfolder}/${f}")
372       string(REGEX REPLACE "[\\(\\)]" "_" TestName "${TestName1}")
373       maketestname(TestName inverted invertedTests ignoredTests unreliableTests mytestlabel)
374       if(TestName)
375         add_test(NAME ${TestName}
376           WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
377           COMMAND ${CMAKE_COMMAND}
378           "-DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}"
379           "-DLYX2LYX=${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx"
380           "-DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}"
381           "-DLYXFILE=${LIBSUB_SRC_DIR}/${f}.lyx"
382           -P "${TOP_SRC_DIR}/development/autotests/lyx2lyxtest.cmake")
383         setmarkedtestlabel(${TestName} ${mytestlabel})
384       endif()
385     endif()
386     set(loadtestlabel "load")
387     set(mytestlabel ${loadtestlabel})
388     set(TestName1 "check_load/${libsubfolder}/${f}")
389     string(REGEX REPLACE "[\\(\\)]" "_" TestName "${TestName1}")
390     maketestname(TestName inverted invertedTests ignoredTests unreliableTests mytestlabel)
391     if(TestName)
392       add_test(NAME ${TestName}
393         WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
394         COMMAND ${CMAKE_COMMAND} -DLYXFILE=${LIBSUB_SRC_DIR}/${f}.lyx
395         -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
396         -Dlyx=$<TARGET_FILE:${_lyx}>
397         -DPARAMS_DIR=${TOP_SRC_DIR}/development/autotests
398         -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
399         -Dinverted=${inverted}
400         -P "${TOP_SRC_DIR}/development/autotests/check_load.cmake")
401       setmarkedtestlabel(${TestName} ${mytestlabel})
402       #set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
403     endif()
404     set(default_output_format)
405     getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist default_output_format)
406     foreach(format ${formatlist})
407       if(format MATCHES "dvi3|pdf4|pdf5")
408         set(fonttypes "texF" "systemF")
409       else()
410         set(fonttypes "defaultF")
411       endif()
412       foreach(fonttype ${fonttypes})
413         if (format MATCHES "pdf2" AND f MATCHES "latex/unicodesymbols")
414           #message(STATUS "Test ${TestName} matches Unicode encodings")
415           # test_encodings does not include "default", since it should be covered
416           # by one of the supplied encodings
417           set(test_encodings "ascii" "utf8" "utf8x" "armscii8" "applemac"
418             "cp437" "cp437de" "cp850" "cp852"
419             "cp855" "cp862" "cp865"
420             "cp866" "cp1250" "cp1251" "cp1252"
421             "cp1255" "cp1256" "cp1257"
422             "koi8-r" "koi8-u"
423             "iso8859-1" "iso8859-2" "iso8859-3"
424             "iso8859-4" "iso8859-5" "iso8859-6"
425             "iso8859-7" "iso8859-8" "iso8859-9"
426             "iso8859-13" "iso8859-15" "iso8859-16"
427             "pt154" "big5" "shift-jis"
428             "euc-cn" "gbk" "jis" "euc-kr"
429             "utf8-cjk" "euc-tw" "euc-jp"
430             "euc-jp-platex" "jis-platex"
431             "shift-jis-platex" "utf8-platex"
432             "tis620-0")
433         else()
434           set(test_encodings "default")
435         endif()
436         foreach (_enc2 ${test_encodings})
437           if ("${_enc2}" STREQUAL "default")
438             set(_enc "")
439           else()
440             set(_enc "_${_enc2}")
441           endif()
442           if(fonttype MATCHES "defaultF")
443             set(TestName1 "export/${libsubfolder}/${f}${_enc}_${format}")
444           else()
445             set(TestName1 "export/${libsubfolder}/${f}${_enc}_${format}_${fonttype}")
446           endif()
447           if (format MATCHES "^${default_output_format}$")
448             set(extraLabels "defaultoutput")
449           else()
450             set(extraLabels )
451           endif()
452           set(missingLabels )
453           findexpr(mfound TestName1 ignoreLatexErrorsTests missingLabels)
454           if (mfound)
455             set(mytestlabel ${testlabel} "ignoring" ${missingLabels} ${extraLabels})
456           else()
457             set(mytestlabel ${testlabel} ${extraLabels})
458           endif()
459           string(REGEX REPLACE "[\\(\\)]" "_" TestName "${TestName1}")
460           maketestname(TestName inverted invertedTests ignoredTests unreliableTests mytestlabel)
461           if (format MATCHES "docbook5")
462             set(f_extension "xml")
463           else()
464             set(f_extension ${format})
465           endif()
466           if(TestName)
467             add_test(NAME ${TestName}
468               WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
469               COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${LIBSUB_SRC_DIR}
470               -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
471               -Dlyx=$<TARGET_FILE:${_lyx}>
472               -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
473               -Dformat=${format}
474               -Dfonttype=${fonttype}
475               -Dextension=${f_extension}
476               -Dfile=${f}
477               -Dinverted=${inverted}
478               -DTOP_SRC_DIR=${TOP_SRC_DIR}
479               "-DIgnoreErrorMessage=${missingLabels}"
480               -DPERL_EXECUTABLE=${PERL_EXECUTABLE}
481               -DXMLLINT_EXECUTABLE=${XMLLINT_EXECUTABLE}
482               -DJAVA_EXECUTABLE=${jingjava}
483               -DENCODING=${_enc2}
484               -P "${TOP_SRC_DIR}/development/autotests/export.cmake")
485             setmarkedtestlabel(${TestName} ${mytestlabel}) # check for suspended pdf/dvi exports
486           endif()
487         endforeach()
488       endforeach()
489     endforeach()
490   endforeach()
491 endforeach()