diff options
Diffstat (limited to 'config')
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 322f0e5..d2503e0 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -41,7 +41,7 @@ else(NOT SITE_OS_NAME) set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
endif()
if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME ${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX})
+ set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
endif()
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
endif(NOT SITE_OS_NAME)
@@ -73,13 +73,13 @@ if(CTEST_USE_TAR_SOURCE) ## Uncompress source if tar file provided
## --------------------------
if(WIN32)
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_USE_TAR_SOURCE}.zip]")
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
else()
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
endif()
-
+
if(NOT rv EQUAL 0)
message(STATUS "extracting... [error-(${rv}) clean up]")
file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
@@ -98,15 +98,15 @@ else(CTEST_USE_TAR_SOURCE) set(NEED_REPOSITORY_CHECKOUT 1)
endif()
- if(${NEED_REPOSITORY_CHECKOUT})
+ if(${NEED_REPOSITORY_CHECKOUT})
if(REPOSITORY_BRANCH)
- set(GITUpdateOptions "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
else()
- set(GITUpdateOptions "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
endif()
- set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${GITUpdateOptions}")
+ set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
else()
- set(GITUpdateOptions "pull")
+ set(CTEST_GIT_options "pull")
endif()
set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
else(CTEST_USE_GIT_SOURCE)
@@ -134,12 +134,12 @@ else(CTEST_USE_TAR_SOURCE) endif()
if(${NEED_REPOSITORY_CHECKOUT})
set(CTEST_CHECKOUT_COMMAND
- "${CTEST_SVN_COMMAND} co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
- else(${NEED_REPOSITORY_CHECKOUT})
+ "\"${CTEST_SVN_COMMAND}\" co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
+ else()
if(CTEST_REPO_VERSION)
set(CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
endif()
- endif(${NEED_REPOSITORY_CHECKOUT})
+ endif()
endif(CTEST_USE_GIT_SOURCE)
endif(LOCAL_UPDATE)
endif(CTEST_USE_TAR_SOURCE)
@@ -182,7 +182,7 @@ else() "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
)
endif()
-
+
#-----------------------------------------------------------------------------
# Check for required variables.
# --------------------------
@@ -258,20 +258,23 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+ if(LOCAL_SUBMIT)
+ ctest_submit (PARTS Update Configure Notes)
+ endif()
if(${res} LESS 0 OR ${res} GREATER 0)
message(FATAL_ERROR "Failed configure: ${res}\n")
endif()
- if(LOCAL_SUBMIT)
- ctest_submit (PARTS Update Configure Notes)
+ if(${res} LESS 0 OR ${res} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
endif()
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
- if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
- message(FATAL_ERROR "Failed build: ${res} with Errors=${errval}\n")
- endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
+ if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+ endif()
if(NOT LOCAL_SKIP_TEST)
if(NOT LOCAL_MEMCHECK_TEST)
@@ -280,13 +283,13 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") ctest_submit (PARTS Test)
endif()
if(${res} LESS 0 OR ${res} GREATER 0)
- message(FATAL_ERROR "Failed tests: ${res}\n")
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
endif()
else()
ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
if(LOCAL_SUBMIT)
ctest_submit (PARTS MemCheck)
- endif(LOCAL_SUBMIT)
+ endif()
endif()
if(LOCAL_COVERAGE_TEST)
ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
@@ -296,7 +299,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") endif()
endif(NOT LOCAL_SKIP_TEST)
- if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
+ if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
##-----------------------------------------------
## Package the product
##-----------------------------------------------
@@ -308,7 +311,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") )
file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
if(cpackResult GREATER 0)
- message (FATAL_ERROR "Failed packaging: ${cpackResult}\n")
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
endif()
- endif(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
+ endif()
#-----------------------------------------------------------------------------
|