Mir

Merge lp:~mir-team/mir/fix-1498829 into lp:mir

Proposed by Brandon Schaefer
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 2976
Proposed branch: lp:~mir-team/mir/fix-1498829
Merge into: lp:mir
Diff against target: 181 lines (+23/-9)
12 files modified
tests/acceptance-tests/test_client_scaling.cpp (+2/-0)
tests/acceptance-tests/test_surface_morphing.cpp (+2/-0)
tests/acceptance-tests/test_surface_specification.cpp (+2/-0)
tests/include/mir/test/doubles/mock_client_buffer_stream.h (+2/-0)
tests/unit-tests/compositor/test_dropping_schedule.cpp (+1/-0)
tests/unit-tests/compositor/test_queueing_schedule.cpp (+1/-0)
tests/unit-tests/dispatch/test_readable_fd.cpp (+1/-0)
tests/unit-tests/graphics/mesa/x11/test_display.cpp (+4/-3)
tests/unit-tests/graphics/mesa/x11/test_platform.cpp (+3/-3)
tests/unit-tests/input/evdev/test_evdev_device_detection.cpp (+1/-0)
tests/unit-tests/input/test_input_event.cpp (+1/-0)
tests/unit-tests/input/test_x11_platform.cpp (+3/-3)
To merge this branch: bzr merge lp:~mir-team/mir/fix-1498829
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
PS Jenkins bot (community) continuous-integration Approve
Daniel van Vugt Approve
Review via email: mp+272185@code.launchpad.net

Commit message

Add #include <gmock/gmock.h> to the missing tests that require the header when no precompiled headers are around.

Description of the change

Add #include <gmock/gmock.h> to the missing tests that require the header when no precompiled headers are around.

To test compile with:
 -DMIR_USE_PRECOMPILED_HEADERS=OFF

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ignore the failure. That's bug 1499134.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

$ make -j6 -k 2>&1 | grep " \*\*\* "
make[2]: *** [tests/unit-tests/CMakeFiles/mir_unit_tests.dir/graphics/mesa/x11/test_display.cpp.o] Error 1
make[2]: *** [tests/unit-tests/CMakeFiles/mir_unit_tests.dir/graphics/mesa/x11/test_platform.cpp.o] Error 1
make[2]: *** [tests/unit-tests/CMakeFiles/mir_unit_tests.dir/input/test_x11_platform.cpp.o] Error 1

Did you disable X11? You should have -DMIR_PLATFORM=mesa-x11;mesa-kms;android

review: Needs Fixing
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Hmm i didnt have those 3 platforms installed, now I do! Fixing

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Hmm soo after re-compiling it all compiles.

Doing a ccmake ..:
 MIR_PLATFORM mesa-kms;android;mesa-x11

So i have them set, not sure why im not hitting those compiling errors.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Hmm but yeah you're right its not getting compiled on my end, when i do:

-DMIR_TEST_PLATFORM=mesa-x11;mesa-ksm;android

it complains about no mesa-x11/android... Need to figure out why, thanks!

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Ok interesting, so w/e you set

-DMIR_PLATFORM=mesa-x11\;mesa-kms\;android

The first platform is what gets set as the MIR_TEST_PLATFORM, so if you do mesa-x11 first mesa-ksm/android platform tests WILL NOT be compiled.

After forcing each platform first, everything seems to compile now!

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

X11 defines None 0L, unless None is defined. So we must include gmock/gtest BEFORE X11 other wise it'll replace None with 0L when it creates the struct None{};

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. I had suspected we were missing these.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/acceptance-tests/test_client_scaling.cpp'
2--- tests/acceptance-tests/test_client_scaling.cpp 2015-09-18 14:28:47 +0000
3+++ tests/acceptance-tests/test_client_scaling.cpp 2015-09-28 19:55:36 +0000
4@@ -28,6 +28,8 @@
5 #include "mir/test/signal.h"
6
7 #include <gtest/gtest.h>
8+#include <gmock/gmock.h>
9+
10
11 namespace mg = mir::graphics;
12 namespace mtf = mir_test_framework;
13
14=== modified file 'tests/acceptance-tests/test_surface_morphing.cpp'
15--- tests/acceptance-tests/test_surface_morphing.cpp 2015-07-29 09:28:52 +0000
16+++ tests/acceptance-tests/test_surface_morphing.cpp 2015-09-28 19:55:36 +0000
17@@ -25,6 +25,8 @@
18 #include "mir/test/signal.h"
19 #include "mir_toolkit/common.h"
20
21+#include <gmock/gmock.h>
22+
23 namespace mf = mir::frontend;
24 namespace mtf = mir_test_framework;
25 namespace ms = mir::scene;
26
27=== modified file 'tests/acceptance-tests/test_surface_specification.cpp'
28--- tests/acceptance-tests/test_surface_specification.cpp 2015-09-16 17:47:45 +0000
29+++ tests/acceptance-tests/test_surface_specification.cpp 2015-09-28 19:55:36 +0000
30@@ -27,6 +27,8 @@
31 #include "mir_toolkit/common.h"
32 #include "mir_toolkit/client_types.h"
33
34+#include <gmock/gmock.h>
35+
36 namespace mev = mir::events;
37 namespace mf = mir::frontend;
38 namespace mtf = mir_test_framework;
39
40=== modified file 'tests/include/mir/test/doubles/mock_client_buffer_stream.h'
41--- tests/include/mir/test/doubles/mock_client_buffer_stream.h 2015-09-24 15:42:21 +0000
42+++ tests/include/mir/test/doubles/mock_client_buffer_stream.h 2015-09-28 19:55:36 +0000
43@@ -21,6 +21,8 @@
44
45 #include "src/client/client_buffer_stream.h"
46
47+#include <gmock/gmock.h>
48+
49 namespace mir
50 {
51 namespace test
52
53=== modified file 'tests/unit-tests/compositor/test_dropping_schedule.cpp'
54--- tests/unit-tests/compositor/test_dropping_schedule.cpp 2015-08-05 19:01:39 +0000
55+++ tests/unit-tests/compositor/test_dropping_schedule.cpp 2015-09-28 19:55:36 +0000
56@@ -21,6 +21,7 @@
57 #include "mir/test/doubles/stub_buffer.h"
58 #include "mir/test/fake_shared.h"
59 #include <gtest/gtest.h>
60+#include <gmock/gmock.h>
61
62 using namespace testing;
63 namespace mtd = mir::test::doubles;
64
65=== modified file 'tests/unit-tests/compositor/test_queueing_schedule.cpp'
66--- tests/unit-tests/compositor/test_queueing_schedule.cpp 2015-07-22 13:38:04 +0000
67+++ tests/unit-tests/compositor/test_queueing_schedule.cpp 2015-09-28 19:55:36 +0000
68@@ -19,6 +19,7 @@
69 #include "src/server/compositor/queueing_schedule.h"
70 #include "mir/test/doubles/stub_buffer.h"
71 #include <gtest/gtest.h>
72+#include <gmock/gmock.h>
73
74 using namespace testing;
75 namespace mtd = mir::test::doubles;
76
77=== modified file 'tests/unit-tests/dispatch/test_readable_fd.cpp'
78--- tests/unit-tests/dispatch/test_readable_fd.cpp 2015-08-29 11:33:37 +0000
79+++ tests/unit-tests/dispatch/test_readable_fd.cpp 2015-09-28 19:55:36 +0000
80@@ -19,6 +19,7 @@
81 #include "mir/dispatch/readable_fd.h"
82
83 #include <gtest/gtest.h>
84+#include <gmock/gmock.h>
85
86 namespace md = mir::dispatch;
87
88
89=== modified file 'tests/unit-tests/graphics/mesa/x11/test_display.cpp'
90--- tests/unit-tests/graphics/mesa/x11/test_display.cpp 2015-09-10 22:53:53 +0000
91+++ tests/unit-tests/graphics/mesa/x11/test_display.cpp 2015-09-28 19:55:36 +0000
92@@ -15,13 +15,14 @@
93 *
94 * Authored by: Cemil Azizoglu <cemil.azizoglu@canonical.com>
95 */
96+
97+#include <gtest/gtest.h>
98+#include <gmock/gmock.h>
99+
100 #include "src/platforms/mesa/server/x11/graphics/display.h"
101 #include "mir/test/doubles/mock_egl.h"
102 #include "mir/test/doubles/mock_x11.h"
103
104-#include <gtest/gtest.h>
105-#include <gmock/gmock.h>
106-
107 namespace mg=mir::graphics;
108 namespace mgx=mg::X;
109 namespace mtd=mir::test::doubles;
110
111=== modified file 'tests/unit-tests/graphics/mesa/x11/test_platform.cpp'
112--- tests/unit-tests/graphics/mesa/x11/test_platform.cpp 2015-08-21 20:35:15 +0000
113+++ tests/unit-tests/graphics/mesa/x11/test_platform.cpp 2015-09-28 19:55:36 +0000
114@@ -16,6 +16,9 @@
115 * Authored by: Cemil Azizoglu <cemil.azizoglu@canonical.com>
116 */
117
118+#include <gtest/gtest.h>
119+#include <gmock/gmock.h>
120+
121 #include "mir/options/program_option.h"
122 #include "src/platforms/mesa/server/x11/graphics/platform.h"
123
124@@ -27,9 +30,6 @@
125 #include "mir_test_framework/executable_path.h"
126 #include "mir_test_framework/udev_environment.h"
127
128-#include <gtest/gtest.h>
129-#include <gmock/gmock.h>
130-
131 namespace mg = mir::graphics;
132 namespace mtd = mir::test::doubles;
133 namespace mtf = mir_test_framework;
134
135=== modified file 'tests/unit-tests/input/evdev/test_evdev_device_detection.cpp'
136--- tests/unit-tests/input/evdev/test_evdev_device_detection.cpp 2015-09-02 13:10:33 +0000
137+++ tests/unit-tests/input/evdev/test_evdev_device_detection.cpp 2015-09-28 19:55:36 +0000
138@@ -22,6 +22,7 @@
139 #include "mir_test_framework/udev_environment.h"
140
141 #include <gtest/gtest.h>
142+#include <gmock/gmock.h>
143 #include <tuple>
144
145 namespace mtf = mir_test_framework;
146
147=== modified file 'tests/unit-tests/input/test_input_event.cpp'
148--- tests/unit-tests/input/test_input_event.cpp 2015-06-29 03:29:31 +0000
149+++ tests/unit-tests/input/test_input_event.cpp 2015-09-28 19:55:36 +0000
150@@ -17,6 +17,7 @@
151 */
152
153 #include <gtest/gtest.h>
154+#include <gmock/gmock.h>
155
156 #include "mir/events/event_private.h"
157 #include "mir_toolkit/events/input/input_event.h"
158
159=== modified file 'tests/unit-tests/input/test_x11_platform.cpp'
160--- tests/unit-tests/input/test_x11_platform.cpp 2015-09-07 14:22:09 +0000
161+++ tests/unit-tests/input/test_x11_platform.cpp 2015-09-28 19:55:36 +0000
162@@ -16,6 +16,9 @@
163 * Authored by: Cemil Azizoglu <cemil.azizoglu@canonical.com>
164 */
165
166+#include <gtest/gtest.h>
167+#include <gmock/gmock.h>
168+
169 #include "src/server/input/default_event_builder.h"
170 #include "src/platforms/mesa/server/x11/input/input_platform.h"
171 #include "src/platforms/mesa/server/x11/input/input_device.h"
172@@ -30,9 +33,6 @@
173 #include "mir/test/doubles/mock_x11.h"
174 #include "mir/test/fake_shared.h"
175
176-#include <gtest/gtest.h>
177-#include <gmock/gmock.h>
178-
179 namespace md = mir::dispatch;
180 namespace mi = mir::input;
181 namespace mt = mir::test;

Subscribers

People subscribed via source and target branches