Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
SuperElastix
Commits
4e9acf46
Commit
4e9acf46
authored
Jan 23, 2018
by
Floris Berendsen
Browse files
WIP: differentiate Build and Test CTest scripts.
WIP: Made build directory working directory
parent
ea0c544a
Changes
3
Hide whitespace changes
Inline
Side-by-side
CTest.cmake
View file @
4e9acf46
...
...
@@ -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
Jenkinsfile
View file @
4e9acf46
...
...
@@ -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'
)
{
...
...
SuperBuild/CTest.cmake
View file @
4e9acf46
...
...
@@ -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
}
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment