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

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 162
Merged at revision: 163
Proposed branch: lp:~dobey/indicator-location/fix-gtest
Merge into: lp:indicator-location
Diff against target: 87 lines (+11/-27)
4 files modified
CMakeLists.txt (+0/-3)
INSTALL (+1/-1)
debian/control (+2/-1)
tests/CMakeLists.txt (+8/-22)
To merge this branch: bzr merge lp:~dobey/indicator-location/fix-gtest
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Ted Gould (community) Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+316602@code.launchpad.net

Commit message

Use 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 :

PASSED: Continuous integration, rev:162
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-location-ci/4/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1618
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1625
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1403
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1403/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1403
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1403/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1403
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1403/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1403
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1403/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1403
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1403/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1403
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1403/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-location-ci/4/rebuild

review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) :
review: Approve
Revision history for this message
Charles Kerr (charlesk) :
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-05-24 11:22:19 +0000
3+++ CMakeLists.txt 2017-02-07 19:04:44 +0000
4@@ -81,9 +81,6 @@
5
6 # testing & coverage
7 if (${enable_tests})
8- set (GTEST_SOURCE_DIR /usr/src/gtest/src)
9- set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
10- set (GTEST_LIBS -lpthread)
11 enable_testing ()
12 if (${enable_lcov})
13 include(GCov)
14
15=== modified file 'INSTALL'
16--- INSTALL 2013-08-25 20:31:26 +0000
17+++ INSTALL 2017-02-07 19:04:44 +0000
18@@ -21,7 +21,7 @@
19 - cmake (cmake, 2.8.9 or later)
20 - gcovr (gcovr, 2.4 or later)
21 - lcov (lcov, 1.9 or later)
22- - google test (libgtest-dev, 1.6.0 or later)
23+ - google test (googletest or google-mock, 1.6.0 or later)
24 - ubuntu-platform-api (libubuntu-platform-api1)
25
26 Building the code
27
28=== modified file 'debian/control'
29--- debian/control 2016-07-19 08:47:36 +0000
30+++ debian/control 2017-02-07 19:04:44 +0000
31@@ -3,12 +3,13 @@
32 Priority: optional
33 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
34 Build-Depends: cmake,
35+ cmake-extras (>= 0.10),
36 dbus,
37 debhelper (>= 9),
38 dh-translations,
39+ googletest | google-mock,
40 intltool (>= 0.35.0),
41 libglib2.0-dev (>= 2.36),
42- libgtest-dev,
43 libubuntu-app-launch2-dev,
44 liburl-dispatcher1-dev,
45 python,
46
47=== modified file 'tests/CMakeLists.txt'
48--- tests/CMakeLists.txt 2016-01-22 17:49:24 +0000
49+++ tests/CMakeLists.txt 2017-02-07 19:04:44 +0000
50@@ -1,13 +1,5 @@
51-
52-###
53-### Google Test Framework
54-###
55-
56-add_library (gtest STATIC
57- ${GTEST_SOURCE_DIR}/gtest-all.cc
58- ${GTEST_SOURCE_DIR}/gtest_main.cc)
59-set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR})
60-set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w)
61+find_package (GMock)
62+include_directories (${GMOCK_INCLUDE_DIRS})
63
64 ###
65 ### General setup
66@@ -30,15 +22,9 @@
67 add_executable (${TEST_NAME} ${TEST_NAME}.cc)
68 add_test (${TEST_NAME} ${TEST_NAME})
69 add_dependencies (${TEST_NAME} ${SERVICE_LIB})
70-target_link_libraries (${TEST_NAME} ${SERVICE_LIB} gtest ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS})
71-
72-###
73-### globals
74-###
75-
76-#set_property (TARGET ${ALL_TESTS}
77-# APPEND PROPERTY LINK_LIBRARIES libindicator-location-service gtest ${GTEST_LIBS} ${GCOV_LIBS})
78-#
79-#set_property (TARGET ${ALL_TESTS} gtest
80-# APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR} ${SERVICE_INCLUDE_DIRS} ${GTEST_INCLUDE_DIR})
81-
82+target_link_libraries (${TEST_NAME}
83+ ${SERVICE_LIB}
84+ ${SERVICE_DEPS_LIBRARIES}
85+
86+ ${GMOCK_LIBRARIES}
87+)

Subscribers

People subscribed via source and target branches