Am Montag, 2. November 2015 um 11:21:09, schrieb Kornel Benko <kor...@lyx.org>
> Am Montag, 2. November 2015 um 08:36:05, schrieb Guenter Milde 
> <mi...@users.sf.net>
> > Dear Scott and Kornel,
> >
> > On 2015-11-02, Scott Kostyshak wrote:
> > > On Sun, Nov 01, 2015 at 10:36:17PM +0100, Kornel Benko wrote:
> > >> Am Sonntag, 1. November 2015 um 21:27:11, schrieb Guenter Milde 
> > >> <mi...@users.sf.net>

...

> > Candidates for "suspended" tests are
> >
> > * "fragile" documents (many packages, ERT, heavy preamble, ...),
> > * "fragile" export routes (XeTeX/LuaTeX with TeX fonts),
> > * non-default export routes
> >
> > and especially combinations of these.
> >
> >
> > Günter
> >
>
> OK, here is my suggestion
> 1.) We add the appropriate tests into revertedTests
>
> The content in suspendedTests may be (in our case) e.g.
>       pdf4_texF
>
>       1.a)
>               If a test is to be inverted, we check suspendedTest, and if 
> there, we ignore the testcase.
>
> or
>       1.b)
>               Such a test may became a label "suspended" instead of "export", 
> so that
>               'ctest -L export' will be clean, but we also have the 
> possibility to
>               use 'ctest -L suspended'.
>
> This does neither effect non-inverted nor ignored.
>
> I prefer 1.b.
>

Apparently nobody cares?
The attached works here.

        Kornel
diff --git a/development/autotests/ExportTests.cmake b/development/autotests/ExportTests.cmake
index 50b4aa4..c3367a3 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -137,8 +137,26 @@ endmacro()

 loadTestList(revertedTests revertedTests)
 loadTestList(ignoredTests ignoredTests)
+loadTestList(suspendedTests suspendedTests)

-foreach(libsubfolder doc examples templates)
+macro(handlesuspended TestName reverted testlabel)
+  set(mylabel ${testlabel})
+  set(myreverted ${reverted})
+  if (${reverted})
+    # check suspension only for reverted tests
+    findexpr(tfound TestName suspendedTests)
+    if (tfound)
+      set(mylabel "suspended")
+      set(myreverted 0) # if test is to be suspended, remove the 'reverted' flag
+    endif()
+  endif()
+  setmarkedtestlabel(${TestName} ${myreverted} ${mylabel})
+endmacro()
+
+# preparing to add e.g. development/mathmacro to the foreach() loop
+foreach(libsubfolderx lib/doc lib/examples lib/templates)
+  set(LIBSUB_SRC_DIR "${TOP_SRC_DIR}/${libsubfolderx}")
+  string(REGEX REPLACE "^(lib|development)/" "" libsubfolder "${libsubfolderx}")
   set(LIBSUB_SRC_DIR "${TOP_SRC_DIR}/lib/${libsubfolder}")
   file(GLOB_RECURSE lyx_files RELATIVE "${LIBSUB_SRC_DIR}" "${LIBSUB_SRC_DIR}/*.lyx")
   list(SORT lyx_files)
@@ -173,7 +191,7 @@ foreach(libsubfolder doc examples templates)
         -DTOP_SRC_DIR=${TOP_SRC_DIR}
         -DPERL_EXECUTABLE=${PERL_EXECUTABLE}
         -P "${TOP_SRC_DIR}/development/autotests/export.cmake")
-      setmarkedtestlabel(${TestName} ${reverted} "export")
+      handlesuspended(${TestName} ${reverted} "export") # checking for suspended lyx16 exports
     endif()
     if(LYX_PYTHON_EXECUTABLE)
       # For use of lyx2lyx we need the python executable
@@ -188,7 +206,7 @@ foreach(libsubfolder doc examples templates)
           "-DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}"
           "-DLYXFILE=${LIBSUB_SRC_DIR}/${f}.lyx"
           -P "${TOP_SRC_DIR}/development/autotests/lyx2lyxtest.cmake")
-        setmarkedtestlabel(${TestName} ${reverted} "lyx2lyx")
+        handlesuspended(${TestName} ${reverted} "lyx2lyx")
       endif()
     endif()
     set(TestName "check_load/${libsubfolder}/${f}")
@@ -202,7 +220,7 @@ foreach(libsubfolder doc examples templates)
         -DPARAMS_DIR=${TOP_SRC_DIR}/development/autotests
         -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
         -P "${TOP_SRC_DIR}/development/autotests/check_load.cmake")
-      setmarkedtestlabel(${TestName} ${reverted} "load")
+      handlesuspended(${TestName} ${reverted} "load")
       set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
     endif()
     getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist)
@@ -234,7 +252,7 @@ foreach(libsubfolder doc examples templates)
             -DTOP_SRC_DIR=${TOP_SRC_DIR}
             -DPERL_EXECUTABLE=${PERL_EXECUTABLE}
             -P "${TOP_SRC_DIR}/development/autotests/export.cmake")
-          setmarkedtestlabel(${TestName} ${reverted} "export")
+          handlesuspended(${TestName} ${reverted} "export") # check for suspended pdf/dvi exports
         endif()
       endforeach()
     endforeach()
INV.*pdf4_texF

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

Reply via email to