mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Cmake tests for check load of lyx-files
Do not interpret reconfigure output of lyx as test-error.
This commit is contained in:
parent
e2ded6e046
commit
90cb7c1492
@ -29,24 +29,42 @@ execute_process(
|
|||||||
message(STATUS "Error code of lyx = ${_err}")
|
message(STATUS "Error code of lyx = ${_err}")
|
||||||
string(COMPARE NOTEQUAL ${_err} 0 _erg)
|
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)
|
if(lyxerr)
|
||||||
|
set(ConfigureOutput 0)
|
||||||
file(STRINGS "${PARAMS_DIR}/filterCheckWarnings" ignoreRegexp)
|
file(STRINGS "${PARAMS_DIR}/filterCheckWarnings" ignoreRegexp)
|
||||||
# Split lyxerr into lines
|
# Split lyxerr into lines
|
||||||
string(REGEX REPLACE "[\n]+" ";" foundErrors ${lyxerr})
|
string(REGEX REPLACE "[\n]+" ";" foundErrors ${lyxerr})
|
||||||
foreach(_l ${foundErrors})
|
foreach(_l ${foundErrors})
|
||||||
message(STATUS "Checking line: \"${_l}\"")
|
if(ConfigureOutput)
|
||||||
set(found 0)
|
string(REGEX MATCHALL "LyX: Done!" _match ${_l})
|
||||||
foreach(_r ${ignoreRegexp})
|
|
||||||
string(REGEX MATCHALL "${_r}" _match ${_l})
|
|
||||||
if(_match)
|
if(_match)
|
||||||
set(found 1)
|
set(ConfigureOutput 0)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
string(REGEX MATCHALL "reconfiguring user directory" _match ${_l})
|
||||||
|
if(_match)
|
||||||
|
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()
|
break()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
|
||||||
if(NOT found)
|
|
||||||
# It is error, because the error-line does not match
|
|
||||||
# any ignoring expression
|
|
||||||
set(_erg 1)
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
@ -1 +1,2 @@
|
|||||||
Cannot find translation for language
|
Cannot find translation for language
|
||||||
|
LyX: Done
|
||||||
|
Loading…
Reference in New Issue
Block a user