Mir

Merge lp:~alan-griffiths/mir/fix-gmock-detection into lp:mir

Proposed by Alan Griffiths on 2017-10-16
Status: Superseded
Proposed branch: lp:~alan-griffiths/mir/fix-gmock-detection
Merge into: lp:mir
Diff against target: 180 lines (+21/-17)
10 files modified
benchmarks/frame-uniformity/CMakeLists.txt (+2/-3)
cmake/FindGtestGmock.cmake (+8/-1)
debian/control (+1/-0)
tests/CMakeLists.txt (+1/-1)
tests/integration-tests/CMakeLists.txt (+1/-2)
tests/mir_test_doubles/CMakeLists.txt (+2/-2)
tests/mir_test_framework/CMakeLists.txt (+2/-2)
tests/performance-tests/CMakeLists.txt (+1/-1)
tests/unit-tests/CMakeLists.txt (+2/-4)
tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-gmock-detection
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing on 2017-10-16
Mir development team 2017-10-16 Pending
Review via email: mp+332285@code.launchpad.net

Commit message

Fix gmock detection in cmake.

At some point since xenial cmake-extras gained a script for finding gmock and gtest. We can use that for most build platforms.

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4291
https://mir-jenkins.ubuntu.com/job/mir-ci/3728/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5121/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5359
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5346
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5346
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5346
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5165/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5165
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5165/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5165
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5165/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5165/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5165
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5165/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5165/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5165/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5165/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3728/rebuild

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4292
https://mir-jenkins.ubuntu.com/job/mir-ci/3729/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5122/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5360
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5347
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5347
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5347
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5166
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5166/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5166
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5166/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5166
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5166/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5166
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5166/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5166
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5166/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5166/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5166/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5166
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5166/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3729/rebuild

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4293
https://mir-jenkins.ubuntu.com/job/mir-ci/3730/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5123/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5361
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5348
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5348
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5348
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5167
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5167/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5167
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5167/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5167
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5167/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5167
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5167/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5167
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5167/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5167/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5167/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5167
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5167/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3730/rebuild

review: Needs Fixing (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

14:16:34 /usr/lib/gcc-cross/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld.gold: error: ../../gmock/gtest/libgtest.a(gtest-all.cc.o): incompatible target

What have I changed that can cause this?

4290. By Alan Griffiths on 2017-10-16

mir_demo_client_wayland: Fix link options (LP: #1723971)

Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4294
https://mir-jenkins.ubuntu.com/job/mir-ci/3731/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5124/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5362
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5349
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5349
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5349
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5168
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5168/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5168
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5168/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5168
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5168/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5168
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5168/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5168
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5168/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5168/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5168/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5168
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5168/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3731/rebuild

review: Needs Fixing (continuous-integration)
4291. By Alan Griffiths on 2017-10-16

Fix another chroot weirdness

4292. By Alan Griffiths on 2017-10-16

merge lp:~alan-griffiths/mir/fix-gmock-detection

4293. By Alan Griffiths on 2017-10-17

Add another way of detecting cross compilation (and some debug messages)

4294. By Alan Griffiths on 2017-10-17

merge :parent

4295. By Alan Griffiths on 2017-10-17

Remove debug messages and simplify logic

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'benchmarks/frame-uniformity/CMakeLists.txt'
2--- benchmarks/frame-uniformity/CMakeLists.txt 2017-08-25 06:41:20 +0000
3+++ benchmarks/frame-uniformity/CMakeLists.txt 2017-10-16 14:07:35 +0000
4@@ -28,7 +28,7 @@
5 mirserver
6 mirclient
7 mirplatform
8-
9+
10 mir-test-assist
11
12 # needed for fake_event_hub_server_configuration.h (which relies on private APIs)
13@@ -39,7 +39,6 @@
14
15 ${Boost_LIBRARIES}
16 ${GTEST_BOTH_LIBRARIES}
17- ${GMOCK_LIBRARY}
18- ${GMOCK_MAIN_LIBRARY}
19+ ${GMOCK_LIBRARIES}
20 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
21 )
22
23=== modified file 'cmake/FindGtestGmock.cmake'
24--- cmake/FindGtestGmock.cmake 2017-09-07 05:58:13 +0000
25+++ cmake/FindGtestGmock.cmake 2017-10-16 14:07:35 +0000
26@@ -1,6 +1,12 @@
27 include(ExternalProject)
28 include(FindPackageHandleStandardArgs)
29
30+if (NOT MIR_CHROOT)
31+ find_package(GMock REQUIRED)
32+ if (NOT TARGET GMock)
33+ add_custom_target(GMock DEPENDS gmock)
34+ endif()
35+else()
36 #
37 # When cross compiling MIR_CHROOT points to our chroot.
38 # When not cross compiling, it should be blank to use the host system.
39@@ -89,8 +95,9 @@
40 set(GTEST_LIBRARY ${GTEST_BINARY_DIR}/libgtest.a)
41 set(GTEST_MAIN_LIBRARY ${GTEST_BINARY_DIR}/libgtest_main.a)
42 set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
43-set(GTEST_ALL_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES})
44+set(GMOCK_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES})
45
46 find_package_handle_standard_args(GTest DEFAULT_MSG
47 GMOCK_INCLUDE_DIR
48 GTEST_INCLUDE_DIR)
49+endif()
50
51=== modified file 'debian/control'
52--- debian/control 2017-10-11 15:49:20 +0000
53+++ debian/control 2017-10-16 14:07:35 +0000
54@@ -4,6 +4,7 @@
55 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
56 XSBC-Original-Maintainer: Thomas Voß <thomas.voss@canonical.com>
57 Build-Depends: cmake,
58+ cmake-extras,
59 pkg-config,
60 debhelper (>= 9),
61 doxygen,
62
63=== modified file 'tests/CMakeLists.txt'
64--- tests/CMakeLists.txt 2017-09-18 10:57:00 +0000
65+++ tests/CMakeLists.txt 2017-10-16 14:07:35 +0000
66@@ -109,9 +109,9 @@
67 mir-test-doubles-platform-static
68 ${Boost_LIBRARIES}
69 ${GTEST_BOTH_LIBRARIES}
70- ${GMOCK_LIBRARY}
71 PRIVATE
72 ${GMOCK_MAIN_LIBRARY}
73+ ${GMOCK_LIBRARIES}
74 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
75 )
76
77
78=== modified file 'tests/integration-tests/CMakeLists.txt'
79--- tests/integration-tests/CMakeLists.txt 2017-08-25 06:41:20 +0000
80+++ tests/integration-tests/CMakeLists.txt 2017-10-16 14:07:35 +0000
81@@ -69,8 +69,7 @@
82
83 ${Boost_LIBRARIES}
84 ${GTEST_BOTH_LIBRARIES}
85- ${GMOCK_LIBRARY}
86- ${GMOCK_MAIN_LIBRARY}
87+ ${GMOCK_LIBRARIES}
88 # Mesa platform dependencies
89 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
90 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
91
92=== modified file 'tests/mir_test_doubles/CMakeLists.txt'
93--- tests/mir_test_doubles/CMakeLists.txt 2017-08-25 06:41:20 +0000
94+++ tests/mir_test_doubles/CMakeLists.txt 2017-10-16 14:07:35 +0000
95@@ -86,7 +86,7 @@
96 mirserver
97
98 ${Boost_LIBRARIES}
99- ${GMOCK_LIBRARY}
100+ ${GMOCK_LIBRARIES}
101 ${GMOCK_MAIN_LIBRARY}
102 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
103 )
104@@ -104,7 +104,7 @@
105 mir-test-doubles-platform-static
106
107 -ldl
108- ${GMOCK_LIBRARY}
109+ ${GMOCK_LIBRARIES}
110 ${GMOCK_MAIN_LIBRARY}
111 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
112 )
113
114=== modified file 'tests/mir_test_framework/CMakeLists.txt'
115--- tests/mir_test_framework/CMakeLists.txt 2017-09-25 13:39:41 +0000
116+++ tests/mir_test_framework/CMakeLists.txt 2017-10-16 14:07:35 +0000
117@@ -85,11 +85,11 @@
118
119 target_link_libraries(mir-test-framework-static
120
121+ mirserver
122 mirclient
123 ${Boost_LIBRARIES}
124 ${GTEST_BOTH_LIBRARIES}
125- ${GMOCK_LIBRARY}
126- ${GMOCK_MAIN_LIBRARY}
127+ ${GMOCK_LIBRARIES}
128 ${UMOCKDEV_LIBRARIES}
129 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
130 )
131
132=== modified file 'tests/performance-tests/CMakeLists.txt'
133--- tests/performance-tests/CMakeLists.txt 2017-09-18 10:57:00 +0000
134+++ tests/performance-tests/CMakeLists.txt 2017-10-16 14:07:35 +0000
135@@ -28,8 +28,8 @@
136 test_compositor.cpp
137 )
138 target_link_libraries(mir_compositor_performance_test
139+ mir_system_performance_test
140 ${GTEST_BOTH_LIBRARIES}
141- mir_system_performance_test
142 )
143
144 mir_add_wrapped_executable(mir_client_startup_performance_test
145
146=== modified file 'tests/unit-tests/CMakeLists.txt'
147--- tests/unit-tests/CMakeLists.txt 2017-09-07 05:58:13 +0000
148+++ tests/unit-tests/CMakeLists.txt 2017-10-16 14:07:35 +0000
149@@ -136,8 +136,7 @@
150
151 ${PROTOBUF_LITE_LIBRARIES}
152 ${GTEST_BOTH_LIBRARIES}
153- ${GMOCK_LIBRARY}
154- ${GMOCK_MAIN_LIBRARY}
155+ ${GMOCK_LIBRARIES}
156 ${Boost_LIBRARIES}
157 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
158 )
159@@ -176,8 +175,7 @@
160
161 ${PROTOBUF_LITE_LIBRARIES}
162 ${GTEST_BOTH_LIBRARIES}
163- ${GMOCK_LIBRARY}
164- ${GMOCK_MAIN_LIBRARY}
165+ ${GMOCK_LIBRARIES}
166 ${Boost_LIBRARIES}
167 ${UMOCKDEV_LIBRARIES}
168 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
169
170=== modified file 'tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp'
171--- tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-08-25 06:41:20 +0000
172+++ tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-10-16 14:07:35 +0000
173@@ -155,7 +155,7 @@
174 auto edid_size = mir_output_get_edid_size(output);
175
176 ASSERT_NE(nullptr, edid_start);
177- ASSERT_NE(0, edid_size);
178+ ASSERT_NE(0u, edid_size);
179
180 std::vector<uint8_t> host_edid(edid_start, edid_start+edid_size);
181

Subscribers

People subscribed via source and target branches