Merge lp:~dobey/unity-scope-click/move-wc into lp:unity-scope-click/devel

Proposed by dobey
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 274
Merged at revision: 274
Proposed branch: lp:~dobey/unity-scope-click/move-wc
Merge into: lp:unity-scope-click/devel
Diff against target: 278 lines (+26/-24)
16 files modified
CMakeLists.txt (+3/-3)
libclickscope/click/CMakeLists.txt (+3/-0)
libclickscope/click/webclient.h (+1/-1)
libclickscope/tests/CMakeLists.txt (+3/-0)
libclickscope/tests/test_webclient.cpp (+1/-2)
scope/click/CMakeLists.txt (+0/-2)
scope/click/download-manager.cpp (+1/-1)
scope/click/download-manager.h (+1/-2)
scope/click/index.h (+1/-1)
scope/click/reviews.cpp (+2/-0)
scope/click/reviews.h (+1/-2)
scope/click/scope.h (+1/-1)
scope/tests/CMakeLists.txt (+0/-2)
scope/tests/test_download_manager.cpp (+1/-1)
scope/tests/test_index.cpp (+4/-4)
scope/tests/test_reviews.cpp (+3/-2)
To merge this branch: bzr merge lp:~dobey/unity-scope-click/move-wc
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+220844@code.launchpad.net

Commit message

Fix the test rules to properly run the libclickscope tests.
Move the webclient code to the library.
Move the Ubuntu One credentials wrapper code to the library.

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
Alejandro J. Cura (alecu) wrote :

Looks good to me.

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 2014-05-21 17:12:50 +0000
3+++ CMakeLists.txt 2014-05-23 19:07:49 +0000
4@@ -69,7 +69,7 @@
5
6 # Custom targets for the tests
7 add_custom_target (test
8- DEPENDS test-click-scope
9+ DEPENDS test-click-scope test-libclickscope
10 )
11
12 add_custom_target (test-disabled
13@@ -84,13 +84,13 @@
14
15 # Add a custom target for running the tests under valgrind.
16 add_custom_target (test-valgrind
17- DEPENDS test-click-scope-valgrind
18+ DEPENDS test-click-scope-valgrind test-libclickscope-valgrind
19 )
20
21 # Add a custom target for running the tests under valgrind with the
22 # full leak checks enabled.
23 add_custom_target (test-leaks
24- DEPENDS test-click-scope-leaks
25+ DEPENDS test-click-scope-leaks test-libclickscope-leaks
26 )
27
28 # Also let "make check" and partners work.
29
30=== modified file 'libclickscope/click/CMakeLists.txt'
31--- libclickscope/click/CMakeLists.txt 2014-05-20 19:33:41 +0000
32+++ libclickscope/click/CMakeLists.txt 2014-05-23 19:07:49 +0000
33@@ -13,10 +13,13 @@
34 key_file_locator.cpp
35 network_access_manager.cpp
36 smartconnect.cpp
37+ ubuntuone_credentials.cpp
38+ webclient.cpp
39 )
40
41 include_directories(
42 ${JSON_CPP_INCLUDE_DIRS}
43+ ${CMAKE_SOURCE_DIR}/libclickscope
44 )
45
46 target_link_libraries (${SCOPE_LIB_NAME}
47
48=== renamed file 'scope/click/ubuntuone_credentials.cpp' => 'libclickscope/click/ubuntuone_credentials.cpp'
49=== renamed file 'scope/click/ubuntuone_credentials.h' => 'libclickscope/click/ubuntuone_credentials.h'
50=== renamed file 'scope/click/webclient.cpp' => 'libclickscope/click/webclient.cpp'
51=== renamed file 'scope/click/webclient.h' => 'libclickscope/click/webclient.h'
52--- scope/click/webclient.h 2014-05-01 21:04:23 +0000
53+++ libclickscope/click/webclient.h 2014-05-23 19:07:49 +0000
54@@ -37,7 +37,7 @@
55 #include <QSharedPointer>
56 #include <QUrlQuery>
57
58-#include "ubuntuone_credentials.h"
59+#include <click/ubuntuone_credentials.h>
60
61 namespace click
62 {
63
64=== modified file 'libclickscope/tests/CMakeLists.txt'
65--- libclickscope/tests/CMakeLists.txt 2014-05-20 19:33:41 +0000
66+++ libclickscope/tests/CMakeLists.txt 2014-05-23 19:07:49 +0000
67@@ -16,9 +16,12 @@
68
69 add_executable (${LIBCLICKSCOPE_TESTS_TARGET}
70 mock_network_access_manager.h
71+ mock_ubuntuone_credentials.h
72+ mock_webclient.h
73
74 test_configuration.cpp
75 test_smartconnect.cpp
76+ test_webclient.cpp
77 )
78
79 qt5_use_modules(${LIBCLICKSCOPE_TESTS_TARGET} Core)
80
81=== renamed file 'scope/tests/mock_ubuntuone_credentials.h' => 'libclickscope/tests/mock_ubuntuone_credentials.h'
82=== renamed file 'scope/tests/mock_webclient.h' => 'libclickscope/tests/mock_webclient.h'
83=== renamed file 'scope/tests/test_webclient.cpp' => 'libclickscope/tests/test_webclient.cpp'
84--- scope/tests/test_webclient.cpp 2014-05-20 19:33:41 +0000
85+++ libclickscope/tests/test_webclient.cpp 2014-05-23 19:07:49 +0000
86@@ -32,8 +32,7 @@
87 #include <click/webclient.h>
88
89 #include <tests/mock_network_access_manager.h>
90-
91-#include "mock_ubuntuone_credentials.h"
92+#include <tests/mock_ubuntuone_credentials.h>
93
94 #include <gtest/gtest.h>
95
96
97=== modified file 'scope/click/CMakeLists.txt'
98--- scope/click/CMakeLists.txt 2014-05-20 19:33:41 +0000
99+++ scope/click/CMakeLists.txt 2014-05-23 19:07:49 +0000
100@@ -18,8 +18,6 @@
101 scope_activation.cpp
102 package.cpp
103 preview.cpp
104- ubuntuone_credentials.cpp
105- webclient.cpp
106
107 qtbridge.cpp
108 )
109
110=== modified file 'scope/click/download-manager.cpp'
111--- scope/click/download-manager.cpp 2014-04-16 21:49:04 +0000
112+++ scope/click/download-manager.cpp 2014-05-23 19:07:49 +0000
113@@ -38,7 +38,7 @@
114 #include "qtbridge.h"
115
116 namespace u1 = UbuntuOne;
117-#include <ubuntuone_credentials.h>
118+#include <click/ubuntuone_credentials.h>
119 #include <token.h>
120
121 namespace udm = Ubuntu::DownloadManager;
122
123=== modified file 'scope/click/download-manager.h'
124--- scope/click/download-manager.h 2014-05-20 19:33:41 +0000
125+++ scope/click/download-manager.h 2014-05-23 19:07:49 +0000
126@@ -30,14 +30,13 @@
127 #ifndef CLICK_DOWNLOAD_MANAGER_H
128 #define CLICK_DOWNLOAD_MANAGER_H
129
130-#include "ubuntuone_credentials.h"
131-
132 #include <QDebug>
133 #include <QNetworkReply>
134 #include <QObject>
135 #include <QString>
136
137 #include <click/network_access_manager.h>
138+#include <click/ubuntuone_credentials.h>
139
140 #include <ubuntu/download_manager/manager.h>
141
142
143=== modified file 'scope/click/index.h'
144--- scope/click/index.h 2014-05-19 14:39:39 +0000
145+++ scope/click/index.h 2014-05-23 19:07:49 +0000
146@@ -35,9 +35,9 @@
147 #include <functional>
148
149 #include <click/configuration.h>
150+#include <click/webclient.h>
151
152 #include "package.h"
153-#include "webclient.h"
154
155
156 namespace click {
157
158=== modified file 'scope/click/reviews.cpp'
159--- scope/click/reviews.cpp 2014-05-21 19:44:20 +0000
160+++ scope/click/reviews.cpp 2014-05-23 19:07:49 +0000
161@@ -33,6 +33,8 @@
162 #include <boost/property_tree/json_parser.hpp>
163 #include <boost/foreach.hpp>
164
165+#include <click/configuration.h>
166+
167 #include <json/value.h>
168 #include <json/writer.h>
169
170
171=== modified file 'scope/click/reviews.h'
172--- scope/click/reviews.h 2014-04-29 02:44:28 +0000
173+++ scope/click/reviews.h 2014-05-23 19:07:49 +0000
174@@ -34,8 +34,7 @@
175 #include <string>
176 #include <vector>
177
178-#include "index.h"
179-#include "webclient.h"
180+#include <click/webclient.h>
181
182 namespace click
183 {
184
185=== modified file 'scope/click/scope.h'
186--- scope/click/scope.h 2014-05-20 19:33:41 +0000
187+++ scope/click/scope.h 2014-05-23 19:07:49 +0000
188@@ -31,13 +31,13 @@
189 #define CLICK_SCOPE_H
190
191 #include <click/network_access_manager.h>
192+#include <click/webclient.h>
193
194 #include <unity/scopes/ScopeBase.h>
195 #include <unity/scopes/QueryBase.h>
196 #include <unity/scopes/ActivationQueryBase.h>
197
198 #include "index.h"
199-#include "webclient.h"
200
201 namespace scopes = unity::scopes;
202
203
204=== modified file 'scope/tests/CMakeLists.txt'
205--- scope/tests/CMakeLists.txt 2014-05-21 17:12:50 +0000
206+++ scope/tests/CMakeLists.txt 2014-05-23 19:07:49 +0000
207@@ -18,13 +18,11 @@
208 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_data.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/test_data.cpp)
209
210 add_executable (${CLICKSCOPE_TESTS_TARGET}
211- mock_webclient.h
212 test_download_manager.cpp
213 test_index.cpp
214 test_interface.cpp
215 test_query.cpp
216 test_reviews.cpp
217- test_webclient.cpp
218
219 ${CMAKE_CURRENT_BINARY_DIR}/test_data.cpp
220 )
221
222=== modified file 'scope/tests/test_download_manager.cpp'
223--- scope/tests/test_download_manager.cpp 2014-05-20 19:33:41 +0000
224+++ scope/tests/test_download_manager.cpp 2014-05-23 19:07:49 +0000
225@@ -43,8 +43,8 @@
226
227 #include <click/download-manager.h>
228 #include <tests/mock_network_access_manager.h>
229+#include <tests/mock_ubuntuone_credentials.h>
230
231-#include "mock_ubuntuone_credentials.h"
232 #include "mock_ubuntu_download_manager.h"
233
234 namespace udm = Ubuntu::DownloadManager;
235
236=== modified file 'scope/tests/test_index.cpp'
237--- scope/tests/test_index.cpp 2014-05-21 13:42:45 +0000
238+++ scope/tests/test_index.cpp 2014-05-23 19:07:49 +0000
239@@ -27,13 +27,13 @@
240 * files in the program, then also delete it here.
241 */
242
243-#include "click/index.h"
244-#include "click/webclient.h"
245+#include <click/index.h>
246+#include <click/webclient.h>
247
248 #include <tests/mock_network_access_manager.h>
249+#include <tests/mock_ubuntuone_credentials.h>
250+#include <tests/mock_webclient.h>
251
252-#include "mock_ubuntuone_credentials.h"
253-#include "mock_webclient.h"
254 #include "fake_json.h"
255
256 #include <gtest/gtest.h>
257
258=== modified file 'scope/tests/test_reviews.cpp'
259--- scope/tests/test_reviews.cpp 2014-05-21 19:44:20 +0000
260+++ scope/tests/test_reviews.cpp 2014-05-23 19:07:49 +0000
261@@ -27,14 +27,15 @@
262 * files in the program, then also delete it here.
263 */
264
265+#include <click/configuration.h>
266 #include <click/reviews.h>
267 #include <click/webclient.h>
268
269 #include <tests/mock_network_access_manager.h>
270+#include <tests/mock_ubuntuone_credentials.h>
271+#include <tests/mock_webclient.h>
272
273 #include "fake_json.h"
274-#include "mock_ubuntuone_credentials.h"
275-#include "mock_webclient.h"
276
277 #include <gtest/gtest.h>
278 #include <memory>

Subscribers

People subscribed via source and target branches

to all changes: