Am Freitag, 14. März 2014 um 16:19:14, schrieb Scott Kostyshak 
<skost...@lyx.org>
> >> (1) we can just move towards enabling all tests and then
> >
> >> inverting/ignoring when we need to. The only disadvantage is computer
> >
> >> time.
> >
> >> (2) we can have a file that will force the inclusion of a specific test.
> >
> >>
> >
> >> Which do you think is best?
> >
> >
> >
> > I propose following:
> >
> > default_output_format ---> export format to test
> >
> > ------------------------------------------------
> >
> > default xhtml, dvi*, pdf*
> >
> > xhtml xhtml
> >
> > any of pfd variants xhtml, pdf*
> >
> > any of dvi variants xhtml, dvi*
> >
> > ------------------------------------------------
> 
> Looks good to me.
> 
> Scott

OK. Patch attached.

        Kornel
diff --git a/development/autotests/CMakeLists.txt b/development/autotests/CMakeLists.txt
index 6321c12..d070c12 100644
--- a/development/autotests/CMakeLists.txt
+++ b/development/autotests/CMakeLists.txt
@@ -103,28 +103,34 @@ endif()
 
 find_package(Perl)
 
+if(PERL_FOUND)
+  set(DVI_FORMATS "dvi" "dvi3")
+  set(PDF_FORMATS "pdf" "pdf2" "pdf3" "pdf4" "pdf5")
+else()
+  set(DVI_FORMATS "dvi")
+  set(PDF_FORMATS "pdf" "pdf2" "pdf3")
+endif()
+
 macro(getoutputformats filepath varname)
   file(STRINGS "${filepath}" lines)
-  set(out_formats "xhtml" "dvi" "dvi3" "pdf" "pdf2" "pdf3" "pdf4" "pdf5")
-  if(NOT PERL_FOUND)
-    list(REMOVE_ITEM out_formats "dvi3" "pdf4" "pdf5")
-  endif()
-  set(${varname} ${out_formats})
+  # What should we test, if default_output_format is not defined?
+  set(out_formats "xhtml")
   foreach(_l ${lines})
     if(_l MATCHES "^\\\\default_output_format +\([^ ]+\)")
-      if(CMAKE_MATCH_1 STREQUAL "default")
-        set(found ${out_formats})
-      elseif(CMAKE_MATCH_1 STREQUAL "pdf2")
-        set(found "pdf2" "pdf4" "pdf5")
-      elseif(CMAKE_MATCH_1 STREQUAL "xhtml")
-        set(found "xhtml")
-      else()
-        set(found "xhtml" ${CMAKE_MATCH_1})
+      set(_format ${CMAKE_MATCH_1})
+      if(_format STREQUAL "default")
+        set(out_formats "xhtml" ${DVI_FORMATS} ${PDF_FORMATS})
+      elseif(_format MATCHES "pdf")
+        set(found "xhtml" ${PDF_FORMATS})
+      elseif(_format MATCHES "dvi")
+        set(out_formats "xhtml" ${DVI_FORMATS})
+      elseif(_format STREQUAL "xhtml")
+        set(out_formats "xhtml")
       endif()
-      set(${varname} ${found})
       break()
     endif()
   endforeach()
+  set(${varname} ${out_formats})
 endmacro()
 
 macro(maketestname testname reverted listreverted listignored)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to