Mir

Merge lp:~alan-griffiths/mir/prepublish-test-headers-that-depend-on-public-api into lp:mir

Proposed by Alan Griffiths on 2015-06-18
Status: Merged
Approved by: Alan Griffiths on 2015-06-19
Approved revision: 2686
Merged at revision: 2688
Proposed branch: lp:~alan-griffiths/mir/prepublish-test-headers-that-depend-on-public-api
Merge into: lp:mir
Prerequisite: lp:~alan-griffiths/mir/localise-mesa-includes
Diff against target: 268 lines (+34/-23)
12 files modified
benchmarks/android-input/CMakeLists.txt (+1/-1)
benchmarks/frame-uniformity/CMakeLists.txt (+5/-1)
include/test/mir_test_doubles/null_display.h (+3/-3)
include/test/mir_test_doubles/null_display_sync_group.h (+2/-2)
include/test/mir_test_doubles/null_platform.h (+2/-2)
tests/CMakeLists.txt (+11/-5)
tests/acceptance-tests/throwback/CMakeLists.txt (+1/-0)
tests/include/mir_test/test_protobuf_client.h (+1/-1)
tests/include/mir_test_doubles/null_display_changer.h (+1/-1)
tests/include/mir_test_doubles/stub_display.h (+4/-4)
tests/include/mir_test_doubles/stub_display_builder.h (+2/-2)
tests/include/mir_test_framework/client_platform_factory.h (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/prepublish-test-headers-that-depend-on-public-api
Reviewer Review Type Date Requested Status
Alberto Aguirre Approve on 2015-06-19
Alexandros Frantzis (community) 2015-06-18 Approve on 2015-06-19
PS Jenkins bot continuous-integration Approve on 2015-06-18
Review via email: mp+262329@code.launchpad.net

Commit Message

tests: select out test headers that only use the Mir public API

Description of the Change

tests: select out test headers that only use the Mir public API

As an initial step towards publishing test tools this identifies the test headers used by the acceptance tests to validate the public API. (As such they clearly only depend on the public API.)

This will be followed up by putting the corresponding implementation(s) into a library and by publishing the library and headers.

To post a comment you must log in.
2685. By Alan Griffiths on 2015-06-18

Fix CI

Alan Griffiths (alan-griffiths) wrote :

Unrelated:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/wily/universe/i18n/Translation-en Hash Sum mismatch

2686. By Alan Griffiths on 2015-06-18

merge lp:mir

Alexandros Frantzis (afrantzis) wrote :

OK.

We should make it clear to downstreams that we don't offer any kind of compatibility guarantees for the test framework classes (although they don't change very often).

review: Approve
Alan Griffiths (alan-griffiths) wrote :

> OK.
>
> We should make it clear to downstreams that we don't offer any kind of
> compatibility guarantees for the test framework classes (although they don't
> change very often).

Sure. We don't give much more of a guarantee for the server classes.

The test library I wasn't even planning to version.

Alberto Aguirre (albaguirre) wrote :

OK.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'benchmarks/android-input/CMakeLists.txt'
2--- benchmarks/android-input/CMakeLists.txt 2015-06-17 05:20:42 +0000
3+++ benchmarks/android-input/CMakeLists.txt 2015-06-18 16:38:26 +0000
4@@ -1,7 +1,7 @@
5 project(android-input-perf)
6
7 include_directories(
8- ${Mir_SOURCE_DIR}/tests/include
9+ ${Mir_SOURCE_DIR}/include/test
10 ${Mir_SOURCE_DIR}/include/platform
11 ${MIR_ANDROID_INCLUDE_DIRECTORIES}
12 ${MIR_3RD_PARTY_INCLUDE_DIRECTORIES}
13
14=== modified file 'benchmarks/frame-uniformity/CMakeLists.txt'
15--- benchmarks/frame-uniformity/CMakeLists.txt 2015-06-17 05:20:42 +0000
16+++ benchmarks/frame-uniformity/CMakeLists.txt 2015-06-18 16:38:26 +0000
17@@ -3,12 +3,16 @@
18 ${PROJECT_SOURCE_DIR}/include/platform
19 ${PROJECT_SOURCE_DIR}/include/server
20 ${PROJECT_SOURCE_DIR}/include/client
21- ${PROJECT_SOURCE_DIR}/tests/include/
22+ ${PROJECT_SOURCE_DIR}/include/test
23+
24 ${PROJECT_SOURCE_DIR}/src/include/server
25 ${PROJECT_SOURCE_DIR}/src/include/common
26 ${PROJECT_SOURCE_DIR}
27 ${MIR_ANDROID_INCLUDE_DIRECTORIES}
28 ${MIR_3RD_PARTY_INCLUDE_DIRECTORIES}
29+
30+ # needed for fake_event_hub_server_configuration.h (which relies on private APIs)
31+ ${PROJECT_SOURCE_DIR}/tests/include/
32 )
33
34 mir_add_wrapped_executable(frame_uniformity_test_client NOINSTALL
35
36=== added directory 'include/test'
37=== added directory 'include/test/mir_test'
38=== renamed file 'tests/include/mir_test/auto_unblock_thread.h' => 'include/test/mir_test/auto_unblock_thread.h'
39=== renamed file 'tests/include/mir_test/cross_process_action.h' => 'include/test/mir_test/cross_process_action.h'
40=== renamed file 'tests/include/mir_test/cross_process_sync.h' => 'include/test/mir_test/cross_process_sync.h'
41=== renamed file 'tests/include/mir_test/display_config_matchers.h' => 'include/test/mir_test/display_config_matchers.h'
42=== renamed file 'tests/include/mir_test/empty_deleter.h' => 'include/test/mir_test/empty_deleter.h'
43=== renamed file 'tests/include/mir_test/event_factory.h' => 'include/test/mir_test/event_factory.h'
44=== renamed file 'tests/include/mir_test/event_matchers.h' => 'include/test/mir_test/event_matchers.h'
45=== renamed file 'tests/include/mir_test/fake_event_hub.h' => 'include/test/mir_test/fake_event_hub.h'
46=== renamed file 'tests/include/mir_test/fake_shared.h' => 'include/test/mir_test/fake_shared.h'
47=== renamed file 'tests/include/mir_test/pipe.h' => 'include/test/mir_test/pipe.h'
48=== renamed file 'tests/include/mir_test/popen.h' => 'include/test/mir_test/popen.h'
49=== renamed file 'tests/include/mir_test/signal.h' => 'include/test/mir_test/signal.h'
50=== renamed file 'tests/include/mir_test/spin_wait.h' => 'include/test/mir_test/spin_wait.h'
51=== renamed file 'tests/include/mir_test/validity_matchers.h' => 'include/test/mir_test/validity_matchers.h'
52=== renamed file 'tests/include/mir_test/wait_condition.h' => 'include/test/mir_test/wait_condition.h'
53=== added directory 'include/test/mir_test_doubles'
54=== renamed file 'tests/include/mir_test_doubles/mock_egl.h' => 'include/test/mir_test_doubles/mock_egl.h'
55=== renamed file 'tests/include/mir_test_doubles/mock_input_dispatcher.h' => 'include/test/mir_test_doubles/mock_input_dispatcher.h'
56=== renamed file 'tests/include/mir_test_doubles/mock_prompt_session_listener.h' => 'include/test/mir_test_doubles/mock_prompt_session_listener.h'
57=== renamed file 'tests/include/mir_test_doubles/mock_window_manager.h' => 'include/test/mir_test_doubles/mock_window_manager.h'
58=== renamed file 'tests/include/mir_test_doubles/nested_mock_egl.h' => 'include/test/mir_test_doubles/nested_mock_egl.h'
59=== renamed file 'tests/include/mir_test_doubles/null_display.h' => 'include/test/mir_test_doubles/null_display.h'
60--- tests/include/mir_test_doubles/null_display.h 2015-06-17 05:20:42 +0000
61+++ include/test/mir_test_doubles/null_display.h 2015-06-18 16:38:26 +0000
62@@ -20,9 +20,9 @@
63 #define MIR_TEST_DOUBLES_NULL_DISPLAY_H_
64
65 #include "mir/graphics/display.h"
66-#include "null_gl_context.h"
67-#include "null_display_configuration.h"
68-#include "null_display_sync_group.h"
69+#include "mir_test_doubles/null_gl_context.h"
70+#include "mir_test_doubles/null_display_configuration.h"
71+#include "mir_test_doubles/null_display_sync_group.h"
72
73 namespace mir
74 {
75
76=== renamed file 'tests/include/mir_test_doubles/null_display_buffer.h' => 'include/test/mir_test_doubles/null_display_buffer.h'
77=== renamed file 'tests/include/mir_test_doubles/null_display_buffer_compositor_factory.h' => 'include/test/mir_test_doubles/null_display_buffer_compositor_factory.h'
78=== renamed file 'tests/include/mir_test_doubles/null_display_configuration.h' => 'include/test/mir_test_doubles/null_display_configuration.h'
79=== renamed file 'tests/include/mir_test_doubles/null_display_sync_group.h' => 'include/test/mir_test_doubles/null_display_sync_group.h'
80--- tests/include/mir_test_doubles/null_display_sync_group.h 2015-02-20 19:44:17 +0000
81+++ include/test/mir_test_doubles/null_display_sync_group.h 2015-06-18 16:38:26 +0000
82@@ -21,8 +21,8 @@
83
84 #include "mir/graphics/display.h"
85 #include "mir/geometry/size.h"
86-#include "null_display_buffer.h"
87-#include "stub_display_buffer.h"
88+#include "mir_test_doubles/null_display_buffer.h"
89+#include "mir_test_doubles/stub_display_buffer.h"
90 #include <thread>
91
92 namespace mir
93
94=== renamed file 'tests/include/mir_test_doubles/null_gl_context.h' => 'include/test/mir_test_doubles/null_gl_context.h'
95=== renamed file 'tests/include/mir_test_doubles/null_platform.h' => 'include/test/mir_test_doubles/null_platform.h'
96--- tests/include/mir_test_doubles/null_platform.h 2015-02-22 07:46:25 +0000
97+++ include/test/mir_test_doubles/null_platform.h 2015-06-18 16:38:26 +0000
98@@ -21,8 +21,8 @@
99
100 #include "mir/graphics/platform.h"
101 #include "mir/graphics/platform_ipc_package.h"
102-#include "null_display.h"
103-#include "null_platform_ipc_operations.h"
104+#include "mir_test_doubles/null_display.h"
105+#include "mir_test_doubles/null_platform_ipc_operations.h"
106
107 namespace mir
108 {
109
110=== renamed file 'tests/include/mir_test_doubles/null_platform_ipc_operations.h' => 'include/test/mir_test_doubles/null_platform_ipc_operations.h'
111=== renamed file 'tests/include/mir_test_doubles/stub_client_buffer.h' => 'include/test/mir_test_doubles/stub_client_buffer.h'
112=== renamed file 'tests/include/mir_test_doubles/stub_client_buffer_factory.h' => 'include/test/mir_test_doubles/stub_client_buffer_factory.h'
113=== renamed file 'tests/include/mir_test_doubles/stub_display_buffer.h' => 'include/test/mir_test_doubles/stub_display_buffer.h'
114=== renamed file 'tests/include/mir_test_doubles/stub_display_configuration.h' => 'include/test/mir_test_doubles/stub_display_configuration.h'
115=== renamed file 'tests/include/mir_test_doubles/stub_session_authorizer.h' => 'include/test/mir_test_doubles/stub_session_authorizer.h'
116=== renamed file 'tests/include/mir_test_doubles/wrap_shell_to_track_latest_surface.h' => 'include/test/mir_test_doubles/wrap_shell_to_track_latest_surface.h'
117=== added directory 'include/test/mir_test_framework'
118=== renamed file 'tests/include/mir_test_framework/any_surface.h' => 'include/test/mir_test_framework/any_surface.h'
119=== renamed file 'tests/include/mir_test_framework/async_server_runner.h' => 'include/test/mir_test_framework/async_server_runner.h'
120=== renamed file 'tests/include/mir_test_framework/connected_client_headless_server.h' => 'include/test/mir_test_framework/connected_client_headless_server.h'
121=== renamed file 'tests/include/mir_test_framework/connected_client_with_a_surface.h' => 'include/test/mir_test_framework/connected_client_with_a_surface.h'
122=== renamed file 'tests/include/mir_test_framework/detect_server.h' => 'include/test/mir_test_framework/detect_server.h'
123=== renamed file 'tests/include/mir_test_framework/executable_path.h' => 'include/test/mir_test_framework/executable_path.h'
124=== renamed file 'tests/include/mir_test_framework/fake_input_device.h' => 'include/test/mir_test_framework/fake_input_device.h'
125=== renamed file 'tests/include/mir_test_framework/headless_in_process_server.h' => 'include/test/mir_test_framework/headless_in_process_server.h'
126=== renamed file 'tests/include/mir_test_framework/headless_nested_server_runner.h' => 'include/test/mir_test_framework/headless_nested_server_runner.h'
127=== renamed file 'tests/include/mir_test_framework/headless_test.h' => 'include/test/mir_test_framework/headless_test.h'
128=== renamed file 'tests/include/mir_test_framework/in_process_server.h' => 'include/test/mir_test_framework/in_process_server.h'
129=== renamed file 'tests/include/mir_test_framework/interprocess_client_server_test.h' => 'include/test/mir_test_framework/interprocess_client_server_test.h'
130=== renamed file 'tests/include/mir_test_framework/placement_applying_shell.h' => 'include/test/mir_test_framework/placement_applying_shell.h'
131=== renamed file 'tests/include/mir_test_framework/process.h' => 'include/test/mir_test_framework/process.h'
132=== renamed file 'tests/include/mir_test_framework/server_runner.h' => 'include/test/mir_test_framework/server_runner.h'
133=== renamed file 'tests/include/mir_test_framework/stub_client_connection_configuration.h' => 'include/test/mir_test_framework/stub_client_connection_configuration.h'
134=== renamed file 'tests/include/mir_test_framework/stub_graphics_platform_operation.h' => 'include/test/mir_test_framework/stub_graphics_platform_operation.h'
135=== renamed file 'tests/include/mir_test_framework/stub_platform_helpers.h' => 'include/test/mir_test_framework/stub_platform_helpers.h'
136=== renamed file 'tests/include/mir_test_framework/stub_server_platform_factory.h' => 'include/test/mir_test_framework/stub_server_platform_factory.h'
137=== renamed file 'tests/include/mir_test_framework/temporary_environment_value.h' => 'include/test/mir_test_framework/temporary_environment_value.h'
138=== renamed file 'tests/include/mir_test_framework/using_stub_client_platform.h' => 'include/test/mir_test_framework/using_stub_client_platform.h'
139=== modified file 'tests/CMakeLists.txt'
140--- tests/CMakeLists.txt 2015-06-18 16:38:26 +0000
141+++ tests/CMakeLists.txt 2015-06-18 16:38:26 +0000
142@@ -39,12 +39,13 @@
143 add_definitions(-DMIR_BUILD_PLATFORM_MESA_KMS)
144 endif()
145
146+# public headers (only public headers should be accessed by acceptance tests)
147 include_directories(
148- include
149 ${PROJECT_SOURCE_DIR}/include/platform
150 ${PROJECT_SOURCE_DIR}/include/server
151 ${PROJECT_SOURCE_DIR}/include/client
152 ${PROJECT_SOURCE_DIR}/include/common
153+ ${PROJECT_SOURCE_DIR}/include/test
154 )
155
156 option(MIR_BUILD_ACCEPTANCE_TESTS "Build acceptance tests" ON)
157@@ -57,10 +58,6 @@
158 add_subdirectory(acceptance-tests/)
159 endif (MIR_BUILD_ACCEPTANCE_TESTS)
160
161-if (MIR_BUILD_INTEGRATION_TESTS)
162- add_subdirectory(integration-tests/)
163-endif (MIR_BUILD_INTEGRATION_TESTS)
164-
165 if (MIR_BUILD_PERFORMANCE_TESTS)
166 add_subdirectory(performance-tests/)
167 endif(MIR_BUILD_PERFORMANCE_TESTS)
168@@ -69,6 +66,15 @@
169 add_subdirectory(privileged-tests/)
170 endif(MIR_BUILD_PRIVILEGED_TESTS)
171
172+# Private test headers used by integration and unit tests
173+include_directories(
174+ include
175+)
176+
177+if (MIR_BUILD_INTEGRATION_TESTS)
178+ add_subdirectory(integration-tests/)
179+endif (MIR_BUILD_INTEGRATION_TESTS)
180+
181 if (MIR_BUILD_UNIT_TESTS)
182 add_subdirectory(unit-tests/)
183 endif (MIR_BUILD_UNIT_TESTS)
184
185=== modified file 'tests/acceptance-tests/throwback/CMakeLists.txt'
186--- tests/acceptance-tests/throwback/CMakeLists.txt 2015-06-17 05:20:42 +0000
187+++ tests/acceptance-tests/throwback/CMakeLists.txt 2015-06-18 16:38:26 +0000
188@@ -3,6 +3,7 @@
189 ${PROJECT_SOURCE_DIR}/src/include/common
190 ${PROJECT_SOURCE_DIR}/src/include/server
191 ${PROJECT_SOURCE_DIR}/src/include/client
192+ ${PROJECT_SOURCE_DIR}/tests/include
193 )
194
195 add_library(acceptance-test-throwback OBJECT
196
197=== modified file 'tests/include/mir_test/test_protobuf_client.h'
198--- tests/include/mir_test/test_protobuf_client.h 2015-06-17 05:20:42 +0000
199+++ tests/include/mir_test/test_protobuf_client.h 2015-06-18 16:38:26 +0000
200@@ -21,7 +21,7 @@
201 #define MIR_TEST_TEST_CLIENT_H_
202
203 #include "mir_protobuf.pb.h"
204-#include "wait_condition.h"
205+#include "mir_test/wait_condition.h"
206
207 #include <gmock/gmock.h>
208
209
210=== modified file 'tests/include/mir_test_doubles/null_display_changer.h'
211--- tests/include/mir_test_doubles/null_display_changer.h 2015-02-22 07:46:25 +0000
212+++ tests/include/mir_test_doubles/null_display_changer.h 2015-06-18 16:38:26 +0000
213@@ -20,7 +20,7 @@
214 #define MIR_TEST_DOUBLES_NULL_DISPLAY_CHANGER_H_
215
216 #include "mir/frontend/display_changer.h"
217-#include "null_display_configuration.h"
218+#include "mir_test_doubles/null_display_configuration.h"
219
220 namespace mir
221 {
222
223=== modified file 'tests/include/mir_test_doubles/stub_display.h'
224--- tests/include/mir_test_doubles/stub_display.h 2015-04-28 07:54:10 +0000
225+++ tests/include/mir_test_doubles/stub_display.h 2015-06-18 16:38:26 +0000
226@@ -19,10 +19,10 @@
227 #ifndef MIR_TEST_DOUBLES_STUB_DISPLAY_H_
228 #define MIR_TEST_DOUBLES_STUB_DISPLAY_H_
229
230-#include "null_display.h"
231-#include "null_display_sync_group.h"
232-#include "stub_display_buffer.h"
233-#include "stub_display_configuration.h"
234+#include "mir_test_doubles/null_display.h"
235+#include "mir_test_doubles/null_display_sync_group.h"
236+#include "mir_test_doubles/stub_display_buffer.h"
237+#include "mir_test_doubles/stub_display_configuration.h"
238
239 #include "mir/geometry/rectangle.h"
240
241
242=== modified file 'tests/include/mir_test_doubles/stub_display_builder.h'
243--- tests/include/mir_test_doubles/stub_display_builder.h 2015-06-17 05:20:42 +0000
244+++ tests/include/mir_test_doubles/stub_display_builder.h 2015-06-18 16:38:26 +0000
245@@ -23,8 +23,8 @@
246 #include "src/platforms/android/server/display_component_factory.h"
247 #include "src/platforms/android/server/configurable_display_buffer.h"
248 #include "src/platforms/android/server/hwc_configuration.h"
249-#include "stub_display_configuration.h"
250-#include "mock_display_device.h"
251+#include "mir_test_doubles/stub_display_configuration.h"
252+#include "mir_test_doubles/mock_display_device.h"
253 #include <gmock/gmock.h>
254
255 namespace mir
256
257=== modified file 'tests/include/mir_test_framework/client_platform_factory.h'
258--- tests/include/mir_test_framework/client_platform_factory.h 2015-06-17 05:20:42 +0000
259+++ tests/include/mir_test_framework/client_platform_factory.h 2015-06-18 16:38:26 +0000
260@@ -22,7 +22,7 @@
261
262 #include "mir/shared_library.h"
263 #include "mir/client_platform_factory.h"
264-#include "executable_path.h"
265+#include "mir_test_framework/executable_path.h"
266 #include "mir_test_doubles/mock_client_context.h"
267
268 namespace mtd = mir::test::doubles;

Subscribers

People subscribed via source and target branches