From: Matthias Maier Date: Thu, 29 Jun 2023 16:35:21 +0000 (-0500) Subject: CMake: fix submit_results.cmake X-Git-Tag: relicensing~830^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1be91c3c8441235c9783e2081e10a0166341551f;p=dealii.git CMake: fix submit_results.cmake Nowadays, we need to set CTEST_SITE before we can submit an already existing test result. --- diff --git a/tests/submit_results.cmake b/tests/submit_results.cmake index f6e9d136f9..37da1a6aa7 100644 --- a/tests/submit_results.cmake +++ b/tests/submit_results.cmake @@ -40,14 +40,23 @@ set(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) message("-- CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}") file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG _tag) +list(GET _tag 0 _subdirectory) list(GET _tag 1 _track) if("${_track}" STREQUAL "") - message(FATAL_ERROR " -No test results found. Bailing out. -" - ) + message(FATAL_ERROR "\nNo test results found. Bailing out.\n") endif() +set(_file "${CTEST_BINARY_DIRECTORY}/Testing/${_subdirectory}/Update.xml") + +if(NOT EXISTS "${_file}") + message(FATAL_ERROR "\nNo test results found. Bailing out.\n") +endif() + +file(STRINGS "${_file}" CTEST_SITE REGEX "") +string(REGEX REPLACE ".*(.*)" "\\1" CTEST_SITE "${CTEST_SITE}") + +message("-- CTEST_SITE: ${CTEST_SITE}") + ctest_start(Experimental TRACK ${_track} APPEND) ctest_submit()