From: maier Date: Thu, 26 Sep 2013 11:13:44 +0000 (+0000) Subject: Refactor: Write revision information to a pseudo Update.xml file X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dae333ff5f807a61d56d58f9191d4c970df9a2af;p=dealii-svn.git Refactor: Write revision information to a pseudo Update.xml file git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30948 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/run_testsuite.cmake b/tests/run_testsuite.cmake index 448c169b0a..9d953090ec 100644 --- a/tests/run_testsuite.cmake +++ b/tests/run_testsuite.cmake @@ -185,17 +185,6 @@ CTEST_CMAKE_GENERATOR was set to a different Generator \"${CTEST_CMAKE_GENERATOR ENDIF() ENDIF() -# -# CTEST_UPDATE_COMMAND: -# - -FIND_PACKAGE(Subversion QUIET) -IF(SUBVERSION_FOUND) - SET(CTEST_UPDATE_COMMAND ${Subversion_SVN_EXECUTABLE}) -ENDIF() - -MESSAGE("-- CTEST_UPDATE_COMMAND: ${CTEST_UPDATE_COMMAND}") - # # CTEST_SITE: # @@ -270,7 +259,7 @@ ENDIF() # # Append subversion branch to CTEST_BUILD_NAME: # - +FIND_PACKAGE(Subversion QUIET) EXECUTE_PROCESS( COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY} OUTPUT_QUIET ERROR_QUIET @@ -281,7 +270,7 @@ IF(${_result} EQUAL 0) STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL}) STRING(REGEX REPLACE "^branches/" "" _branch ${_branch}) STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch}) - SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}-r${_svn_WC_REVISION}") + SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}") ENDIF() # @@ -368,7 +357,7 @@ IF("${_res}" STREQUAL "0") # Only run tests if the build was successful: EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} - --build ${CTEST_BINARY_DIRECTORY} --target setup_test + --build ${CTEST_BINARY_DIRECTORY} --target setup_test OUTPUT_QUIET RESULT_VARIABLE _res ) IF(NOT "${_res}" STREQUAL "0") @@ -390,7 +379,7 @@ IF(NOT EXISTS ${_path}) ENDIF() FILE(GLOB _xml_files ${_path}/*.xml) EXECUTE_PROCESS(COMMAND sed -i -e - s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"\\n\\tSVNBranch=\"${_branch}\"\\n\\tSVNRevision=\"${_svn_WC_REVISION}\"/g + s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g ${_xml_files} OUTPUT_QUIET RESULT_VARIABLE _res ) @@ -398,6 +387,20 @@ IF(NOT "${_res}" STREQUAL "0") MESSAGE(FATAL_ERROR "\"sed\" failed. Bailing out.") ENDIF() +IF(NOT "${_svn_WC_REVISION}" STREQUAL "") + FILE(WRITE ${_path}/Update.xml +" + + ${CTEST_SITE} + ${CTEST_BUILD_NAME} + ${_tag}-Experimental + SVN + ${_svn_WC_REVISION} + ${_branch} +" + ) +ENDIF() + # # And finally submit: #