commit ddfd228dc357cac225813479502bbab353e43b4b
Author: Kornel Benko <[email protected]>
Date:   Sun Dec 27 18:56:36 2015 +0100

    Cmake check load tests: Allow tests to use the filter .*Tests
    
    Now we can also select which lyx-file may or may not be loaded
    in the same way as was for export tests.

diff --git a/development/autotests/ExportTests.cmake 
b/development/autotests/ExportTests.cmake
index 7311616..50a0aa9 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -136,7 +136,7 @@ macro(maketestname testname inverted listsuspicious 
listignored listunreliable l
       set(sublabel "unreliable" ${sublabel} ${sublabel2})
       list(REMOVE_ITEM sublabel "export" "inverted" "templates" "mathmacros" 
"manuals" "autotests")
     else()
-      string(REGEX MATCH 
"_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx[0-9][0-9]|xhtml)$" _v ${${testname}})
+      string(REGEX MATCH 
"(^check_load|_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx[0-9][0-9]|xhtml)$)" _v 
${${testname}})
       # check if test _may_ be in listsuspicious
       set(sublabel2 "")
       if (_v)
@@ -355,9 +355,10 @@ foreach(libsubfolderx autotests/export lib/doc 
lib/examples lib/templates autote
         -Dlyx=$<TARGET_FILE:${_lyx}>
         -DPARAMS_DIR=${TOP_SRC_DIR}/development/autotests
         -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
+        -Dinverted=${inverted}
         -P "${TOP_SRC_DIR}/development/autotests/check_load.cmake")
       setmarkedtestlabel(${TestName} ${mytestlabel})
-      set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
+      #set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
     endif()
     getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist)
     foreach(format ${formatlist})
diff --git a/development/autotests/check_load.cmake 
b/development/autotests/check_load.cmake
index e487200..0a0d351 100644
--- a/development/autotests/check_load.cmake
+++ b/development/autotests/check_load.cmake
@@ -14,6 +14,7 @@
 #       -DLYXFILE=xxx \
 #       -DLYX_USERDIR_VER=${LYX_USERDIR_VER} \
 #       -DPARAMS_DIR="${TOP_SRC_DIR}/development/autotests" \
+#       -Dinverted=${inverted}
 #       -P "${TOP_SRC_DIR}/development/autotests/check_load.cmake"
 #
 
@@ -27,14 +28,20 @@ execute_process(
   ERROR_VARIABLE lyxerr)
 
 message(STATUS "Error code of lyx = ${_err}")
-string(COMPARE NOTEQUAL  ${_err} 0 _erg)
 
 #
 # Ignore messages between "reconfiguring user directory" and "LyX: Done!"
 # (Reconfigure-messages are not symptom of an error)
 include(${PARAMS_DIR}/CheckLoadErrors.cmake)
-CheckLoadErrors(lyxerr "${PARAMS_DIR}" _erg)
+if (NOT _err)
+  CheckLoadErrors(lyxerr "${PARAMS_DIR}" _err)
+endif()
 
+if(inverted)
+  string(COMPARE EQUAL  ${_err} 0 _erg)
+else()
+  string(COMPARE NOTEQUAL  ${_err} 0 _erg)
+endif()
 if(_erg)
   # We print here the whole error output, even the ignored part
   message(FATAL_ERROR "lyx gave warnings/errors:\n${lyxerr}")
diff --git a/development/autotests/suspiciousTests 
b/development/autotests/suspiciousTests
index ab745cc..7d28c75 100644
--- a/development/autotests/suspiciousTests
+++ b/development/autotests/suspiciousTests
@@ -154,6 +154,7 @@ export/examples/aas_sample_(dvi3|pdf5)_(texF|systemF)
 
 # Following mathmacros tests fail
 
export/mathmacros/testcases_speed_(dvi|pdf|pdf[23]|(dvi3|pdf[45])_(texF|systemF))
+check_load/mathmacros/testcases_speed
 
 # Language nesting, document is OK, fails because of a bug in LyX
 # document is still worng, did only fail because of latin language

Reply via email to