aboutsummaryrefslogtreecommitdiff
path: root/tests/ctest-default.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2010-03-13 21:17:59 +0100
committerAndreas Schneider <mail@cynapses.org>2010-03-13 21:17:59 +0100
commit095f348172433a9493616c1660ad982e2f26c375 (patch)
tree71473a569e5eb5829ff9ce5a3c0f81b25039403a /tests/ctest-default.cmake
parent67c062e45e4afd6d3d032bf9546752ad4471f790 (diff)
downloadlibssh-095f348172433a9493616c1660ad982e2f26c375.tar.gz
libssh-095f348172433a9493616c1660ad982e2f26c375.tar.xz
libssh-095f348172433a9493616c1660ad982e2f26c375.zip
Added a ctest script for nightly builds.
Diffstat (limited to 'tests/ctest-default.cmake')
-rw-r--r--tests/ctest-default.cmake39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/ctest-default.cmake b/tests/ctest-default.cmake
new file mode 100644
index 00000000..a7730700
--- /dev/null
+++ b/tests/ctest-default.cmake
@@ -0,0 +1,39 @@
+set(CTEST_SOURCE_DIRECTORY "$ENV{HOME}/workspace/tmp/dashboards/libssh/source")
+set(CTEST_BINARY_DIRECTORY "$ENV{HOME}/workspace/tmp/dashboards/libssh/build")
+
+set(CTEST_SITE "magrathea.cynapses.org")
+set(CTEST_BUILD_NAME "linux-gcc-default")
+
+set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+set(CTEST_BUILD_CONFIGURATION "Profiling")
+set(CTEST_BUILD_OPTIONS "-DWITH_SSH1=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DWITH_GCRYPT=OFF")
+
+#######################################################################
+
+ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+
+find_program(CTEST_GIT_COMMAND NAMES git)
+find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
+find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+
+set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CTEST_SOURCE_DIRECTORY}/tests/valgrind.supp)
+
+if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone git://git.libssh.org/projects/libssh/libssh.git ${CTEST_SOURCE_DIRECTORY}")
+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}\"")
+
+ctest_start("Nightly")
+ctest_update()
+ctest_configure()
+ctest_build()
+ctest_test()
+ctest_coverage()
+ctest_memcheck()
+ctest_submit()