Merge lp:~pete-woods/unity-voice/enable-tests into lp:unity-voice

Proposed by Pete Woods
Status: Merged
Approved by: Antti Kaijanmäki
Approved revision: 24
Merged at revision: 26
Proposed branch: lp:~pete-woods/unity-voice/enable-tests
Merge into: lp:unity-voice
Diff against target: 74 lines (+12/-13)
4 files modified
CMakeLists.txt (+6/-8)
build.sh (+2/-1)
debian/rules (+0/-3)
tests/CMakeLists.txt (+4/-1)
To merge this branch: bzr merge lp:~pete-woods/unity-voice/enable-tests
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+197724@code.launchpad.net

Commit message

Enable unit tests during debian package build

Description of the change

Enable unit tests during debian package build

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-08-23 09:09:58 +0000
3+++ CMakeLists.txt 2013-12-04 15:17:08 +0000
4@@ -11,7 +11,7 @@
5
6 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
7
8-option(ENABLE_TESTS "Determine if tests will be run" ON)
9+option(ENABLE_VOICE_TESTS "Determine if voice tests will be run" OFF)
10
11 find_package(PkgConfig REQUIRED)
12
13@@ -72,13 +72,11 @@
14 add_subdirectory("src")
15 add_subdirectory("data")
16
17-if(${ENABLE_TESTS})
18- enable_testing()
19- ADD_CUSTOM_TARGET(
20- check
21- ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure
22- )
23-endif()
24+enable_testing()
25+ADD_CUSTOM_TARGET(
26+ check
27+ ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure
28+)
29
30 add_subdirectory(tests)
31
32
33=== modified file 'build.sh'
34--- build.sh 2013-08-22 17:19:46 +0000
35+++ build.sh 2013-12-04 15:17:08 +0000
36@@ -64,6 +64,7 @@
37 cd $BUILDDIR
38 cmake "$SOURCEDIR" -G "$GENERATOR" \
39 -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
40- -DCMAKE_INSTALL_PREFIX="$SOURCEDIR/../$BRANCHNAME-install"
41+ -DCMAKE_INSTALL_PREFIX="$SOURCEDIR/../$BRANCHNAME-install" \
42+ -DENABLE_VOICE_TESTS=ON
43 $BUILD_COMMAND
44 )
45
46=== modified file 'debian/rules'
47--- debian/rules 2013-08-22 21:04:44 +0000
48+++ debian/rules 2013-12-04 15:17:08 +0000
49@@ -6,6 +6,3 @@
50 %:
51 dh $@ --parallel --fail-missing
52
53-override_dh_auto_configure:
54- dh_auto_configure -- -DENABLE_TESTS=NO
55-
56
57=== modified file 'tests/CMakeLists.txt'
58--- tests/CMakeLists.txt 2013-11-19 11:19:31 +0000
59+++ tests/CMakeLists.txt 2013-12-04 15:17:08 +0000
60@@ -20,10 +20,13 @@
61 set(
62 UNIT_TESTS_SRC
63 TestPronounceDict.cpp
64- TestVoiceService.cpp
65 main.cpp
66 )
67
68+if(${ENABLE_VOICE_TESTS})
69+ list(APPEND UNIT_TESTS_SRC TestVoiceService.cpp)
70+endif()
71+
72 add_executable(
73 unit-tests
74 ${UNIT_TESTS_SRC}

Subscribers

People subscribed via source and target branches

to all changes: