Skip to content

Commit 81e21e5

Browse files
committed
Inital implementation of test submission to CDash using OTB Dash server. Use make Experimental to submit your tests.
1 parent 454de5e commit 81e21e5

File tree

4 files changed

+110
-0
lines changed

4 files changed

+110
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,15 @@ ENDIF(WITH_DESKTOP)
237237
IF (ENABLE_TESTS)
238238
SET( QT_USE_QTTEST TRUE )
239239
ENABLE_TESTING()
240+
# Adds some testing specific build targets e.g. make Experimental
241+
INCLUDE(Dart)
240242
# Define "make check" as alias for "make test" - thanks geos :-)
241243
add_custom_target(check COMMAND ctest --output-on-failure)
244+
# Additional test configuration options e.g. max upload size of test report
245+
CONFIGURE_FILE(
246+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_templates/CTestCustom.cmake.in"
247+
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake"
248+
IMMEDIATE @ONLY)
242249
# For server side testing we have no X, we can use xfvb as a fake x
243250
# sudo apt-get install xfvb
244251
add_custom_target(check-no-x COMMAND xvfb-run --server-args="-screen 10,1024x768x24" ctest --output-on-failure)

CTestConfig.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## This file should be placed in the root directory of your project.
2+
## Then modify the CMakeLists.txt file in the root directory of your
3+
## project to incorporate the testing dashboard.
4+
## # The following are required to uses Dart and the Cdash dashboard
5+
## ENABLE_TESTING()
6+
## INCLUDE(CTest)
7+
set(CTEST_PROJECT_NAME "QGIS")
8+
set(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
9+
10+
set(CTEST_DROP_METHOD "http")
11+
set(CTEST_DROP_SITE "dash.orfeo-toolbox.org")
12+
set(CTEST_DROP_LOCATION "/submit.php?project=QGIS")
13+
set(CTEST_DROP_SITE_CDASH TRUE)

cmake_templates/CTestCustom.cmake.in

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#
2+
# Note that the ITK/CMakeLists.txt file configures this file
3+
#
4+
# CMake/CTestCustom.cmake.in
5+
#
6+
# to this file
7+
#
8+
# ${ITK_BINARY_DIR}/CTestCustom.cmake
9+
#
10+
#----------------------------------------------------------------------
11+
#
12+
# For further details regarding this file,
13+
# see http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
14+
#
15+
# and
16+
# http://www.kitware.com/blog/home/post/27
17+
#
18+
#----------------------------------------------------------------------
19+
20+
SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1000000)
21+
SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300)
22+
SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 50)
23+
24+
25+
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
26+
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
27+
28+
# Exclude try_compile sources from coverage results:
29+
"/CMakeFiles/CMakeTmp/"
30+
31+
# Exclude files from the Examples directories
32+
#".*/Examples/.*"
33+
34+
# Exclude files from the ThirdParty Utilities directories
35+
".*/Testing/Utilities/.*"
36+
".*/Utilities/.*"
37+
38+
# Exclude SWIG wrappers files
39+
".*/Code/Wrappers/SWIG/otbApplicationPYTHON_wrap.*"
40+
".*/Code/Wrappers/SWIG/otbApplicationJAVA_wrap.*"
41+
)
42+
43+
# warning to ignore via regex expressions
44+
SET(CTEST_CUSTOM_WARNING_EXCEPTION
45+
${CTEST_CUSTOM_WARNING_EXCEPTION}
46+
"vcl_deprecated_header"
47+
"backward_warning"
48+
"Utilities"
49+
"warning LNK4221"
50+
"ranlib:.*file:.*has no symbols"
51+
"ranlib: file: .+ has no symbols"
52+
"ranlib:.*warning for library:.*the table of contents is empty.*no object file members in the library define global symbols.*"
53+
"libtool:.*file:.*has no symbols"
54+
"Fl_Image.H:.*warning:.*dereferencing type-punned pointer will break strict-aliasing rules.*"
55+
"warning -.: directory name .* does not exist"
56+
"ld.*warning.*duplicate dylib.*"
57+
"pyconfig.h:.*warning:.*XOPEN.*SOURCE.*redefined"
58+
)

qgis-test.ctest.example

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
SET (CTEST_SOURCE_DIRECTORY "/home/jmalik/Utils/src/qgis-dev")
2+
SET (CTEST_BINARY_DIRECTORY "/home/jmalik/Utils/build/qgis-dev-system")
3+
4+
SET( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
5+
SET (CTEST_CMAKE_COMMAND "cmake" )
6+
SET (CTEST_BUILD_COMMAND "/usr/bin/make -j3 -i -k" )
7+
SET (CTEST_SITE "jmalik.c-s.fr" )
8+
SET (CTEST_BUILD_NAME "Ubuntu10.10-32bits-Release")
9+
SET (CTEST_BUILD_CONFIGURATION "Release")
10+
11+
12+
SET (INITIAL_CACHE "
13+
BUILDNAME:STRING=${CTEST_BUILD_NAME}
14+
SITE:STRING=${CTEST_SITE}
15+
CTEST_USE_LAUNCHERS:BOOL=ON
16+
")
17+
18+
SET (CTEST_NOTES_FILES
19+
${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}
20+
${CTEST_BINARY_DIRECTORY}/CMakeCache.txt
21+
)
22+
23+
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
24+
ctest_start(Nightly)
25+
ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
26+
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" ${INITIAL_CACHE})
27+
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
28+
ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
29+
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}")
30+
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 3)
31+
ctest_submit ()
32+

0 commit comments

Comments
 (0)