Tests: Teach CheckSourceTree test to clean up some specific known files

Some nightly builds occasionally leave some log files behind due to
local configuration.  Remove them before checking the source tree since
they are known to not be CMake bugs leaving behind source tree
modifications in the test suite.
This commit is contained in:
Brad King 2022-10-13 10:47:16 -04:00
parent 0dfd939077
commit 2de1458c3c

View File

@ -3,6 +3,13 @@ if(DEFINED ENV{CTEST_REAL_HOME})
set(ENV{HOME} "$ENV{CTEST_REAL_HOME}") set(ENV{HOME} "$ENV{CTEST_REAL_HOME}")
endif() endif()
file(GLOB known_files
"${CMake_SOURCE_DIR}/Tests/JavaExportImport/InstallExport/hs_err_pid*.log"
)
if(known_files)
file(REMOVE ${known_files})
endif()
execute_process( execute_process(
COMMAND "${GIT_EXECUTABLE}" status COMMAND "${GIT_EXECUTABLE}" status
WORKING_DIRECTORY "${CMake_SOURCE_DIR}" WORKING_DIRECTORY "${CMake_SOURCE_DIR}"