Merge lp:~dobey/indicator-sound/fix-gtest into lp:indicator-sound

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 546
Merged at revision: 548
Proposed branch: lp:~dobey/indicator-sound/fix-gtest
Merge into: lp:indicator-sound
Diff against target: 170 lines (+11/-30)
4 files modified
CMakeLists.txt (+0/-5)
debian/control (+1/-2)
tests/CMakeLists.txt (+10/-19)
tests/integration/CMakeLists.txt (+0/-4)
To merge this branch: bzr merge lp:~dobey/indicator-sound/fix-gtest
Reviewer Review Type Date Requested Status
Pete Woods (community) Approve
unity-api-1-bot continuous-integration Needs Fixing
Review via email: mp+316638@code.launchpad.net

Commit message

Use only the gmock module from cmake-extras.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Pete Woods (pete-woods) :
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 2016-02-12 19:36:10 +0000
3+++ CMakeLists.txt 2017-02-07 21:29:28 +0000
4@@ -78,10 +78,5 @@
5 add_subdirectory(src)
6
7 enable_testing()
8-
9-set (GTEST_SOURCE_DIR /usr/src/gtest/src)
10-set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
11-set (GTEST_LIBS -lpthread)
12-
13 add_subdirectory(tests)
14
15
16=== modified file 'debian/control'
17--- debian/control 2017-01-09 14:18:03 +0000
18+++ debian/control 2017-02-07 21:29:28 +0000
19@@ -11,7 +11,7 @@
20 dh-translations,
21 gir1.2-accountsservice-1.0,
22 gnome-common,
23- google-mock (>= 1.6.0+svn437),
24+ googletest | google-mock (>= 1.6.0+svn437),
25 gsettings-ubuntu-schemas,
26 autotools-dev,
27 valac (>= 0.20),
28@@ -19,7 +19,6 @@
29 libdbustest1-dev (>= 15.04.0),
30 libgirepository1.0-dev,
31 libglib2.0-dev (>= 2.32.0),
32- libgtest-dev,
33 libqtdbusmock1-dev (>= 0.3),
34 libqtdbustest1-dev,
35 libunity-api-dev,
36
37=== modified file 'tests/CMakeLists.txt'
38--- tests/CMakeLists.txt 2016-01-07 05:32:06 +0000
39+++ tests/CMakeLists.txt 2017-02-07 21:29:28 +0000
40@@ -1,14 +1,5 @@
41-
42-###########################
43-# Google Test
44-###########################
45-
46-include_directories(${GTEST_INCLUDE_DIR})
47-
48-add_library (gtest-static STATIC
49- ${GTEST_SOURCE_DIR}/gtest-all.cc
50- ${GTEST_SOURCE_DIR}/gtest_main.cc)
51-target_link_libraries(gtest-static ${GTEST_LIBS})
52+find_package(GMock)
53+include_directories(${GMOCK_INCLUDE_DIRS})
54
55 ###########################
56 # GSettings Schema
57@@ -141,7 +132,7 @@
58
59 include_directories(${CMAKE_SOURCE_DIR}/src)
60 add_executable (name-watch-test name-watch-test.cc ${CMAKE_SOURCE_DIR}/src/bus-watch-namespace.c)
61-target_link_libraries (name-watch-test gtest-static ${SOUNDSERVICE_LIBRARIES})
62+target_link_libraries (name-watch-test ${SOUNDSERVICE_LIBRARIES} ${GMOCK_LIBRARIES})
63 add_test(name-watch-test name-watch-test)
64
65 ###########################
66@@ -154,9 +145,9 @@
67 accounts-service-user-test
68 indicator-sound-service-lib
69 vala-mocks-lib
70- gtest-static
71 ${SOUNDSERVICE_LIBRARIES}
72 ${TEST_LIBRARIES}
73+ ${GMOCK_LIBRARIES}
74 )
75
76 # Split tests to work around libaccountservice sucking
77@@ -179,8 +170,8 @@
78 indicator-sound-service-lib
79 vala-mocks-lib
80 pulse-mock
81- gtest-static
82 ${TEST_LIBRARIES}
83+ ${GMOCK_LIBRARIES}
84 )
85
86 add_test(volume-control-test volume-control-test)
87@@ -195,9 +186,9 @@
88 sound-menu-test
89 indicator-sound-service-lib
90 vala-mocks-lib
91- gtest-static
92 ${SOUNDSERVICE_LIBRARIES}
93 ${TEST_LIBRARIES}
94+ ${GMOCK_LIBRARIES}
95 )
96
97 add_test(sound-menu-test sound-menu-test)
98@@ -213,9 +204,9 @@
99 indicator-sound-service-lib
100 vala-mocks-lib
101 pulse-mock
102- gtest-static
103 ${SOUNDSERVICE_LIBRARIES}
104 ${TEST_LIBRARIES}
105+ ${GMOCK_LIBRARIES}
106 )
107
108 add_test(notifications-test notifications-test)
109@@ -230,9 +221,9 @@
110 media-player-user-test
111 indicator-sound-service-lib
112 vala-mocks-lib
113- gtest-static
114 ${SOUNDSERVICE_LIBRARIES}
115 ${TEST_LIBRARIES}
116+ ${GMOCK_LIBRARIES}
117 )
118
119 # Split tests to work around libaccountservice sucking
120@@ -256,9 +247,9 @@
121 greeter-list-test
122 indicator-sound-service-lib
123 vala-mocks-lib
124- gtest-static
125 ${SOUNDSERVICE_LIBRARIES}
126 ${TEST_LIBRARIES}
127+ ${GMOCK_LIBRARIES}
128 )
129
130 # Split tests to work around libaccountservice sucking
131@@ -280,9 +271,9 @@
132 add_executable (indicator-test indicator-test.cc gschemas.compiled)
133 target_link_libraries (
134 indicator-test
135- gtest-static
136 ${SOUNDSERVICE_LIBRARIES}
137 ${TEST_LIBRARIES}
138+ ${GMOCK_LIBRARIES}
139 )
140
141 # Split tests to work around libaccountservice sucking
142
143=== modified file 'tests/integration/CMakeLists.txt'
144--- tests/integration/CMakeLists.txt 2016-12-09 12:07:28 +0000
145+++ tests/integration/CMakeLists.txt 2017-02-07 21:29:28 +0000
146@@ -1,8 +1,6 @@
147 set(CMAKE_AUTOMOC ON)
148 set(CMAKE_INCLUDE_CURRENT_DIR ON)
149
150-find_package(GMock)
151-
152 #pkg_check_modules(GMENUHARNESS REQUIRED libgmenuharness REQUIRED)
153 #include_directories(${GMENUHARNESS_INCLUDE_DIRS})
154 include_directories("${CMAKE_SOURCE_DIR}/include")
155@@ -21,7 +19,6 @@
156
157 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
158 include_directories(${GMOCK_INCLUDE_DIRS})
159-include_directories(${GTEST_INCLUDE_DIRS})
160
161 include_directories("${CMAKE_SOURCE_DIR}/tests/dbus-types")
162 include_directories("${CMAKE_BINARY_DIR}/tests/dbus-types")
163@@ -71,7 +68,6 @@
164 sound-indicator-dbus-interfaces
165 ${QTDBUSMOCK_LDFLAGS}
166 ${QTDBUSTEST_LDFLAGS}
167- ${GTEST_LIBRARIES}
168 ${GMOCK_LIBRARIES}
169 # ${GMENUHARNESS_LDFLAGS}
170 ${GLIB_LDFLAGS}

Subscribers

People subscribed via source and target branches