Merge lp:~afrantzis/mir/versioned-platform-libraries-plus-server-abi-bump into lp:mir
- versioned-platform-libraries-plus-server-abi-bump
- Merge into development-branch
Proposed by
Alexandros Frantzis
Status: | Superseded |
---|---|
Proposed branch: | lp:~afrantzis/mir/versioned-platform-libraries-plus-server-abi-bump |
Merge into: | lp:mir |
Diff against target: |
552 lines (+80/-47) 29 files modified
CMakeLists.txt (+1/-1) debian/control (+10/-10) debian/libmirserver30.install (+1/-1) debian/mir-client-platform-android2.install (+1/-1) debian/mir-client-platform-mesa2.install (+1/-1) debian/mir-platform-graphics-android2.install (+1/-1) debian/mir-platform-graphics-mesa2.install (+1/-1) src/CMakeLists.txt (+5/-2) src/client/CMakeLists.txt (+1/-2) src/common/sharedlibrary/shared_library_prober.cpp (+9/-1) src/platform/graphics/platform_probe.cpp (+1/-1) src/platforms/CMakeLists.txt (+8/-1) src/platforms/android/client/CMakeLists.txt (+1/-0) src/platforms/android/server/CMakeLists.txt (+1/-0) src/platforms/mesa/client/CMakeLists.txt (+1/-0) src/platforms/mesa/server/CMakeLists.txt (+1/-0) src/server/CMakeLists.txt (+1/-1) src/server/symbols.map (+2/-7) tests/acceptance-tests/test_symbols_required_by_mesa.cpp (+1/-1) tests/include/mir_test_framework/client_platform_factory.h (+2/-2) tests/mir_test_framework/CMakeLists.txt (+2/-0) tests/mir_test_framework/executable_path.cpp (+12/-2) tests/unit-tests/client/test_client_platform.cpp (+2/-2) tests/unit-tests/client/test_probing_client_platform_factory.cpp (+2/-2) tests/unit-tests/graphics/android/test_platform.cpp (+2/-2) tests/unit-tests/graphics/mesa/test_platform.cpp (+2/-2) tests/unit-tests/graphics/test_platform_prober.cpp (+2/-2) tests/unit-tests/shared_library_test.cpp (+1/-1) tests/unit-tests/test_shared_library_prober.cpp (+5/-0) |
To merge this branch: | bzr merge lp:~afrantzis/mir/versioned-platform-libraries-plus-server-abi-bump |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir development team | Pending | ||
Review via email: mp+250440@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-02-20.
Commit message
platforms: Use the ABI version in platform library names and packages + server ABI bump for testing CI
Description of the change
platforms: Use the ABI version in platform library names and packages + server ABI bump for testing CI
To post a comment you must log in.
Unmerged revisions
- 2334. By Alexandros Frantzis
-
Bump CI
- 2333. By Alexandros Frantzis
-
Bump mirserver ABI to 30
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 2015-02-19 13:21:15 +0000 |
3 | +++ CMakeLists.txt 2015-02-20 12:45:33 +0000 |
4 | @@ -27,7 +27,7 @@ |
5 | set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) |
6 | |
7 | set(MIR_VERSION_MAJOR 0) |
8 | -set(MIR_VERSION_MINOR 12) # This should change at least with every MIRSERVER_ABI |
9 | +set(MIR_VERSION_MINOR 13) # This should change at least with every MIRSERVER_ABI |
10 | set(MIR_VERSION_PATCH 0) |
11 | |
12 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) |
13 | |
14 | === modified file 'debian/control' |
15 | --- debian/control 2015-02-19 10:37:47 +0000 |
16 | +++ debian/control 2015-02-20 12:45:33 +0000 |
17 | @@ -61,7 +61,7 @@ |
18 | |
19 | #TODO: Packaging infrastructure for better dependency generation, |
20 | # ala pkg-xorg's xviddriver:Provides and ABI detection. |
21 | -Package: libmirserver29 |
22 | +Package: libmirserver30 |
23 | Section: libs |
24 | Architecture: i386 amd64 armhf arm64 |
25 | Multi-Arch: same |
26 | @@ -127,7 +127,7 @@ |
27 | Architecture: i386 amd64 armhf arm64 |
28 | Multi-Arch: same |
29 | Pre-Depends: ${misc:Pre-Depends} |
30 | -Depends: libmirserver29 (= ${binary:Version}), |
31 | +Depends: libmirserver30 (= ${binary:Version}), |
32 | libmirplatform-dev (= ${binary:Version}), |
33 | libmircommon-dev (= ${binary:Version}), |
34 | libglm-dev, |
35 | @@ -266,7 +266,7 @@ |
36 | Contains the shared libraries required for the Mir server and client. |
37 | |
38 | # Longer-term these drivers should move out-of-tree |
39 | -Package: mir-platform-graphics-mesa |
40 | +Package: mir-platform-graphics-mesa2 |
41 | Section: libs |
42 | Architecture: i386 amd64 armhf arm64 |
43 | Multi-Arch: same |
44 | @@ -280,7 +280,7 @@ |
45 | Contains the shared libraries required for the Mir server to interact with |
46 | the hardware platform using the Mesa drivers. |
47 | |
48 | -Package: mir-platform-graphics-android |
49 | +Package: mir-platform-graphics-android2 |
50 | Section: libs |
51 | Architecture: i386 amd64 armhf |
52 | Multi-Arch: same |
53 | @@ -294,7 +294,7 @@ |
54 | Contains the shared libraries required for the Mir server to interact with |
55 | the hardware platform using the Android drivers. |
56 | |
57 | -Package: mir-client-platform-mesa |
58 | +Package: mir-client-platform-mesa2 |
59 | Section: libs |
60 | Architecture: i386 amd64 armhf arm64 |
61 | Multi-Arch: same |
62 | @@ -323,7 +323,7 @@ |
63 | Contains header files required to use the platform specific capabilities of |
64 | the Mir Mesa backend. |
65 | |
66 | -Package: mir-client-platform-android |
67 | +Package: mir-client-platform-android2 |
68 | Section: libs |
69 | Architecture: i386 amd64 armhf |
70 | Multi-Arch: same |
71 | @@ -343,8 +343,8 @@ |
72 | Multi-Arch: same |
73 | Pre-Depends: ${misc:Pre-Depends} |
74 | Depends: ${misc:Depends}, |
75 | - mir-platform-graphics-mesa, |
76 | - mir-client-platform-mesa, |
77 | + mir-platform-graphics-mesa2, |
78 | + mir-client-platform-mesa2, |
79 | Description: Display server for Ubuntu - desktop driver metapackage |
80 | Mir is a display server running on linux systems, with a focus on efficiency, |
81 | robust operation and a well-defined driver model. |
82 | @@ -358,8 +358,8 @@ |
83 | Multi-Arch: same |
84 | Pre-Depends: ${misc:Pre-Depends} |
85 | Depends: ${misc:Depends}, |
86 | - mir-platform-graphics-android, |
87 | - mir-client-platform-android, |
88 | + mir-platform-graphics-android2, |
89 | + mir-client-platform-android2, |
90 | Description: Display server for Ubuntu - android driver metapackage |
91 | Mir is a display server running on linux systems, with a focus on efficiency, |
92 | robust operation and a well-defined driver model. |
93 | |
94 | === renamed file 'debian/libmirserver29.install' => 'debian/libmirserver30.install' |
95 | --- debian/libmirserver29.install 2015-02-19 10:37:47 +0000 |
96 | +++ debian/libmirserver30.install 2015-02-20 12:45:33 +0000 |
97 | @@ -1,1 +1,1 @@ |
98 | -usr/lib/*/libmirserver.so.29 |
99 | +usr/lib/*/libmirserver.so.30 |
100 | |
101 | === renamed file 'debian/mir-client-platform-android.install' => 'debian/mir-client-platform-android2.install' |
102 | --- debian/mir-client-platform-android.install 2015-01-21 07:34:50 +0000 |
103 | +++ debian/mir-client-platform-android2.install 2015-02-20 12:45:33 +0000 |
104 | @@ -1,1 +1,1 @@ |
105 | -usr/lib/*/mir/client-platform/android.so |
106 | +usr/lib/*/mir/client-platform/android.so.2 |
107 | |
108 | === renamed file 'debian/mir-client-platform-mesa.install' => 'debian/mir-client-platform-mesa2.install' |
109 | --- debian/mir-client-platform-mesa.install 2015-01-21 07:34:50 +0000 |
110 | +++ debian/mir-client-platform-mesa2.install 2015-02-20 12:45:33 +0000 |
111 | @@ -1,1 +1,1 @@ |
112 | -usr/lib/*/mir/client-platform/mesa.so |
113 | +usr/lib/*/mir/client-platform/mesa.so.2 |
114 | |
115 | === renamed file 'debian/mir-platform-graphics-android.install' => 'debian/mir-platform-graphics-android2.install' |
116 | --- debian/mir-platform-graphics-android.install 2015-01-14 13:09:48 +0000 |
117 | +++ debian/mir-platform-graphics-android2.install 2015-02-20 12:45:33 +0000 |
118 | @@ -1,1 +1,1 @@ |
119 | -usr/lib/*/mir/server-platform/graphics-android.so |
120 | +usr/lib/*/mir/server-platform/graphics-android.so.2 |
121 | |
122 | === renamed file 'debian/mir-platform-graphics-mesa.install' => 'debian/mir-platform-graphics-mesa2.install' |
123 | --- debian/mir-platform-graphics-mesa.install 2015-01-14 13:09:48 +0000 |
124 | +++ debian/mir-platform-graphics-mesa2.install 2015-02-20 12:45:33 +0000 |
125 | @@ -1,1 +1,1 @@ |
126 | -usr/lib/*/mir/server-platform/graphics-mesa.so |
127 | +usr/lib/*/mir/server-platform/graphics-mesa.so.2 |
128 | |
129 | === modified file 'src/CMakeLists.txt' |
130 | --- src/CMakeLists.txt 2015-02-18 03:04:18 +0000 |
131 | +++ src/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
132 | @@ -1,5 +1,4 @@ |
133 | -# We need MIRPLATFORM_ABI and MIR_PLATFORM_DRIVER_BINARY in both libmirplatform |
134 | -# and the platform implementations. |
135 | +# We need MIRPLATFORM_ABI in both libmirplatform and the platform implementations. |
136 | set(MIRPLATFORM_ABI 7) |
137 | |
138 | # We need MIR_CLIENT_PLATFORM_PATH in both libmirclient and the platform |
139 | @@ -42,3 +41,7 @@ |
140 | set(MIR_COMMON_REFERENCES ${MIR_COMMON_REFERENCES} PARENT_SCOPE) |
141 | set(MIR_CLIENT_PLATFORM_PATH ${MIR_CLIENT_PLATFORM_PATH} PARENT_SCOPE) |
142 | set(MIR_SERVER_PLATFORM_PATH ${MIR_SERVER_PLATFORM_PATH} PARENT_SCOPE) |
143 | + |
144 | +# We need the ABI versions in the tests |
145 | +set(MIR_SERVER_GRAPHICS_PLATFORM_ABI ${MIR_SERVER_GRAPHICS_PLATFORM_ABI} PARENT_SCOPE) |
146 | +set(MIR_CLIENT_PLATFORM_ABI ${MIR_CLIENT_PLATFORM_ABI} PARENT_SCOPE) |
147 | |
148 | === modified file 'src/client/CMakeLists.txt' |
149 | --- src/client/CMakeLists.txt 2015-02-13 06:12:34 +0000 |
150 | +++ src/client/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
151 | @@ -24,11 +24,10 @@ |
152 | ) |
153 | |
154 | set(MIRCLIENT_ABI 8) |
155 | -set(CLIENT_PLATFORM_VERSION "MIR_CLIENT_PLATFORM_2") |
156 | set(symbol_map ${CMAKE_SOURCE_DIR}/src/client/symbols.map) |
157 | |
158 | add_definitions(-DMIR_CLIENT_PLATFORM_PATH="${MIR_CLIENT_PLATFORM_PATH}/") |
159 | -add_definitions(-DCLIENT_PLATFORM_VERSION="${CLIENT_PLATFORM_VERSION}") |
160 | +add_definitions(-DCLIENT_PLATFORM_VERSION="${MIR_CLIENT_PLATFORM_VERSION}") |
161 | add_definitions(-DMIR_LOGGING_COMPONENT_FALLBACK="mirclient") |
162 | |
163 | add_subdirectory(rpc/) |
164 | |
165 | === modified file 'src/common/sharedlibrary/shared_library_prober.cpp' |
166 | --- src/common/sharedlibrary/shared_library_prober.cpp 2014-09-02 00:28:47 +0000 |
167 | +++ src/common/sharedlibrary/shared_library_prober.cpp 2015-02-20 12:45:33 +0000 |
168 | @@ -37,6 +37,14 @@ |
169 | } |
170 | return std::error_code{}; |
171 | } |
172 | + |
173 | +// Libraries can be of the form libname.so(.X.Y) |
174 | +bool path_has_library_extension(boost::filesystem::path const& path) |
175 | +{ |
176 | + return path.extension().string() == ".so" || |
177 | + path.string().find(".so.") != std::string::npos; |
178 | +} |
179 | + |
180 | } |
181 | |
182 | std::vector<std::shared_ptr<mir::SharedLibrary>> |
183 | @@ -57,7 +65,7 @@ |
184 | std::vector<std::shared_ptr<mir::SharedLibrary>> libraries; |
185 | for (; iterator != boost::filesystem::directory_iterator() ; ++iterator) |
186 | { |
187 | - if (iterator->path().extension().string() == ".so") |
188 | + if (path_has_library_extension(iterator->path())) |
189 | { |
190 | try |
191 | { |
192 | |
193 | === modified file 'src/platform/graphics/platform_probe.cpp' |
194 | --- src/platform/graphics/platform_probe.cpp 2014-12-17 13:48:10 +0000 |
195 | +++ src/platform/graphics/platform_probe.cpp 2015-02-20 12:45:33 +0000 |
196 | @@ -47,7 +47,7 @@ |
197 | { |
198 | // Tried to probe a SharedLibrary that isn't a platform module? |
199 | ml::log(ml::Severity::warning, |
200 | - std::string{"Failed to probe module. Not a platform library? Error: "} + err.what(), |
201 | + std::string{"Failed to probe module. Not a platform library or incorrect ABI version? Error: "} + err.what(), |
202 | "Platform Probing"); |
203 | } |
204 | } |
205 | |
206 | === modified file 'src/platforms/CMakeLists.txt' |
207 | --- src/platforms/CMakeLists.txt 2015-02-18 03:04:18 +0000 |
208 | +++ src/platforms/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
209 | @@ -3,7 +3,9 @@ |
210 | # This ABI is much smaller than the full libmirplatform ABI. |
211 | # |
212 | # TODO: Add an extra driver-ABI check target. |
213 | -set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION "MIR_GRAPHICS_PLATFORM_2") |
214 | +set(MIR_SERVER_GRAPHICS_PLATFORM_ABI 2) |
215 | +set(MIR_SERVER_GRAPHICS_PLATFORM_ABI ${MIR_SERVER_GRAPHICS_PLATFORM_ABI} PARENT_SCOPE) |
216 | +set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION "MIR_GRAPHICS_PLATFORM_${MIR_SERVER_GRAPHICS_PLATFORM_ABI}") |
217 | set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION ${MIR_SERVER_GRAPHICS_PLATFORM_VERSION} PARENT_SCOPE) |
218 | |
219 | set(MIR_SERVER_PLATFORM_PATH |
220 | @@ -14,6 +16,11 @@ |
221 | PARENT_SCOPE |
222 | ) |
223 | |
224 | +set(MIR_CLIENT_PLATFORM_ABI 2) |
225 | +set(MIR_CLIENT_PLATFORM_ABI ${MIR_CLIENT_PLATFORM_ABI} PARENT_SCOPE) |
226 | +set(MIR_CLIENT_PLATFORM_VERSION "MIR_CLIENT_PLATFORM_${MIR_CLIENT_PLATFORM_ABI}") |
227 | +set(MIR_CLIENT_PLATFORM_VERSION ${MIR_CLIENT_PLATFORM_VERSION} PARENT_SCOPE) |
228 | + |
229 | set(server_common_include_dirs |
230 | ${PROJECT_SOURCE_DIR}/include/platform |
231 | ) |
232 | |
233 | === modified file 'src/platforms/android/client/CMakeLists.txt' |
234 | --- src/platforms/android/client/CMakeLists.txt 2015-02-13 06:12:34 +0000 |
235 | +++ src/platforms/android/client/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
236 | @@ -26,6 +26,7 @@ |
237 | OUTPUT_NAME android |
238 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/client-modules |
239 | PREFIX "" |
240 | + SUFFIX ".so.${MIR_CLIENT_PLATFORM_ABI}" |
241 | LINK_FLAGS "-Wl,--version-script,${symbol_map}" |
242 | ) |
243 | |
244 | |
245 | === modified file 'src/platforms/android/server/CMakeLists.txt' |
246 | --- src/platforms/android/server/CMakeLists.txt 2015-02-13 06:12:34 +0000 |
247 | +++ src/platforms/android/server/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
248 | @@ -63,6 +63,7 @@ |
249 | OUTPUT_NAME graphics-android |
250 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/server-modules |
251 | PREFIX "" |
252 | + SUFFIX ".so.${MIR_SERVER_GRAPHICS_PLATFORM_ABI}" |
253 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" |
254 | ) |
255 | |
256 | |
257 | === modified file 'src/platforms/mesa/client/CMakeLists.txt' |
258 | --- src/platforms/mesa/client/CMakeLists.txt 2015-01-22 09:00:14 +0000 |
259 | +++ src/platforms/mesa/client/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
260 | @@ -28,6 +28,7 @@ |
261 | OUTPUT_NAME mesa |
262 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/client-modules |
263 | PREFIX "" |
264 | + SUFFIX ".so.${MIR_CLIENT_PLATFORM_ABI}" |
265 | LINK_FLAGS "-Wl,--version-script,${symbol_map}" |
266 | ) |
267 | |
268 | |
269 | === modified file 'src/platforms/mesa/server/CMakeLists.txt' |
270 | --- src/platforms/mesa/server/CMakeLists.txt 2015-02-13 06:12:34 +0000 |
271 | +++ src/platforms/mesa/server/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
272 | @@ -64,6 +64,7 @@ |
273 | OUTPUT_NAME graphics-mesa |
274 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/server-modules |
275 | PREFIX "" |
276 | + SUFFIX ".so.${MIR_SERVER_GRAPHICS_PLATFORM_ABI}" |
277 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" |
278 | ) |
279 | |
280 | |
281 | === modified file 'src/server/CMakeLists.txt' |
282 | --- src/server/CMakeLists.txt 2015-02-19 13:21:15 +0000 |
283 | +++ src/server/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
284 | @@ -106,7 +106,7 @@ |
285 | ${CMAKE_SOURCE_DIR}/include/server/mir DESTINATION "include/mirserver" |
286 | ) |
287 | |
288 | -set(MIRSERVER_ABI 29) # Be sure to increment MIR_VERSION_MINOR at the same time |
289 | +set(MIRSERVER_ABI 30) # Be sure to increment MIR_VERSION_MINOR at the same time |
290 | set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) |
291 | |
292 | set_target_properties( |
293 | |
294 | === modified file 'src/server/symbols.map' |
295 | --- src/server/symbols.map 2015-02-19 10:43:31 +0000 |
296 | +++ src/server/symbols.map 2015-02-20 12:45:33 +0000 |
297 | @@ -1,4 +1,4 @@ |
298 | -MIR_SERVER_29 { |
299 | +MIR_SERVER_30 { |
300 | global: |
301 | extern "C++" { |
302 | # Symbols not yet picked up by script |
303 | @@ -226,6 +226,7 @@ |
304 | mir::scene::SurfaceCoordinator::operator*; |
305 | mir::scene::SurfaceCoordinator::raise*; |
306 | mir::scene::SurfaceCoordinator::remove_surface*; |
307 | + mir::scene::SurfaceCoordinator::surface_at*; |
308 | mir::scene::SurfaceCoordinator::?SurfaceCoordinator*; |
309 | mir::scene::SurfaceCoordinator::SurfaceCoordinator*; |
310 | mir::scene::SurfaceCreationParameters::of_buffer_usage*; |
311 | @@ -735,9 +736,3 @@ |
312 | }; |
313 | local: *; |
314 | }; |
315 | - |
316 | -MIR_SERVER_29.1 { |
317 | - global: |
318 | - mir::scene::SurfaceCoordinator::surface_at*; |
319 | - local: *; |
320 | -} MIR_SERVER_29; |
321 | |
322 | === modified file 'tests/acceptance-tests/test_symbols_required_by_mesa.cpp' |
323 | --- tests/acceptance-tests/test_symbols_required_by_mesa.cpp 2015-02-13 06:12:34 +0000 |
324 | +++ tests/acceptance-tests/test_symbols_required_by_mesa.cpp 2015-02-20 12:45:33 +0000 |
325 | @@ -28,7 +28,7 @@ |
326 | |
327 | TEST(SymbolsRequiredByMesa, are_exported_by_client_platform_mesa) |
328 | { |
329 | - auto const handle = dlopen(mtf::client_platform("mesa.so").c_str(), RTLD_LAZY); |
330 | + auto const handle = dlopen(mtf::client_platform("mesa").c_str(), RTLD_LAZY); |
331 | ASSERT_THAT(handle, NotNull()); |
332 | |
333 | auto const sym = dlsym(handle, "mir_client_mesa_egl_native_display_is_valid"); |
334 | |
335 | === modified file 'tests/include/mir_test_framework/client_platform_factory.h' |
336 | --- tests/include/mir_test_framework/client_platform_factory.h 2015-02-13 06:12:34 +0000 |
337 | +++ tests/include/mir_test_framework/client_platform_factory.h 2015-02-20 12:45:33 +0000 |
338 | @@ -37,7 +37,7 @@ |
339 | mtd::MockClientContext ctx; |
340 | ON_CALL(ctx, populate_server_package(_)) |
341 | .WillByDefault(Invoke([](MirPlatformPackage& package) { ::memset(&package, 0, sizeof(package)); })); |
342 | - platform_library = std::make_shared<mir::SharedLibrary>(client_platform("android.so")); |
343 | + platform_library = std::make_shared<mir::SharedLibrary>(client_platform("android")); |
344 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); |
345 | return platform_factory(&ctx); |
346 | } |
347 | @@ -46,7 +46,7 @@ |
348 | mir::client::ClientContext* client_context) |
349 | { |
350 | using namespace testing; |
351 | - platform_library = std::make_shared<mir::SharedLibrary>(client_platform("mesa.so")); |
352 | + platform_library = std::make_shared<mir::SharedLibrary>(client_platform("mesa")); |
353 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); |
354 | return platform_factory(client_context); |
355 | } |
356 | |
357 | === modified file 'tests/mir_test_framework/CMakeLists.txt' |
358 | --- tests/mir_test_framework/CMakeLists.txt 2015-02-13 06:12:34 +0000 |
359 | +++ tests/mir_test_framework/CMakeLists.txt 2015-02-20 12:45:33 +0000 |
360 | @@ -14,6 +14,8 @@ |
361 | add_definitions( |
362 | -DMIR_CLIENT_PLATFORM_PATH="${MIR_CLIENT_PLATFORM_PATH}" |
363 | -DMIR_SERVER_PLATFORM_PATH="${MIR_SERVER_PLATFORM_PATH}" |
364 | + -DMIR_CLIENT_PLATFORM_ABI_STRING="${MIR_CLIENT_PLATFORM_ABI}" |
365 | + -DMIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING="${MIR_SERVER_GRAPHICS_PLATFORM_ABI}" |
366 | ) |
367 | |
368 | set( |
369 | |
370 | === modified file 'tests/mir_test_framework/executable_path.cpp' |
371 | --- tests/mir_test_framework/executable_path.cpp 2015-02-13 06:12:34 +0000 |
372 | +++ tests/mir_test_framework/executable_path.cpp 2015-02-20 12:45:33 +0000 |
373 | @@ -47,10 +47,15 @@ |
374 | |
375 | std::string mir_test_framework::server_platform(std::string const& name) |
376 | { |
377 | + std::string libname{name}; |
378 | + |
379 | + if (libname.find(".so") == std::string::npos) |
380 | + libname += ".so." MIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING; |
381 | + |
382 | for (auto const& option : |
383 | {library_path() + "/server-modules/", library_path() + "/server-platform/", std::string(MIR_SERVER_PLATFORM_PATH) + '/'}) |
384 | { |
385 | - auto path_to_test = option + name; |
386 | + auto path_to_test = option + libname; |
387 | if (boost::filesystem::exists(path_to_test)) |
388 | return path_to_test; |
389 | } |
390 | @@ -60,10 +65,15 @@ |
391 | |
392 | std::string mir_test_framework::client_platform(std::string const& name) |
393 | { |
394 | + std::string libname{name}; |
395 | + |
396 | + if (libname.find(".so") == std::string::npos) |
397 | + libname += ".so." MIR_CLIENT_PLATFORM_ABI_STRING; |
398 | + |
399 | for (auto const& option : |
400 | {library_path() + "/client-modules/", library_path() + "/client-platform/", std::string(MIR_CLIENT_PLATFORM_PATH) + '/'}) |
401 | { |
402 | - auto path_to_test = option + name; |
403 | + auto path_to_test = option + libname; |
404 | if (boost::filesystem::exists(path_to_test)) |
405 | return path_to_test; |
406 | } |
407 | |
408 | === modified file 'tests/unit-tests/client/test_client_platform.cpp' |
409 | --- tests/unit-tests/client/test_client_platform.cpp 2015-02-13 06:12:34 +0000 |
410 | +++ tests/unit-tests/client/test_client_platform.cpp 2015-02-20 12:45:33 +0000 |
411 | @@ -79,7 +79,7 @@ |
412 | }; |
413 | |
414 | #ifdef MIR_BUILD_PLATFORM_ANDROID |
415 | -ClientPlatformTraits const android_platform{"android.so", |
416 | +ClientPlatformTraits const android_platform{"android", |
417 | [](MirPlatformPackage& pkg) |
418 | { |
419 | ::memset(&pkg, 0, sizeof(pkg)); |
420 | @@ -94,7 +94,7 @@ |
421 | #endif |
422 | |
423 | #ifdef MIR_BUILD_PLATFORM_MESA |
424 | -ClientPlatformTraits const mesa_platform{"mesa.so", |
425 | +ClientPlatformTraits const mesa_platform{"mesa", |
426 | [](MirPlatformPackage& pkg) |
427 | { |
428 | ::memset(&pkg, 0, sizeof(pkg)); |
429 | |
430 | === modified file 'tests/unit-tests/client/test_probing_client_platform_factory.cpp' |
431 | --- tests/unit-tests/client/test_probing_client_platform_factory.cpp 2015-02-13 06:12:34 +0000 |
432 | +++ tests/unit-tests/client/test_probing_client_platform_factory.cpp 2015-02-20 12:45:33 +0000 |
433 | @@ -36,10 +36,10 @@ |
434 | { |
435 | std::vector<std::shared_ptr<mir::SharedLibrary>> modules; |
436 | #ifdef MIR_BUILD_PLATFORM_MESA |
437 | - modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("mesa.so"))); |
438 | + modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("mesa"))); |
439 | #endif |
440 | #ifdef MIR_BUILD_PLATFORM_ANDROID |
441 | - modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("android.so"))); |
442 | + modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("android"))); |
443 | #endif |
444 | return modules; |
445 | } |
446 | |
447 | === modified file 'tests/unit-tests/graphics/android/test_platform.cpp' |
448 | --- tests/unit-tests/graphics/android/test_platform.cpp 2015-02-13 06:12:34 +0000 |
449 | +++ tests/unit-tests/graphics/android/test_platform.cpp 2015-02-20 12:45:33 +0000 |
450 | @@ -239,7 +239,7 @@ |
451 | |
452 | ON_CALL(hwaccess, hw_get_module(_,_)).WillByDefault(Return(-1)); |
453 | |
454 | - mir::SharedLibrary platform_lib{mtf::server_platform("graphics-android.so")}; |
455 | + mir::SharedLibrary platform_lib{mtf::server_platform("graphics-android")}; |
456 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); |
457 | EXPECT_EQ(mg::PlatformPriority::unsupported, probe()); |
458 | } |
459 | @@ -248,7 +248,7 @@ |
460 | { |
461 | testing::NiceMock<mtd::HardwareAccessMock> hwaccess; |
462 | |
463 | - mir::SharedLibrary platform_lib{mtf::server_platform("graphics-android.so")}; |
464 | + mir::SharedLibrary platform_lib{mtf::server_platform("graphics-android")}; |
465 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); |
466 | EXPECT_EQ(mg::PlatformPriority::best, probe()); |
467 | } |
468 | |
469 | === modified file 'tests/unit-tests/graphics/mesa/test_platform.cpp' |
470 | --- tests/unit-tests/graphics/mesa/test_platform.cpp 2015-02-13 06:12:34 +0000 |
471 | +++ tests/unit-tests/graphics/mesa/test_platform.cpp 2015-02-20 12:45:33 +0000 |
472 | @@ -304,7 +304,7 @@ |
473 | { |
474 | mtf::UdevEnvironment udev_environment; |
475 | |
476 | - mir::SharedLibrary platform_lib{mtf::server_platform("graphics-mesa.so")}; |
477 | + mir::SharedLibrary platform_lib{mtf::server_platform("graphics-mesa")}; |
478 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); |
479 | EXPECT_EQ(mg::PlatformPriority::unsupported, probe()); |
480 | } |
481 | @@ -315,7 +315,7 @@ |
482 | |
483 | udev_environment.add_standard_device("standard-drm-devices"); |
484 | |
485 | - mir::SharedLibrary platform_lib{mtf::server_platform("graphics-mesa.so")}; |
486 | + mir::SharedLibrary platform_lib{mtf::server_platform("graphics-mesa")}; |
487 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); |
488 | EXPECT_EQ(mg::PlatformPriority::best, probe()); |
489 | } |
490 | |
491 | === modified file 'tests/unit-tests/graphics/test_platform_prober.cpp' |
492 | --- tests/unit-tests/graphics/test_platform_prober.cpp 2014-12-17 19:59:21 +0000 |
493 | +++ tests/unit-tests/graphics/test_platform_prober.cpp 2015-02-20 12:45:33 +0000 |
494 | @@ -47,10 +47,10 @@ |
495 | std::vector<std::shared_ptr<mir::SharedLibrary>> modules; |
496 | |
497 | #ifdef MIR_BUILD_PLATFORM_MESA |
498 | - modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::server_platform("graphics-mesa.so"))); |
499 | + modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::server_platform("graphics-mesa"))); |
500 | #endif |
501 | #ifdef MIR_BUILD_PLATFORM_ANDROID |
502 | - modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::server_platform("graphics-android.so"))); |
503 | + modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::server_platform("graphics-android"))); |
504 | #endif |
505 | return modules; |
506 | } |
507 | |
508 | === modified file 'tests/unit-tests/shared_library_test.cpp' |
509 | --- tests/unit-tests/shared_library_test.cpp 2015-02-13 06:12:34 +0000 |
510 | +++ tests/unit-tests/shared_library_test.cpp 2015-02-20 12:45:33 +0000 |
511 | @@ -59,7 +59,7 @@ |
512 | public: |
513 | SharedLibrary() |
514 | : nonexistent_library{"imma_totally_not_a_library"}, |
515 | - existing_library{mtf::client_platform("mesa.so")}, |
516 | + existing_library{mtf::client_platform("dummy.so")}, |
517 | nonexistent_function{"yo_dawg"}, |
518 | existing_function{"create_client_platform"}, |
519 | existent_version{"MIR_CLIENT_PLATFORM_2"}, |
520 | |
521 | === added file 'tests/unit-tests/test_data/libinvalid.so.3' |
522 | === modified file 'tests/unit-tests/test_shared_library_prober.cpp' |
523 | --- tests/unit-tests/test_shared_library_prober.cpp 2015-01-21 07:34:50 +0000 |
524 | +++ tests/unit-tests/test_shared_library_prober.cpp 2015-02-20 12:45:33 +0000 |
525 | @@ -162,6 +162,7 @@ |
526 | EXPECT_CALL(report, loading_library(FilenameMatches("libarmhf.so"))); |
527 | EXPECT_CALL(report, loading_library(FilenameMatches("libi386.so"))); |
528 | EXPECT_CALL(report, loading_library(FilenameMatches("libarm64.so"))); |
529 | + EXPECT_CALL(report, loading_library(FilenameMatches("libinvalid.so.3"))); |
530 | |
531 | mir::libraries_for_path(library_path, report); |
532 | } |
533 | @@ -175,6 +176,7 @@ |
534 | bool amd64_failed{false}; |
535 | bool i386_failed{false}; |
536 | bool arm64_failed{false}; |
537 | + bool invalid_failed{false}; |
538 | |
539 | ON_CALL(report, loading_failed(FilenameMatches("libamd64.so"), _)) |
540 | .WillByDefault(InvokeWithoutArgs([&amd64_failed]() { amd64_failed = true; })); |
541 | @@ -184,8 +186,11 @@ |
542 | .WillByDefault(InvokeWithoutArgs([&i386_failed]() { i386_failed = true; })); |
543 | ON_CALL(report, loading_failed(FilenameMatches("libarm64.so"), _)) |
544 | .WillByDefault(InvokeWithoutArgs([&arm64_failed]() { arm64_failed = true; })); |
545 | + ON_CALL(report, loading_failed(FilenameMatches("libinvalid.so.3"), _)) |
546 | + .WillByDefault(InvokeWithoutArgs([&invalid_failed]() { invalid_failed = true; })); |
547 | |
548 | mir::libraries_for_path(library_path, report); |
549 | |
550 | + EXPECT_TRUE(invalid_failed); |
551 | EXPECT_TRUE(i386_failed || amd64_failed || armhf_failed || arm64_failed); |
552 | } |