Permalink
Browse files

Inital implementation of test submission to CDash using OTB Dash serv…

…er. Use make Experimental to submit your tests.
  • Loading branch information...
1 parent 454de5e commit 81e21e59fb56b752dfcf88447ed4e4cbdc9e73e0 @timlinux timlinux committed Apr 14, 2012
Showing with 110 additions and 0 deletions.
  1. +7 −0 CMakeLists.txt
  2. +13 −0 CTestConfig.cmake
  3. +58 −0 cmake_templates/CTestCustom.cmake.in
  4. +32 −0 qgis-test.ctest.example
View
@@ -237,8 +237,15 @@ ENDIF(WITH_DESKTOP)
IF (ENABLE_TESTS)
SET( QT_USE_QTTEST TRUE )
ENABLE_TESTING()
+ # Adds some testing specific build targets e.g. make Experimental
+ INCLUDE(Dart)
# Define "make check" as alias for "make test" - thanks geos :-)
add_custom_target(check COMMAND ctest --output-on-failure)
+ # Additional test configuration options e.g. max upload size of test report
+ CONFIGURE_FILE(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_templates/CTestCustom.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake"
+ IMMEDIATE @ONLY)
# For server side testing we have no X, we can use xfvb as a fake x
# sudo apt-get install xfvb
add_custom_target(check-no-x COMMAND xvfb-run --server-args="-screen 10,1024x768x24" ctest --output-on-failure)
View
@@ -0,0 +1,13 @@
+## This file should be placed in the root directory of your project.
+## Then modify the CMakeLists.txt file in the root directory of your
+## project to incorporate the testing dashboard.
+## # The following are required to uses Dart and the Cdash dashboard
+## ENABLE_TESTING()
+## INCLUDE(CTest)
+set(CTEST_PROJECT_NAME "QGIS")
+set(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
+
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "dash.orfeo-toolbox.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=QGIS")
+set(CTEST_DROP_SITE_CDASH TRUE)
@@ -0,0 +1,58 @@
+#
+# Note that the ITK/CMakeLists.txt file configures this file
+#
+# CMake/CTestCustom.cmake.in
+#
+# to this file
+#
+# ${ITK_BINARY_DIR}/CTestCustom.cmake
+#
+#----------------------------------------------------------------------
+#
+# For further details regarding this file,
+# see http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
+#
+# and
+# http://www.kitware.com/blog/home/post/27
+#
+#----------------------------------------------------------------------
+
+SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1000000)
+SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300)
+SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 50)
+
+
+SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
+ ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
+
+ # Exclude try_compile sources from coverage results:
+ "/CMakeFiles/CMakeTmp/"
+
+ # Exclude files from the Examples directories
+ #".*/Examples/.*"
+
+ # Exclude files from the ThirdParty Utilities directories
+ ".*/Testing/Utilities/.*"
+ ".*/Utilities/.*"
+
+ # Exclude SWIG wrappers files
+ ".*/Code/Wrappers/SWIG/otbApplicationPYTHON_wrap.*"
+ ".*/Code/Wrappers/SWIG/otbApplicationJAVA_wrap.*"
+ )
+
+# warning to ignore via regex expressions
+SET(CTEST_CUSTOM_WARNING_EXCEPTION
+ ${CTEST_CUSTOM_WARNING_EXCEPTION}
+ "vcl_deprecated_header"
+ "backward_warning"
+ "Utilities"
+ "warning LNK4221"
+ "ranlib:.*file:.*has no symbols"
+ "ranlib: file: .+ has no symbols"
+ "ranlib:.*warning for library:.*the table of contents is empty.*no object file members in the library define global symbols.*"
+ "libtool:.*file:.*has no symbols"
+ "Fl_Image.H:.*warning:.*dereferencing type-punned pointer will break strict-aliasing rules.*"
+ "warning -.: directory name .* does not exist"
+ "ld.*warning.*duplicate dylib.*"
+ "pyconfig.h:.*warning:.*XOPEN.*SOURCE.*redefined"
+ )
View
@@ -0,0 +1,32 @@
+SET (CTEST_SOURCE_DIRECTORY "/home/jmalik/Utils/src/qgis-dev")
+SET (CTEST_BINARY_DIRECTORY "/home/jmalik/Utils/build/qgis-dev-system")
+
+SET( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
+SET (CTEST_CMAKE_COMMAND "cmake" )
+SET (CTEST_BUILD_COMMAND "/usr/bin/make -j3 -i -k" )
+SET (CTEST_SITE "jmalik.c-s.fr" )
+SET (CTEST_BUILD_NAME "Ubuntu10.10-32bits-Release")
+SET (CTEST_BUILD_CONFIGURATION "Release")
+
+
+SET (INITIAL_CACHE "
+BUILDNAME:STRING=${CTEST_BUILD_NAME}
+SITE:STRING=${CTEST_SITE}
+CTEST_USE_LAUNCHERS:BOOL=ON
+")
+
+SET (CTEST_NOTES_FILES
+${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}
+${CTEST_BINARY_DIRECTORY}/CMakeCache.txt
+)
+
+ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+ctest_start(Nightly)
+ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
+file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" ${INITIAL_CACHE})
+ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
+ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
+ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}")
+ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 3)
+ctest_submit ()
+

0 comments on commit 81e21e5

Please sign in to comment.