changeset 341:2bf23d10bc6f

Change the test system to use ctest more efficiently
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 29 Jun 2010 11:37:44 +0900
parents 81821e9f6988
children adffe87cfb6d
files CMakeLists.txt INSTALL contrib/debian/rules freeDiameter/CMakeLists.txt
diffstat 4 files changed, 8 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Mon Jun 28 11:20:48 2010 +0900
+++ b/CMakeLists.txt	Tue Jun 29 11:37:44 2010 +0900
@@ -16,9 +16,7 @@
 # Version of the API with the library
 SET(FD_PROJECT_VERSION_API 1)
 
-# Some subfolders may have tests
-ENABLE_TESTING()
-# And actually we are now using CTest advanced features such as CDash, so we need this:
+# The test framework, using CTest and CDash.
 INCLUDE(CTest)
 
 # CMake version
--- a/INSTALL	Mon Jun 28 11:20:48 2010 +0900
+++ b/INSTALL	Tue Jun 29 11:37:44 2010 +0900
@@ -17,8 +17,8 @@
 # make edit_cache
 # make
 
-You can enable the unit tests by doing:
-# cmake -DSKIP_TESTS:BOOL=OFF ../
+You can disable the unit tests by doing:
+# cmake -DBUILD_TESTING:BOOL=OFF ../
 # make
 # make tests
 
--- a/contrib/debian/rules	Mon Jun 28 11:20:48 2010 +0900
+++ b/contrib/debian/rules	Tue Jun 29 11:37:44 2010 +0900
@@ -16,14 +16,14 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
-# Uncomment this to run the tests when the package is built
-# compile_the_tests=-DSKIP_TESTS:BOOL=OFF
+# Comment this out if you want to include the tests when the package is built
+skip_the_tests=-DBUILD_TESTING:BOOL=OFF
 
 %:
 	dh  $@
 
 override_dh_auto_configure:
-	dh_auto_configure -- $(compile_the_tests) \
+	dh_auto_configure -- $(skip_the_tests) \
 		-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
 		-DDEFAULT_CONF_PATH:PATH=/etc/freeDiameter \
 		-DBUILD_APP_ACCT:BOOL=ON \
--- a/freeDiameter/CMakeLists.txt	Mon Jun 28 11:20:48 2010 +0900
+++ b/freeDiameter/CMakeLists.txt	Tue Jun 29 11:37:44 2010 +0900
@@ -75,10 +75,9 @@
 TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS})
 
 # The unary tests directory
-OPTION(SKIP_TESTS "Skip compilation of the tests?" ON)
-IF ( NOT SKIP_TESTS )
+IF ( BUILD_TESTING )
 	SUBDIRS(tests)
-ENDIF ( NOT SKIP_TESTS )
+ENDIF ( BUILD_TESTING )
 
 ####
 ## INSTALL section ##
"Welcome to our mercurial repository"