diff --git a/cmake/modules/TestSuite.cmake b/cmake/modules/TestSuite.cmake --- a/cmake/modules/TestSuite.cmake +++ b/cmake/modules/TestSuite.cmake @@ -3,11 +3,13 @@ option(ENABLE_JUNIT_REPORT "Enable Junit report generation for targets that support it" OFF) set(JUNIT_REPORT_DIRECTORY "${CMAKE_BINARY_DIR}/test/junit") +set(TEST_LOG_DIRECTORY "${CMAKE_BINARY_DIR}/test/log") set_property( DIRECTORY "${CMAKE_SOURCE_DIR}" APPEND PROPERTY ADDITIONAL_CLEAN_FILES - "${JUNIT_REPORT_DIRECTORY}" "${CMAKE_BINARY_DIR}/test/tmp" + "${JUNIT_REPORT_DIRECTORY}" + "${TEST_LOG_DIRECTORY}" ) macro(add_test_environment VARIABLE VALUE) @@ -22,6 +24,7 @@ add_custom_target(${TARGET} ${ARG_CUSTOM_TARGET_ARGS} COMMAND ${CMAKE_COMMAND} -E make_directory "${JUNIT_REPORT_DIRECTORY}" + COMMAND ${CMAKE_COMMAND} -E make_directory "${TEST_LOG_DIRECTORY}" COMMAND ${CMAKE_COMMAND} -E env ${TEST_ENVIRONMENT} ${ARG_TEST_COMMAND} ) endfunction() @@ -122,7 +125,7 @@ add_test_custom_target(${TARGET} TEST_COMMAND "${CMAKE_SOURCE_DIR}/cmake/utils/test_wrapper.sh" - "${SUITE}-${NAME}.log" + "${TEST_LOG_DIRECTORY}/${SUITE}-${NAME}.log" ${CMAKE_CROSSCOMPILING_EMULATOR} "$" ${ARG_UNPARSED_ARGUMENTS} CUSTOM_TARGET_ARGS COMMENT "${SUITE}: testing ${NAME}" diff --git a/contrib/teamcity/build-configurations.json b/contrib/teamcity/build-configurations.json --- a/contrib/teamcity/build-configurations.json +++ b/contrib/teamcity/build-configurations.json @@ -12,8 +12,6 @@ "src/test/test_bitcoin": "bin/test_bitcoin", "src/qt/test/test_bitcoin-qt": "bin/test_bitcoin-qt", "src/seeder/test/test-seeder": "bin/test-seeder", - "src/qt/test/test_bitcoin-qt.log": "log/qt/test_bitcoin-qt.log", - "src/seeder/test/*.log": "log/seeder", "test/tmp/test_runner_*": "functional" } }, diff --git a/contrib/teamcity/build-configurations.py b/contrib/teamcity/build-configurations.py --- a/contrib/teamcity/build-configurations.py +++ b/contrib/teamcity/build-configurations.py @@ -123,6 +123,7 @@ self.artifact_dir = self.build_directory.joinpath("artifacts") self.junit_reports_dir = self.build_directory.joinpath("test/junit") + self.test_logs_dir = self.build_directory.joinpath("test/log") # We will provide the required environment variables self.environment_variables = { @@ -250,6 +251,7 @@ str(self.logs["full_log"].relative_to(self.build_directory)): "", str(self.logs["clean_log"].relative_to(self.build_directory)): "", str(self.junit_reports_dir.relative_to(self.build_directory)): "", + str(self.test_logs_dir.relative_to(self.build_directory)): "", } self.copy_artifacts(artifacts)