From: Kornel Benko Date: Mon, 2 Nov 2020 12:12:56 +0000 (+0100) Subject: Cmake tests: Do not remove temporary data while debugging X-Git-Tag: 2.4.0-alpha3~826 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9b2790d472cd86f20fdfa839f0fa70f8b54b2c42;p=lyx.git Cmake tests: Do not remove temporary data while debugging The debug mode is set with the environment LYX_DEBUG_LATEX $ export LYX_DEBUG_LATEX=1 The downside: From time to time the need to remove the superfluous dirs $ cd build-dir $ find autotests/out-home -name AbC_\* | xargs rm -rf --- diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake index 384f389c39..d2a03565ff 100755 --- a/development/autotests/export.cmake +++ b/development/autotests/export.cmake @@ -300,7 +300,16 @@ if(inverted) else() string(COMPARE NOTEQUAL ${_err} 0 _erg) endif() -execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${TempDir}") + +if ($ENV{LYX_DEBUG_LATEX}) + # Do not remove temporary files if one wants to examine them + # for example if setting the env-var LYX_DEBUG_LATEX + # This needs a remove all temp-dirs from time to time + # $ cd build-dir + # $ find autotests/out-home -name AbC_\* | xargs rm -rf +else() + execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${TempDir}") +endif() if(_TestResultMessage) message(STATUS "Msg Summary:") foreach(_l ${_TestResultMessage})