]> git.lyx.org Git - features.git/commitdiff
Cmake tests for check load of lyx-files
authorKornel Benko <kornel@lyx.org>
Thu, 26 Dec 2013 09:29:34 +0000 (10:29 +0100)
committerKornel Benko <kornel@lyx.org>
Thu, 26 Dec 2013 09:29:34 +0000 (10:29 +0100)
Do not interpret reconfigure output of lyx as test-error.

development/autotests/check_load.cmake
development/autotests/filterCheckWarnings

index 5311a80df1cae4a5e8f12157e73c3af6c44a6961..967bb66989f731bf333f0c611b01a273d0ca0725 100644 (file)
@@ -29,24 +29,42 @@ execute_process(
 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)
 if(lyxerr)
+  set(ConfigureOutput 0)
   file(STRINGS "${PARAMS_DIR}/filterCheckWarnings" ignoreRegexp)
   # Split lyxerr into lines
   string(REGEX REPLACE "[\n]+" ";" foundErrors ${lyxerr})
   foreach(_l ${foundErrors})
-    message(STATUS "Checking line: \"${_l}\"")
-    set(found 0)
-    foreach(_r ${ignoreRegexp})
-      string(REGEX MATCHALL "${_r}" _match ${_l})
+    if(ConfigureOutput)
+      string(REGEX MATCHALL "LyX: Done!" _match ${_l})
+      if(_match)
+        set(ConfigureOutput 0)
+      endif()
+    else()
+      string(REGEX MATCHALL "reconfiguring user directory" _match ${_l})
       if(_match)
-        set(found 1)
+        set(ConfigureOutput 1)
+      endif()
+    endif()
+    if(NOT ConfigureOutput)
+      set(found 0)
+      foreach(_r ${ignoreRegexp})
+        string(REGEX MATCHALL "${_r}" _match ${_l})
+        if(_match)
+          set(found 1)
+          break()
+        endif()
+      endforeach()
+      if(NOT found)
+        message(STATUS "Error line = ${_l}")
+        # It is error, because the error-line does not match
+        # any ignoring expression
+        set(_erg 1)
         break()
       endif()
-    endforeach()
-    if(NOT found)
-      # It is error, because the error-line does not match
-      # any ignoring expression
-      set(_erg 1)
     endif()
   endforeach()
 endif()
index 66ebd3008a7cebb69bdaada87dc6262fb78a6682..55118101f06c998d07d3f886f657458dcb4fe888 100644 (file)
@@ -1 +1,2 @@
 Cannot find translation for language
+LyX: Done