2010-12-30 14:12:06 +03:00
|
|
|
## The directory to run ctest in.
|
2010-12-19 14:49:04 +03:00
|
|
|
set(CTEST_DIRECTORY "$ENV{HOME}/workspace/tmp/dashboards/libssh")
|
2010-03-13 23:17:59 +03:00
|
|
|
|
2010-12-30 14:12:06 +03:00
|
|
|
## The hostname of the machine
|
2010-03-15 18:07:55 +03:00
|
|
|
set(CTEST_SITE "host.libssh.org")
|
2010-12-30 14:12:06 +03:00
|
|
|
## The buildname
|
|
|
|
set(CTEST_BUILD_NAME "Linux_2.6-GCC_4.5-x86_64-default")
|
2010-03-13 23:17:59 +03:00
|
|
|
|
2010-12-30 14:12:06 +03:00
|
|
|
## The Makefile generator to use
|
2010-03-13 23:17:59 +03:00
|
|
|
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
|
2010-12-30 14:12:06 +03:00
|
|
|
|
|
|
|
## The Build configuration to use.
|
2010-12-30 13:55:13 +03:00
|
|
|
set(CTEST_BUILD_CONFIGURATION "Debug")
|
|
|
|
|
2010-12-30 14:12:06 +03:00
|
|
|
## The build options for the project
|
2010-12-15 21:15:02 +03:00
|
|
|
set(CTEST_BUILD_OPTIONS "-DWITH_TESTING=ON -DWITH_SSH1=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DWITH_GCRYPT=OFF")
|
2010-03-13 23:17:59 +03:00
|
|
|
|
2010-12-19 18:30:23 +03:00
|
|
|
#set(CTEST_CUSTOM_MEMCHECK_IGNORE torture_rand)
|
2010-12-21 16:43:14 +03:00
|
|
|
|
2010-12-30 14:12:06 +03:00
|
|
|
## The Model to set: Nightly, Continous, Experimental
|
|
|
|
set(CTEST_MODEL "Experimental")
|
|
|
|
|
2011-02-12 21:46:47 +03:00
|
|
|
## The branch
|
|
|
|
#set(CTEST_GIT_BRANCH "--branch v0-5")
|
|
|
|
|
2010-12-30 14:12:06 +03:00
|
|
|
## Wether to enable memory checking.
|
2010-03-15 18:07:55 +03:00
|
|
|
set(WITH_MEMCHECK FALSE)
|
2010-12-30 14:12:06 +03:00
|
|
|
|
|
|
|
## Wether to enable code coverage.
|
2010-03-15 18:07:55 +03:00
|
|
|
set(WITH_COVERAGE FALSE)
|
|
|
|
|
2010-03-13 23:17:59 +03:00
|
|
|
#######################################################################
|
|
|
|
|
2010-12-30 13:55:13 +03:00
|
|
|
if (WITH_COVERAGE AND NOT WIN32)
|
|
|
|
set(CTEST_BUILD_CONFIGURATION "Profiling")
|
|
|
|
endif (WITH_COVERAGE AND NOT WIN32)
|
|
|
|
|
2010-12-30 14:12:06 +03:00
|
|
|
set(CTEST_SOURCE_DIRECTORY "${CTEST_DIRECTORY}/${CTEST_BUILD_NAME}/source")
|
|
|
|
set(CTEST_BINARY_DIRECTORY "${CTEST_DIRECTORY}/${CTEST_BUILD_NAME}/build")
|
|
|
|
|
|
|
|
set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/tests/valgrind.supp)
|
2010-03-13 23:17:59 +03:00
|
|
|
|
|
|
|
find_program(CTEST_GIT_COMMAND NAMES git)
|
|
|
|
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
|
|
|
|
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
|
|
|
|
|
|
|
|
if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
|
2011-02-12 21:46:47 +03:00
|
|
|
set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone ${CTEST_GIT_BRANCH} git://git.libssh.org/projects/libssh.git ${CTEST_SOURCE_DIRECTORY}")
|
2010-03-13 23:17:59 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
|
|
|
|
|
|
|
|
set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}")
|
|
|
|
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}\"")
|
|
|
|
|
2010-12-30 14:12:06 +03:00
|
|
|
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
|
|
|
|
|
|
|
|
ctest_start(${CTEST_MODEL} TRACK ${CTEST_MODEL})
|
2011-08-21 16:08:40 +04:00
|
|
|
ctest_update(SOURCE ${CTEST_SOURCE_DIRECTORY})
|
|
|
|
ctest_configure(BUILD ${CTEST_BINARY_DIRECTORY})
|
|
|
|
ctest_build(BUILD ${CTEST_BINARY_DIRECTORY})
|
|
|
|
ctest_test(BUILD ${CTEST_BINARY_DIRECTORY})
|
2010-03-15 18:07:55 +03:00
|
|
|
if (WITH_MEMCHECK AND CTEST_COVERAGE_COMMAND)
|
2011-08-21 16:08:40 +04:00
|
|
|
ctest_coverage(BUILD ${CTEST_BINARY_DIRECTORY})
|
2010-03-15 18:07:55 +03:00
|
|
|
endif (WITH_MEMCHECK AND CTEST_COVERAGE_COMMAND)
|
|
|
|
if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
|
2011-08-21 16:08:40 +04:00
|
|
|
ctest_memcheck(BUILD ${CTEST_BINARY_DIRECTORY})
|
2010-03-15 18:07:55 +03:00
|
|
|
endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
|
2010-03-13 23:17:59 +03:00
|
|
|
ctest_submit()
|