]> git.lyx.org Git - features.git/commitdiff
Cmake check load tests: Allow tests to use the filter .*Tests
authorKornel Benko <kornel@lyx.org>
Sun, 27 Dec 2015 17:56:36 +0000 (18:56 +0100)
committerKornel Benko <kornel@lyx.org>
Sun, 27 Dec 2015 17:56:36 +0000 (18:56 +0100)
Now we can also select which lyx-file may or may not be loaded
in the same way as was for export tests.

development/autotests/ExportTests.cmake
development/autotests/check_load.cmake
development/autotests/suspiciousTests

index 7311616cebb18d468526fe5c9f3902cf27b113f5..50a0aa9d800e379901849800c6521a0d740a12d2 100644 (file)
@@ -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})
index e4872009ba36b2b095db656aa846dacf34f9e774..0a0d35154bdf9d8082db9827bfe8f18b2b2e1a73 100644 (file)
@@ -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}")
index ab745cc0fea0480db8fc3e55a99a603a4ace3db3..7d28c75697c0abc87dd71e50789bc759952e47b2 100644 (file)
@@ -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