[med-svn] [camp] 01/01: Allows build and execution of unit tests

Corentin Desfarges corentin-guest at moszumanska.debian.org
Thu Sep 11 10:24:16 UTC 2014


This is an automated email from the git hooks/post-receive script.

corentin-guest pushed a commit to branch master
in repository camp.

commit 23c063bfa40940f00dbc913bf3bbcd82663ac9e0
Author: Corentin Desfarges <corentin.desfarges.dev at gmail.com>
Date:   Thu Sep 11 12:21:43 2014 +0200

    Allows build and execution of unit tests
---
 debian/control                                |  4 ++-
 debian/patches/fix_unit_tests_execution.patch | 43 +++++++++++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 5e16912..afb332b 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,9 @@ Section: science
 Priority: optional
 Build-Depends: cmake,
                debhelper (>= 9),
-               libboost-all-dev
+               libboost-dev,
+               libboost-test-dev,
+               libqt4-dev
 Standards-Version: 3.9.5
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/camp.git
 Vcs-Git: git://anonscm.debian.org/debian-med/camp.git
diff --git a/debian/patches/fix_unit_tests_execution.patch b/debian/patches/fix_unit_tests_execution.patch
new file mode 100644
index 0000000..9ffd9cb
--- /dev/null
+++ b/debian/patches/fix_unit_tests_execution.patch
@@ -0,0 +1,43 @@
+Allows build and execution of the unit tests
+--- a/cmake/Config.cmake
++++ b/cmake/Config.cmake
+@@ -20,16 +20,16 @@
+     )
+ endif()
+ 
+-# Set the default test build option to false
++# Set the default test build option to true
+ if(NOT BUILD_TEST)
+-    set(BUILD_TEST FALSE
++    set(BUILD_TEST TRUE
+         CACHE BOOL "TRUE to build the unit tests (requires the Boost Test Library), FALSE otherwise."
+     )
+ endif()
+ 
+-# Set the default test build option to false
++# Set the default test build option to true
+ if(NOT BUILD_TEST_QT)
+-    set(BUILD_TEST_QT FALSE
++    set(BUILD_TEST_QT TRUE
+         CACHE BOOL "TRUE to build the Qt-specific unit tests (requires the Boost Test Library and Qt 4.5), FALSE otherwise."
+     )
+ endif()
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -165,11 +165,16 @@
+     endif()
+ endif()
+ 
++enable_testing()
++
+ # add the test subdirectory, but do not build it by default
+ if(BUILD_TEST)
+     add_subdirectory(test)
+ endif()
+ 
++add_test(NAME test-camp COMMAND camptest)
++add_test(NAME test-camp-qt COMMAND camptest-qt)
++
+ ###############################
+ # doc
+ ###############################
diff --git a/debian/patches/series b/debian/patches/series
index d5f5a11..ad87146 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 add_soname.patch
 rm_boost_version.patch
 remove_licences_files.patch
+fix_unit_tests_execution.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/camp.git



More information about the debian-med-commit mailing list