Commit 4e9acf46 authored by Floris Berendsen's avatar Floris Berendsen

WIP: differentiate Build and Test CTest scripts.

WIP: Made build directory working directory
parent ea0c544a
......@@ -17,9 +17,9 @@
#
#=========================================================================
# Directories relative to the current directory.
set(CTEST_SOURCE_DIRECTORY "src")
set(CTEST_BINARY_DIRECTORY "build")
# Directories relative to the build directory.
set(CTEST_SOURCE_DIRECTORY "../src")
set(CTEST_BINARY_DIRECTORY ".")
set(CTEST_SITE "lkeb-selx01")
......@@ -36,7 +36,7 @@ execute_process (
OUTPUT_VARIABLE SELX_GIT_BRANCH_NAME
)
set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};commit=SHA\\:${SELX_GIT_COMMIT_SHA}")
set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};Tests;commit=SHA\\:${SELX_GIT_COMMIT_SHA}")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_CONFIGURATION Release)
......@@ -45,10 +45,10 @@ set(CTEST_BUILD_OPTIONS "-j4")
set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} --build ${CTEST_BINARY_DIRECTORY}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DWITH_TESTING:BOOL=ON ${CTEST_BUILD_OPTIONS}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-G${CTEST_CMAKE_GENERATOR}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"../${CTEST_SOURCE_DIRECTORY}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
ctest_start("Nightly")
ctest_configure()
ctest_build()
ctest_test()
ctest_submit(RETURN_VALUE 0)
\ No newline at end of file
set( submit_return_value )
ctest_submit( PARTS ctest_test RETURN_VALUE submit_return_value)
message(STATUS "submit_return_value: " ${submit_return_value} )
\ No newline at end of file
......@@ -45,8 +45,8 @@ node('lkeb-vm-test') {
}
}
stage('SuperBuild') {
dir('.') {
sh "`dirname ${ cmake }`/ctest --script src/CTest.cmake"
dir('build') {
sh "`dirname ${ cmake }`/ctest --script ../src/SuperBuild/CTest.cmake"
}
}
stage('Test') {
......
......@@ -17,9 +17,9 @@
#
#=========================================================================
# Directories relative to the current directory.
set(CTEST_SOURCE_DIRECTORY "src")
set(CTEST_BINARY_DIRECTORY "build")
# Directories relative to the build directory.
set(CTEST_SOURCE_DIRECTORY "../src")
set(CTEST_BINARY_DIRECTORY ".")
set(CTEST_SITE "lkeb-selx01")
......@@ -36,7 +36,7 @@ execute_process (
OUTPUT_VARIABLE SELX_GIT_BRANCH_NAME
)
set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};commit=SHA\\:${SELX_GIT_COMMIT_SHA}")
set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};Build;commit=SHA\\:${SELX_GIT_COMMIT_SHA}")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_CONFIGURATION Release)
......@@ -50,5 +50,6 @@ set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"../${CTEST_SOURCE_DIRE
ctest_start("Nightly")
ctest_configure()
ctest_build()
ctest_test()
ctest_submit(RETURN_VALUE 0)
\ No newline at end of file
set( submit_return_value )
ctest_submit( PARTS Configure Build RETURN_VALUE submit_return_value)
message(STATUS "submit_return_value: " ${submit_return_value} )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment