Merge lp:~mir-team/mir/server-platform-probing into lp:mir
- server-platform-probing
- Merge into development-branch
Status: | Merged |
---|---|
Merged at revision: | 2254 |
Proposed branch: | lp:~mir-team/mir/server-platform-probing |
Merge into: | lp:mir |
Prerequisite: | lp:~mir-team/mir/probe-client-drivers |
Diff against target: |
2938 lines (+1285/-339) 82 files modified
CMakeLists.txt (+4/-0) debian/control (+35/-33) debian/libmirplatform6driver-android.install (+0/-1) debian/libmirplatform6driver-mesa.install (+0/-1) debian/mir-platform-graphics-android.install (+1/-0) debian/mir-platform-graphics-mesa.install (+1/-0) debian/mir-test-tools.install (+1/-1) debian/rules (+1/-14) include/platform/mir/graphics/platform.h (+31/-1) include/platform/mir/module_properties.h (+37/-0) platform-ABI-sha1sums (+2/-1) server-ABI-sha1sums (+2/-1) src/CMakeLists.txt (+1/-6) src/client/default_connection_configuration.cpp (+1/-1) src/common/graphics/android/mir_native_window.cpp (+0/-1) src/include/platform/mir/graphics/platform_probe.h (+37/-0) src/include/platform/mir/options/configuration.h (+2/-0) src/include/platform/mir/options/default_configuration.h (+5/-0) src/include/platform/mir/shared_library_loader.h (+0/-28) src/include/server/mir/default_server_configuration.h (+3/-0) src/platform/CMakeLists.txt (+6/-6) src/platform/graphics/CMakeLists.txt (+1/-0) src/platform/graphics/platform_probe.cpp (+59/-0) src/platform/options/default_configuration.cpp (+49/-20) src/platform/symbols.map (+3/-3) src/platforms/CMakeLists.txt (+16/-0) src/platforms/android/server/CMakeLists.txt (+16/-25) src/platforms/android/server/platform.cpp (+23/-1) src/platforms/android/server/symbols.map (+10/-0) src/platforms/common/server/symbols.map (+4/-3) src/platforms/mesa/server/CMakeLists.txt (+19/-26) src/platforms/mesa/server/platform.cpp (+32/-1) src/platforms/mesa/server/symbols.map (+16/-0) src/server/CMakeLists.txt (+5/-1) src/server/graphics/CMakeLists.txt (+1/-1) src/server/graphics/default_configuration.cpp (+45/-13) src/server/report/default_server_configuration.cpp (+9/-0) src/server/report/logging/logging_report_factory.cpp (+5/-0) src/server/report/logging_report_factory.h (+1/-0) src/server/report/lttng/CMakeLists.txt (+1/-0) src/server/report/lttng/lttng_report_factory.cpp (+6/-0) src/server/report/lttng/shared_library_prober_report.cpp (+52/-0) src/server/report/lttng/shared_library_prober_report.h (+48/-0) src/server/report/lttng/shared_library_prober_report_tp.h (+70/-0) src/server/report/lttng/tracepoints.c (+1/-0) src/server/report/lttng_report_factory.h (+1/-0) src/server/report/null/null_report_factory.cpp (+11/-0) src/server/report/null_report_factory.h (+2/-0) src/server/report/report_factory.h (+2/-0) src/server/server.cpp (+8/-5) src/server/symbols.map (+2/-0) src/wrapper.c (+3/-0) tests/acceptance-tests/CMakeLists.txt (+1/-5) tests/acceptance-tests/server_configuration_wrapping.cpp (+3/-0) tests/acceptance-tests/test_symbols_required_by_mesa.cpp (+2/-2) tests/include/mir_test_framework/client_platform_factory.h (+2/-2) tests/include/mir_test_framework/executable_path.h (+2/-0) tests/include/mir_test_framework/headless_test.h (+1/-1) tests/include/mir_test_framework/stub_server_platform_factory.h (+49/-0) tests/integration-tests/CMakeLists.txt (+10/-1) tests/mir_test_doubles/CMakeLists.txt (+10/-8) tests/mir_test_framework/CMakeLists.txt (+36/-18) tests/mir_test_framework/executable_path.cpp (+27/-0) tests/mir_test_framework/headless_test.cpp (+5/-27) tests/mir_test_framework/platform_graphics_dummy.cpp (+36/-0) tests/mir_test_framework/stub_client_platform_factory.cpp (+1/-0) tests/mir_test_framework/stub_server_platform_factory.cpp (+72/-0) tests/mir_test_framework/stubbed_graphics_platform.cpp (+11/-7) tests/mir_test_framework/stubbed_server_configuration.cpp (+2/-2) tests/mir_test_framework/symbols-server.map (+8/-0) tests/mir_test_framework/testing_client_options.cpp (+2/-53) tests/unit-tests/CMakeLists.txt (+27/-8) tests/unit-tests/client/CMakeLists.txt (+1/-0) tests/unit-tests/client/test_client_platform.cpp (+4/-4) tests/unit-tests/client/test_probing_client_platform_factory.cpp (+3/-3) tests/unit-tests/graphics/CMakeLists.txt (+1/-0) tests/unit-tests/graphics/android/test_platform.cpp (+26/-0) tests/unit-tests/graphics/mesa/test_platform.cpp (+24/-0) tests/unit-tests/graphics/test_platform_prober.cpp (+215/-0) tests/unit-tests/shared_library_test.cpp (+1/-1) tools/install_on_android.sh (+3/-3) tools/valgrind_suppressions_armhf (+9/-0) |
To merge this branch: | bzr merge lp:~mir-team/mir/server-platform-probing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Cemil Azizoglu (community) | Approve | ||
Alberto Aguirre (community) | Approve | ||
Alan Griffiths | Approve | ||
Chris Halse Rogers | Approve | ||
Daniel van Vugt | Needs Fixing | ||
Robert Carr (community) | Approve | ||
Andreas Pokorny (community) | Approve | ||
Review via email: mp+244982@code.launchpad.net |
This proposal supersedes a proposal from 2014-12-01.
Commit message
Add server-side platform probing support.
Modules are checked in MIR_SERVER_
Modules are probed to determine whether they can drive the available hardware. If a real platform - Android or Mesa - is capable of driving the hardware then it is used; otherwise the stub platform is loaded.
Description of the change
The second part of driver loading.
This removes our update-alternatives cludge, and should make bugs like lp #1396978 a thing of the past.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2123
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
first run over the mp:
+ 996 too much indent
What is the idea behind ModuleProperties? Just human readable information about the module, or something to base the module selection on?
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2124
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal | # |
ModuleProperties is meant to be human-readable information.
Ah. I see I've failed to log that anywhere. I'll update so that the driver selected gets logged.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2132
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
Since you already used 'graphics' in the ABI and since we are slowly moving towards an input platform library:
suggestion: l308: platform_library -> platfom_
l772: catch by reference
l:1671 : why those changes? I thought this only changes the server side part?
l:1746: It seems that the contents of input_recordings/ are not in use anymore, you could also just drop it.
less of a needs fixing: Thinking about input platform: mir::ModuleProp
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
after merging, mirplatformgrap
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
Why do you deal with environment in 918 and the following by just using options.
1 command line option for library
2 environment for library
3 environment for search path
4 command line option for search path
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
s/by/instead of/ on last comment
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
> Why do you deal with environment in 918 and the following by just using
> options.
> environment value and command line option is in the current MP:
nm, forgot about mir::options behavior towards unknown environment variables..
additional nits:
677, 749 for (
With this MP we could rename the graphics_
So with that I am done reviewing.
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
looks good
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2140
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2141
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Robert Carr (robertcarr) wrote : Posted in a previous version of this proposal | # |
lgtm
p.s. if you are going to continue using this indentation style consider proposing an update to the style guide "Use only spaces, and indent 4 spaces at a time.".
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2142
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
Needs another merge with lp:mir .. there are further conflicts in headless_test and more..
Andreas Pokorny (andreas-pokorny) wrote : | # |
did the merging, and while doing that also added "_graphics_" to the C-entry points of the graphics platform ABI.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2145
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2146
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2148
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2149
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Chris Halse Rogers (raof) wrote : | # |
Hm. I think that SharedLibraryPr
I had it in the client platform because we currently have no way to log from the client, but on the server it really just wants to be logged.
I now think the correct solution is to add logging support to the client library and then log everywhere. For a temporary fix, I think it'd be OK to default to log_opt_value rather than none_opt_value.
Otherwise (unsurprisingly!) +1.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2150
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2151
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2152
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2153
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2154
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2155
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andreas Pokorny (andreas-pokorny) wrote : | # |
not blocking but something to look into afterwards: + 730 to + 765, the whole handling of platform library specific configuration options.
The rest works fairly well and looks good to me.
Daniel van Vugt (vanvugt) wrote : | # |
(1) Clients now output log messages (against the will of the client/toolkit author):
[1420010155.311855] (II) Loader: Loading modules from: bin/../
[1420010155.312103] (II) Loader: Loading module: bin/../
[1420010155.312518] (II) Loader: Loading module: bin/../
[1420010155.312695] (II) Loader: Loading module: bin/../
We need to avoid upsetting client/toolkit developers, but also especially users of clients. A library like libmirclient should not write to stdout/stderr except on error.
(2) mirout (et al?) need wrapping applied. See also (1)
$ sudo bin/mirout
[1420010358.848748] (II) Loader: Loading modules from: /usr/local/
[1420010358.848888] (EE) Loader: Failed to load libraries from path: /usr/local/
Could not connect to a display server.
Daniel van Vugt (vanvugt) wrote : | # |
(3) This smells like a bug (?) ...
[1420010081.113978] (WW) Loader: Failed to load module: bin/../
Daniel van Vugt (vanvugt) wrote : | # |
(2) Wrapping fixed here: https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2156
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Robert Carr (robertcarr) wrote : | # |
LGTM! Left some trivial inline thoughts.
Daniel van Vugt (vanvugt) wrote : | # |
(1) Fix proposed: https:/
(2) Fix landed (r2191)
(3) Still needs fixing, maybe?
Daniel van Vugt (vanvugt) wrote : | # |
BTW I haven't done any code review yet. Just manual testing and fixing the obvious issues right now...
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2157
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
Results from manual testing:
(1) Clients now output noisy log messages (against the will of the client/toolkit author):
[1420010155.311855] (II) Loader: Loading modules from: bin/../
[1420010155.312103] (II) Loader: Loading module: bin/../
[1420010155.312518] (II) Loader: Loading module: bin/../
[1420010155.312695] (II) Loader: Loading module: bin/../
Fix proposed: https:/
(3) This warning appears to be new from this branch. Sounds like a bug:
[1420010081.113978] (WW) Loader: Failed to load module: bin/../
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2158
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Chris Halse Rogers (raof) wrote : | # |
LGTM now. I slightly prefer the client output to no client output.
Andreas Pokorny (andreas-pokorny) wrote : | # |
> Results from manual testing:
>
> (1) Clients now output noisy log messages (against the will of the
> client/toolkit author):
> [...]
> Fix proposed: https:/
So it will be addressed there?
> (3) This warning appears to be new from this branch. Sounds like a bug:
> [1420010081.113978] (WW) Loader: Failed to load module: bin/../lib/server-
> modules/
> dummy.so: undefined symbol: _ZN3mir4test4Pi
should be gone now.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2159
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2160
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2161
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
(1) I'd rather have this future bug fixed before it ever affects lp:mir. It becomes a regression if we land this without having fixed the client logging first.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2162
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
anpok: Careful with those spurious merges. Or at least spurious merge comments...?
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2163
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2164
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2165
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2166
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Alberto Aguirre (albaguirre) wrote : | # |
623 + catch (std::runtime_error const& err)
Why not std::exception?
===
2903 +++ tools/install_
2904 @@ -32,11 +32,11 @@
2905 lib/libmirclien
2906 lib/libmircommo
2907 lib/libmirplatf
2908 - lib/libmirplatf
2909 - lib/libmirclien
2910 + lib/platform-
2911 + lib/client-
2912 + lib/server-
2913 lib/libmirproto
2914 lib/libmirclien
2915 - lib/libmirplatf
2916 lib/libmirserve
===
Needs more modifications to work, given the current wrapper (i.e. copying the .mir_xxx executables and creating a bin and lib directory on the android side. But it looks like that's a pre-existing issue and is being addressed in https:/
Looks good otherwise.
Daniel van Vugt (vanvugt) wrote : | # |
Wrapped binaries work perfectly on the Android side if copied using rsync. Not sure if adb push does though.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2167
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
I think the log messages are rather informative. We should go ahead and TA this branch.
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
Gave this branch a final test. It looks good. I'd rather land this and not wait for a minor issue to hold such a large MP up. Hopefully we can address the logging issue before we land on the distro.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Daniel van Vugt (vanvugt) wrote : | # |
Please don't create regressions intentionally. I didn't want to own this one, but somehow I do now.
Daniel van Vugt (vanvugt) wrote : | # |
Hmm, there's a simple way to avoid blocking on the log-level branch actually. Just remove any log calls from mircommon/mirclient that might appear as a result of this branch.
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
I don't regard it as a regression. What module gets loaded is vital information - exactly what logging was designed to do. Besides we are not flooding the terminal (as that was one of the criteria for logging).
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2015-01-22 05:20:46 +0000 | |||
3 | +++ CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
4 | @@ -30,6 +30,10 @@ | |||
5 | 30 | set(MIR_VERSION_MINOR 11) # This should change at least with every MIRSERVER_ABI | 30 | set(MIR_VERSION_MINOR 11) # This should change at least with every MIRSERVER_ABI |
6 | 31 | set(MIR_VERSION_PATCH 0) | 31 | set(MIR_VERSION_PATCH 0) |
7 | 32 | 32 | ||
8 | 33 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) | ||
9 | 34 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) | ||
10 | 35 | add_definitions(-DMIR_VERSION_MICRO=${MIR_VERSION_PATCH}) | ||
11 | 36 | |||
12 | 33 | set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH}) | 37 | set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH}) |
13 | 34 | 38 | ||
14 | 35 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | 39 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) |
15 | 36 | 40 | ||
16 | === modified file 'debian/control' | |||
17 | --- debian/control 2015-01-20 10:07:15 +0000 | |||
18 | +++ debian/control 2015-01-22 15:40:28 +0000 | |||
19 | @@ -59,6 +59,8 @@ | |||
20 | 59 | Contains the shared library containing the Google Protobuf definitions | 59 | Contains the shared library containing the Google Protobuf definitions |
21 | 60 | required for Mir clients and servers. | 60 | required for Mir clients and servers. |
22 | 61 | 61 | ||
23 | 62 | #TODO: Packaging infrastructure for better dependency generation, | ||
24 | 63 | # ala pkg-xorg's xviddriver:Provides and ABI detection. | ||
25 | 62 | Package: libmirserver29 | 64 | Package: libmirserver29 |
26 | 63 | Section: libs | 65 | Section: libs |
27 | 64 | Architecture: i386 amd64 armhf arm64 | 66 | Architecture: i386 amd64 armhf arm64 |
28 | @@ -66,7 +68,7 @@ | |||
29 | 66 | Pre-Depends: ${misc:Pre-Depends} | 68 | Pre-Depends: ${misc:Pre-Depends} |
30 | 67 | Depends: ${misc:Depends}, | 69 | Depends: ${misc:Depends}, |
31 | 68 | ${shlibs:Depends}, | 70 | ${shlibs:Depends}, |
33 | 69 | libmir${platform-driver}-mesa | libmir${platform-driver}-android, | 71 | mir-platform-graphics-mesa | mir-platform-graphics-android, |
34 | 70 | Description: Display server for Ubuntu - server library | 72 | Description: Display server for Ubuntu - server library |
35 | 71 | Mir is a display server running on linux systems, with a focus on efficiency, | 73 | Mir is a display server running on linux systems, with a focus on efficiency, |
36 | 72 | robust operation and a well-defined driver model. | 74 | robust operation and a well-defined driver model. |
37 | @@ -266,6 +268,34 @@ | |||
38 | 266 | Contains the shared libraries required for the Mir server and client. | 268 | Contains the shared libraries required for the Mir server and client. |
39 | 267 | 269 | ||
40 | 268 | # Longer-term these drivers should move out-of-tree | 270 | # Longer-term these drivers should move out-of-tree |
41 | 271 | Package: mir-platform-graphics-mesa | ||
42 | 272 | Section: libs | ||
43 | 273 | Architecture: i386 amd64 armhf arm64 | ||
44 | 274 | Multi-Arch: same | ||
45 | 275 | Pre-Depends: ${misc:Pre-Depends} | ||
46 | 276 | Depends: ${misc:Depends}, | ||
47 | 277 | ${shlibs:Depends}, | ||
48 | 278 | Description: Display server for Ubuntu - platform library for Mesa | ||
49 | 279 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
50 | 280 | robust operation and a well-defined driver model. | ||
51 | 281 | . | ||
52 | 282 | Contains the shared libraries required for the Mir server to interact with | ||
53 | 283 | the hardware platform using the Mesa drivers. | ||
54 | 284 | |||
55 | 285 | Package: mir-platform-graphics-android | ||
56 | 286 | Section: libs | ||
57 | 287 | Architecture: i386 amd64 armhf | ||
58 | 288 | Multi-Arch: same | ||
59 | 289 | Pre-Depends: ${misc:Pre-Depends} | ||
60 | 290 | Depends: ${misc:Depends}, | ||
61 | 291 | ${shlibs:Depends}, | ||
62 | 292 | Description: Display server for Ubuntu - platform library for Android | ||
63 | 293 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
64 | 294 | robust operation and a well-defined driver model. | ||
65 | 295 | . | ||
66 | 296 | Contains the shared libraries required for the Mir server to interact with | ||
67 | 297 | the hardware platform using the Android drivers. | ||
68 | 298 | |||
69 | 269 | Package: mir-client-platform-mesa | 299 | Package: mir-client-platform-mesa |
70 | 270 | Section: libs | 300 | Section: libs |
71 | 271 | Architecture: i386 amd64 armhf arm64 | 301 | Architecture: i386 amd64 armhf arm64 |
72 | @@ -294,42 +324,14 @@ | |||
73 | 294 | Contains the shared libraries required for the Mir clients to interact with | 324 | Contains the shared libraries required for the Mir clients to interact with |
74 | 295 | the underlying hardware platform using the Android drivers. | 325 | the underlying hardware platform using the Android drivers. |
75 | 296 | 326 | ||
76 | 297 | Package: libmirplatform6driver-mesa | ||
77 | 298 | Section: libs | ||
78 | 299 | Architecture: i386 amd64 armhf arm64 | ||
79 | 300 | Multi-Arch: same | ||
80 | 301 | Pre-Depends: ${misc:Pre-Depends} | ||
81 | 302 | Depends: ${misc:Depends}, | ||
82 | 303 | ${shlibs:Depends}, | ||
83 | 304 | Description: Display server for Ubuntu - platform library for Mesa | ||
84 | 305 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
85 | 306 | robust operation and a well-defined driver model. | ||
86 | 307 | . | ||
87 | 308 | Contains the shared libraries required for the Mir server to interact with | ||
88 | 309 | the hardware platform using the Mesa drivers. | ||
89 | 310 | |||
90 | 311 | Package: libmirplatform6driver-android | ||
91 | 312 | Section: libs | ||
92 | 313 | Architecture: i386 amd64 armhf | ||
93 | 314 | Multi-Arch: same | ||
94 | 315 | Pre-Depends: ${misc:Pre-Depends} | ||
95 | 316 | Depends: ${misc:Depends}, | ||
96 | 317 | ${shlibs:Depends}, | ||
97 | 318 | Description: Display server for Ubuntu - platform library for Android | ||
98 | 319 | Mir is a display server running on linux systems, with a focus on efficiency, | ||
99 | 320 | robust operation and a well-defined driver model. | ||
100 | 321 | . | ||
101 | 322 | Contains the shared libraries required for the Mir server to interact with | ||
102 | 323 | the hardware platform using the Android drivers. | ||
103 | 324 | |||
104 | 325 | Package: mir-graphics-drivers-desktop | 327 | Package: mir-graphics-drivers-desktop |
105 | 326 | Section: libs | 328 | Section: libs |
106 | 327 | Architecture: i386 amd64 armhf arm64 | 329 | Architecture: i386 amd64 armhf arm64 |
107 | 328 | Multi-Arch: same | 330 | Multi-Arch: same |
108 | 329 | Pre-Depends: ${misc:Pre-Depends} | 331 | Pre-Depends: ${misc:Pre-Depends} |
109 | 330 | Depends: ${misc:Depends}, | 332 | Depends: ${misc:Depends}, |
112 | 331 | libmir${platform-driver}-mesa, | 333 | mir-platform-graphics-mesa, |
113 | 332 | mir-client-platform-mesa | 334 | mir-client-platform-mesa, |
114 | 333 | Description: Display server for Ubuntu - desktop driver metapackage | 335 | Description: Display server for Ubuntu - desktop driver metapackage |
115 | 334 | Mir is a display server running on linux systems, with a focus on efficiency, | 336 | Mir is a display server running on linux systems, with a focus on efficiency, |
116 | 335 | robust operation and a well-defined driver model. | 337 | robust operation and a well-defined driver model. |
117 | @@ -343,8 +345,8 @@ | |||
118 | 343 | Multi-Arch: same | 345 | Multi-Arch: same |
119 | 344 | Pre-Depends: ${misc:Pre-Depends} | 346 | Pre-Depends: ${misc:Pre-Depends} |
120 | 345 | Depends: ${misc:Depends}, | 347 | Depends: ${misc:Depends}, |
123 | 346 | libmir${platform-driver}-android, | 348 | mir-platform-graphics-android, |
124 | 347 | mir-client-platform-android | 349 | mir-client-platform-android, |
125 | 348 | Description: Display server for Ubuntu - android driver metapackage | 350 | Description: Display server for Ubuntu - android driver metapackage |
126 | 349 | Mir is a display server running on linux systems, with a focus on efficiency, | 351 | Mir is a display server running on linux systems, with a focus on efficiency, |
127 | 350 | robust operation and a well-defined driver model. | 352 | robust operation and a well-defined driver model. |
128 | 351 | 353 | ||
129 | === removed file 'debian/libmirplatform6driver-android.install' | |||
130 | --- debian/libmirplatform6driver-android.install 2015-01-14 06:39:13 +0000 | |||
131 | +++ debian/libmirplatform6driver-android.install 1970-01-01 00:00:00 +0000 | |||
132 | @@ -1,1 +0,0 @@ | |||
133 | 1 | usr/lib/*/mir/platform*driver/android/* | ||
134 | 2 | 0 | ||
135 | === removed file 'debian/libmirplatform6driver-mesa.install' | |||
136 | --- debian/libmirplatform6driver-mesa.install 2015-01-14 06:39:13 +0000 | |||
137 | +++ debian/libmirplatform6driver-mesa.install 1970-01-01 00:00:00 +0000 | |||
138 | @@ -1,1 +0,0 @@ | |||
139 | 1 | usr/lib/*/mir/platform*driver/mesa/* | ||
140 | 2 | 0 | ||
141 | === added file 'debian/mir-platform-graphics-android.install' | |||
142 | --- debian/mir-platform-graphics-android.install 1970-01-01 00:00:00 +0000 | |||
143 | +++ debian/mir-platform-graphics-android.install 2015-01-22 15:40:28 +0000 | |||
144 | @@ -0,0 +1,1 @@ | |||
145 | 1 | usr/lib/*/mir/server-platform/graphics-android.so | ||
146 | 0 | 2 | ||
147 | === added file 'debian/mir-platform-graphics-mesa.install' | |||
148 | --- debian/mir-platform-graphics-mesa.install 1970-01-01 00:00:00 +0000 | |||
149 | +++ debian/mir-platform-graphics-mesa.install 2015-01-22 15:40:28 +0000 | |||
150 | @@ -0,0 +1,1 @@ | |||
151 | 1 | usr/lib/*/mir/server-platform/graphics-mesa.so | ||
152 | 0 | 2 | ||
153 | === modified file 'debian/mir-test-tools.install' | |||
154 | --- debian/mir-test-tools.install 2015-01-14 06:39:13 +0000 | |||
155 | +++ debian/mir-test-tools.install 2015-01-22 15:40:28 +0000 | |||
156 | @@ -5,5 +5,5 @@ | |||
157 | 5 | usr/bin/mir_performance_tests | 5 | usr/bin/mir_performance_tests |
158 | 6 | usr/lib/*/mir/tools/libmirclientlttng.so | 6 | usr/lib/*/mir/tools/libmirclientlttng.so |
159 | 7 | usr/lib/*/mir/tools/libmirserverlttng.so | 7 | usr/lib/*/mir/tools/libmirserverlttng.so |
161 | 8 | usr/lib/*/libmirplatformstub.so | 8 | usr/lib/*/mir/server-platform/graphics-dummy.so |
162 | 9 | usr/lib/*/mir/client-platform/dummy.so | 9 | usr/lib/*/mir/client-platform/dummy.so |
163 | 10 | 10 | ||
164 | === modified file 'debian/rules' | |||
165 | --- debian/rules 2015-01-16 02:57:31 +0000 | |||
166 | +++ debian/rules 2015-01-22 15:40:28 +0000 | |||
167 | @@ -13,8 +13,6 @@ | |||
168 | 13 | export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.9 | 13 | export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.9 |
169 | 14 | export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9 | 14 | export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9 |
170 | 15 | 15 | ||
171 | 16 | export PLATFORM_DRIVER = platform6driver | ||
172 | 17 | |||
173 | 18 | %: | 16 | %: |
174 | 19 | dh $@ --parallel --fail-missing | 17 | dh $@ --parallel --fail-missing |
175 | 20 | 18 | ||
176 | @@ -57,15 +55,4 @@ | |||
177 | 57 | # Delete the symlink so that --fail-missing doesn't think we've missed it | 55 | # Delete the symlink so that --fail-missing doesn't think we've missed it |
178 | 58 | # accidentally. | 56 | # accidentally. |
179 | 59 | -rm debian/tmp/usr/lib/*/libmirprotobuf.so | 57 | -rm debian/tmp/usr/lib/*/libmirprotobuf.so |
192 | 60 | dh_install --fail-missing \ | 58 | dh_install --fail-missing |
181 | 61 | -Xusr/lib/$(DEB_HOST_MULTIARCH)/libmir$(PLATFORM_DRIVER).so | ||
182 | 62 | sh debian/install_ld_so_conf.sh $(DEB_HOST_ARCH) $(DEB_HOST_MULTIARCH) | ||
183 | 63 | |||
184 | 64 | override_dh_installdeb: | ||
185 | 65 | sh debian/create_postinst_prerm_scripts.sh \ | ||
186 | 66 | $(DEB_HOST_ARCH) $(DEB_HOST_MULTIARCH) | ||
187 | 67 | dh_installdeb | ||
188 | 68 | |||
189 | 69 | override_dh_gencontrol: | ||
190 | 70 | dh_gencontrol -- \ | ||
191 | 71 | -Vplatform-driver=$(PLATFORM_DRIVER) | ||
193 | 72 | 59 | ||
194 | === modified file 'include/platform/mir/graphics/platform.h' | |||
195 | --- include/platform/mir/graphics/platform.h 2015-01-14 06:39:13 +0000 | |||
196 | +++ include/platform/mir/graphics/platform.h 2015-01-22 15:40:28 +0000 | |||
197 | @@ -24,6 +24,8 @@ | |||
198 | 24 | #include <EGL/egl.h> | 24 | #include <EGL/egl.h> |
199 | 25 | #include <memory> | 25 | #include <memory> |
200 | 26 | 26 | ||
201 | 27 | #include "mir/module_properties.h" | ||
202 | 28 | |||
203 | 27 | namespace mir | 29 | namespace mir |
204 | 28 | { | 30 | { |
205 | 29 | class EmergencyCleanupRegistry; | 31 | class EmergencyCleanupRegistry; |
206 | @@ -93,6 +95,25 @@ | |||
207 | 93 | }; | 95 | }; |
208 | 94 | 96 | ||
209 | 95 | /** | 97 | /** |
210 | 98 | * A measure of how well a platform supports a device | ||
211 | 99 | * | ||
212 | 100 | * \note This is compared as an integer; best + 1 is a valid PlatformPriority that | ||
213 | 101 | * will be used in preference to a module that reports best. | ||
214 | 102 | * Platform modules distributed with Mir will never use a priority higher | ||
215 | 103 | * than best. | ||
216 | 104 | */ | ||
217 | 105 | enum PlatformPriority : uint32_t | ||
218 | 106 | { | ||
219 | 107 | unsupported = 0, /**< Unable to function at all on this device */ | ||
220 | 108 | supported = 128, /**< Capable of providing a functioning Platform on this device, | ||
221 | 109 | * possibly with degraded performance or features. | ||
222 | 110 | */ | ||
223 | 111 | best = 256 /**< Capable of providing a Platform with the best features and | ||
224 | 112 | * performance this device is capable of. | ||
225 | 113 | */ | ||
226 | 114 | }; | ||
227 | 115 | |||
228 | 116 | /** | ||
229 | 96 | * Function prototype used to return a new host graphics platform. The host graphics platform | 117 | * Function prototype used to return a new host graphics platform. The host graphics platform |
230 | 97 | * is the system entity that owns the physical display and is a mir host server. | 118 | * is the system entity that owns the physical display and is a mir host server. |
231 | 98 | * | 119 | * |
232 | @@ -142,8 +163,17 @@ | |||
233 | 142 | */ | 163 | */ |
234 | 143 | extern "C" typedef void(*AddPlatformOptions)( | 164 | extern "C" typedef void(*AddPlatformOptions)( |
235 | 144 | boost::program_options::options_description& config); | 165 | boost::program_options::options_description& config); |
237 | 145 | extern "C" void add_platform_options( | 166 | extern "C" void add_graphics_platform_options( |
238 | 146 | boost::program_options::options_description& config); | 167 | boost::program_options::options_description& config); |
239 | 168 | |||
240 | 169 | // TODO: We actually need to be more granular here; on a device with more | ||
241 | 170 | // than one graphics system we may need a different platform per GPU, | ||
242 | 171 | // so we should be associating platforms with graphics devices in some way | ||
243 | 172 | extern "C" typedef PlatformPriority(*PlatformProbe)(); | ||
244 | 173 | extern "C" PlatformPriority probe_graphcis_platform(); | ||
245 | 174 | |||
246 | 175 | extern "C" typedef ModuleProperties const*(*DescribeModule)(); | ||
247 | 176 | extern "C" ModuleProperties const* describe_graphics_module(); | ||
248 | 147 | } | 177 | } |
249 | 148 | } | 178 | } |
250 | 149 | 179 | ||
251 | 150 | 180 | ||
252 | === added file 'include/platform/mir/module_properties.h' | |||
253 | --- include/platform/mir/module_properties.h 1970-01-01 00:00:00 +0000 | |||
254 | +++ include/platform/mir/module_properties.h 2015-01-22 15:40:28 +0000 | |||
255 | @@ -0,0 +1,37 @@ | |||
256 | 1 | /* | ||
257 | 2 | * Copyright © 2014 Canonical Ltd. | ||
258 | 3 | * | ||
259 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
260 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
261 | 6 | * as published by the Free Software Foundation. | ||
262 | 7 | * | ||
263 | 8 | * This program is distributed in the hope that it will be useful, | ||
264 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
265 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
266 | 11 | * GNU Lesser General Public License for more details. | ||
267 | 12 | * | ||
268 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
269 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
270 | 15 | * | ||
271 | 16 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | ||
272 | 17 | */ | ||
273 | 18 | |||
274 | 19 | #ifndef MIR_PLATFORM_MODULE_PROPERTIES_H_ | ||
275 | 20 | #define MIR_PLATFORM_MODULE_PROPERTIES_H_ | ||
276 | 21 | |||
277 | 22 | namespace mir | ||
278 | 23 | { | ||
279 | 24 | |||
280 | 25 | /** | ||
281 | 26 | * Describes a platform module | ||
282 | 27 | */ | ||
283 | 28 | struct ModuleProperties | ||
284 | 29 | { | ||
285 | 30 | char const* name; | ||
286 | 31 | int major_version; | ||
287 | 32 | int minor_version; | ||
288 | 33 | int micro_version; | ||
289 | 34 | }; | ||
290 | 35 | } | ||
291 | 36 | |||
292 | 37 | #endif /* MIR_PLATFORM_MODULE_PROPERTIES_H_ */ | ||
293 | 0 | 38 | ||
294 | === modified file 'platform-ABI-sha1sums' | |||
295 | --- platform-ABI-sha1sums 2015-01-20 03:21:20 +0000 | |||
296 | +++ platform-ABI-sha1sums 2015-01-22 15:40:28 +0000 | |||
297 | @@ -49,9 +49,10 @@ | |||
298 | 49 | 5dc095474ef3e294c0aa4008e9ed997bdb21d34c include/platform/mir/graphics/gl_config.h | 49 | 5dc095474ef3e294c0aa4008e9ed997bdb21d34c include/platform/mir/graphics/gl_config.h |
299 | 50 | d0442a5d5d88a4be6e3e1f99e433c1c43a86bfce include/platform/mir/graphics/gl_context.h | 50 | d0442a5d5d88a4be6e3e1f99e433c1c43a86bfce include/platform/mir/graphics/gl_context.h |
300 | 51 | 979d2c1ac723ccef538d9a378228a02b0f173bd7 include/platform/mir/graphics/graphic_buffer_allocator.h | 51 | 979d2c1ac723ccef538d9a378228a02b0f173bd7 include/platform/mir/graphics/graphic_buffer_allocator.h |
302 | 52 | 5d72b98aecb0611060dec8995dbe017a342f7069 include/platform/mir/graphics/platform.h | 52 | d3da5e58e8e1d5953b459d18f9dfe628fe0a25bd include/platform/mir/graphics/platform.h |
303 | 53 | d1ba61e687d75103e9e7aa0409080214f56a990b include/platform/mir/graphics/platform_ipc_operations.h | 53 | d1ba61e687d75103e9e7aa0409080214f56a990b include/platform/mir/graphics/platform_ipc_operations.h |
304 | 54 | 1b77fb3290af00dc7d1c11dcc5388972dacb9ec3 include/platform/mir/graphics/platform_ipc_package.h | 54 | 1b77fb3290af00dc7d1c11dcc5388972dacb9ec3 include/platform/mir/graphics/platform_ipc_package.h |
305 | 55 | f0db0484b8ccc9091e73c80a2a200cb436b48bfb include/platform/mir/graphics/platform_operation_message.h | 55 | f0db0484b8ccc9091e73c80a2a200cb436b48bfb include/platform/mir/graphics/platform_operation_message.h |
306 | 56 | f18876766861e5d4f5ca999dbd176fe1fc520594 include/platform/mir/graphics/renderable.h | 56 | f18876766861e5d4f5ca999dbd176fe1fc520594 include/platform/mir/graphics/renderable.h |
307 | 57 | 5b3872b04b3686fe9a244572ca0787596431a2cb include/platform/mir/module_properties.h | ||
308 | 57 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h | 58 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h |
309 | 58 | 59 | ||
310 | === modified file 'server-ABI-sha1sums' | |||
311 | --- server-ABI-sha1sums 2015-01-22 14:33:14 +0000 | |||
312 | +++ server-ABI-sha1sums 2015-01-22 15:40:28 +0000 | |||
313 | @@ -49,11 +49,12 @@ | |||
314 | 49 | 5dc095474ef3e294c0aa4008e9ed997bdb21d34c include/platform/mir/graphics/gl_config.h | 49 | 5dc095474ef3e294c0aa4008e9ed997bdb21d34c include/platform/mir/graphics/gl_config.h |
315 | 50 | d0442a5d5d88a4be6e3e1f99e433c1c43a86bfce include/platform/mir/graphics/gl_context.h | 50 | d0442a5d5d88a4be6e3e1f99e433c1c43a86bfce include/platform/mir/graphics/gl_context.h |
316 | 51 | 979d2c1ac723ccef538d9a378228a02b0f173bd7 include/platform/mir/graphics/graphic_buffer_allocator.h | 51 | 979d2c1ac723ccef538d9a378228a02b0f173bd7 include/platform/mir/graphics/graphic_buffer_allocator.h |
318 | 52 | 5d72b98aecb0611060dec8995dbe017a342f7069 include/platform/mir/graphics/platform.h | 52 | d3da5e58e8e1d5953b459d18f9dfe628fe0a25bd include/platform/mir/graphics/platform.h |
319 | 53 | d1ba61e687d75103e9e7aa0409080214f56a990b include/platform/mir/graphics/platform_ipc_operations.h | 53 | d1ba61e687d75103e9e7aa0409080214f56a990b include/platform/mir/graphics/platform_ipc_operations.h |
320 | 54 | 1b77fb3290af00dc7d1c11dcc5388972dacb9ec3 include/platform/mir/graphics/platform_ipc_package.h | 54 | 1b77fb3290af00dc7d1c11dcc5388972dacb9ec3 include/platform/mir/graphics/platform_ipc_package.h |
321 | 55 | f0db0484b8ccc9091e73c80a2a200cb436b48bfb include/platform/mir/graphics/platform_operation_message.h | 55 | f0db0484b8ccc9091e73c80a2a200cb436b48bfb include/platform/mir/graphics/platform_operation_message.h |
322 | 56 | f18876766861e5d4f5ca999dbd176fe1fc520594 include/platform/mir/graphics/renderable.h | 56 | f18876766861e5d4f5ca999dbd176fe1fc520594 include/platform/mir/graphics/renderable.h |
323 | 57 | 5b3872b04b3686fe9a244572ca0787596431a2cb include/platform/mir/module_properties.h | ||
324 | 57 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h | 58 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h |
325 | 58 | f4030e400baf8baa9c38e7c6ec6b4a5ad7134aeb include/server/mir/compositor/compositor.h | 59 | f4030e400baf8baa9c38e7c6ec6b4a5ad7134aeb include/server/mir/compositor/compositor.h |
326 | 59 | a9f284ba4b05d58fd3eeb628d1f56fe4ac188526 include/server/mir/compositor/compositor_id.h | 60 | a9f284ba4b05d58fd3eeb628d1f56fe4ac188526 include/server/mir/compositor/compositor_id.h |
327 | 60 | 61 | ||
328 | === modified file 'src/CMakeLists.txt' | |||
329 | --- src/CMakeLists.txt 2015-01-22 03:10:13 +0000 | |||
330 | +++ src/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
331 | @@ -2,12 +2,6 @@ | |||
332 | 2 | # and the platform implementations. | 2 | # and the platform implementations. |
333 | 3 | set(MIRPLATFORM_ABI 6) | 3 | set(MIRPLATFORM_ABI 6) |
334 | 4 | 4 | ||
335 | 5 | set(PLATFORM_DRIVER platform${MIRPLATFORM_ABI}driver) | ||
336 | 6 | set(MIR_PLATFORM_DRIVER mir${PLATFORM_DRIVER}) | ||
337 | 7 | set(MIR_PLATFORM_DRIVER_BINARY lib${MIR_PLATFORM_DRIVER}.so | ||
338 | 8 | CACHE STRING "File name of Mir server platform drivers") | ||
339 | 9 | add_definitions(-DMIR_PLATFORM_DRIVER_BINARY="${MIR_PLATFORM_DRIVER_BINARY}") | ||
340 | 10 | |||
341 | 11 | # We need MIR_CLIENT_PLATFORM_PATH in both libmirclient and the platform | 5 | # We need MIR_CLIENT_PLATFORM_PATH in both libmirclient and the platform |
342 | 12 | # implementations | 6 | # implementations |
343 | 13 | set(MIR_CLIENT_PLATFORM_PATH | 7 | set(MIR_CLIENT_PLATFORM_PATH |
344 | @@ -47,3 +41,4 @@ | |||
345 | 47 | set(MIR_COMMON_OBJECTS ${MIR_COMMON_OBJECTS} PARENT_SCOPE) | 41 | set(MIR_COMMON_OBJECTS ${MIR_COMMON_OBJECTS} PARENT_SCOPE) |
346 | 48 | set(MIR_COMMON_REFERENCES ${MIR_COMMON_REFERENCES} PARENT_SCOPE) | 42 | set(MIR_COMMON_REFERENCES ${MIR_COMMON_REFERENCES} PARENT_SCOPE) |
347 | 49 | set(MIR_CLIENT_PLATFORM_PATH ${MIR_CLIENT_PLATFORM_PATH} PARENT_SCOPE) | 43 | set(MIR_CLIENT_PLATFORM_PATH ${MIR_CLIENT_PLATFORM_PATH} PARENT_SCOPE) |
348 | 44 | set(MIR_SERVER_PLATFORM_PATH ${MIR_SERVER_PLATFORM_PATH} PARENT_SCOPE) | ||
349 | 50 | 45 | ||
350 | === modified file 'src/client/default_connection_configuration.cpp' | |||
351 | --- src/client/default_connection_configuration.cpp 2015-01-19 04:52:47 +0000 | |||
352 | +++ src/client/default_connection_configuration.cpp 2015-01-22 15:40:28 +0000 | |||
353 | @@ -226,7 +226,7 @@ | |||
354 | 226 | [this] () -> std::shared_ptr<mir::SharedLibraryProberReport> | 226 | [this] () -> std::shared_ptr<mir::SharedLibraryProberReport> |
355 | 227 | { | 227 | { |
356 | 228 | auto val_raw = getenv("MIR_CLIENT_SHARED_LIBRARY_PROBER_REPORT"); | 228 | auto val_raw = getenv("MIR_CLIENT_SHARED_LIBRARY_PROBER_REPORT"); |
358 | 229 | std::string const val{val_raw ? val_raw : off_opt_val}; | 229 | std::string const val{val_raw ? val_raw : log_opt_val}; |
359 | 230 | if (val == log_opt_val) | 230 | if (val == log_opt_val) |
360 | 231 | return std::make_shared<mir::logging::SharedLibraryProberReport>(the_logger()); | 231 | return std::make_shared<mir::logging::SharedLibraryProberReport>(the_logger()); |
361 | 232 | else if (val == lttng_opt_val) | 232 | else if (val == lttng_opt_val) |
362 | 233 | 233 | ||
363 | === modified file 'src/common/graphics/android/mir_native_window.cpp' | |||
364 | --- src/common/graphics/android/mir_native_window.cpp 2015-01-14 06:39:13 +0000 | |||
365 | +++ src/common/graphics/android/mir_native_window.cpp 2015-01-22 15:40:28 +0000 | |||
366 | @@ -20,7 +20,6 @@ | |||
367 | 20 | #include "mir/graphics/android/android_driver_interpreter.h" | 20 | #include "mir/graphics/android/android_driver_interpreter.h" |
368 | 21 | #include "mir/graphics/android/sync_fence.h" | 21 | #include "mir/graphics/android/sync_fence.h" |
369 | 22 | 22 | ||
370 | 23 | #include <iostream> | ||
371 | 24 | #include <boost/exception/diagnostic_information.hpp> | 23 | #include <boost/exception/diagnostic_information.hpp> |
372 | 25 | 24 | ||
373 | 26 | namespace mg=mir::graphics; | 25 | namespace mg=mir::graphics; |
374 | 27 | 26 | ||
375 | === added file 'src/include/platform/mir/graphics/platform_probe.h' | |||
376 | --- src/include/platform/mir/graphics/platform_probe.h 1970-01-01 00:00:00 +0000 | |||
377 | +++ src/include/platform/mir/graphics/platform_probe.h 2015-01-22 15:40:28 +0000 | |||
378 | @@ -0,0 +1,37 @@ | |||
379 | 1 | /* | ||
380 | 2 | * Copyright © 2014 Canonical Ltd. | ||
381 | 3 | * | ||
382 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
383 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
384 | 6 | * as published by the Free Software Foundation. | ||
385 | 7 | * | ||
386 | 8 | * This program is distributed in the hope that it will be useful, | ||
387 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
388 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
389 | 11 | * GNU Lesser General Public License for more details. | ||
390 | 12 | * | ||
391 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
392 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
393 | 15 | * | ||
394 | 16 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | ||
395 | 17 | */ | ||
396 | 18 | |||
397 | 19 | #ifndef MIR_GRAPHICS_PLATFORM_PROBE_H_ | ||
398 | 20 | #define MIR_GRAPHICS_PLATFORM_PROBE_H_ | ||
399 | 21 | |||
400 | 22 | #include <vector> | ||
401 | 23 | #include <memory> | ||
402 | 24 | #include "mir/shared_library.h" | ||
403 | 25 | |||
404 | 26 | namespace mir | ||
405 | 27 | { | ||
406 | 28 | namespace graphics | ||
407 | 29 | { | ||
408 | 30 | class Platform; | ||
409 | 31 | |||
410 | 32 | std::shared_ptr<SharedLibrary> module_for_device(std::vector<std::shared_ptr<SharedLibrary>> const& modules); | ||
411 | 33 | |||
412 | 34 | } | ||
413 | 35 | } | ||
414 | 36 | |||
415 | 37 | #endif // MIR_GRAPHICS_PLATFORM_PROBE_H_ | ||
416 | 0 | 38 | ||
417 | === modified file 'src/include/platform/mir/options/configuration.h' | |||
418 | --- src/include/platform/mir/options/configuration.h 2015-01-14 06:39:13 +0000 | |||
419 | +++ src/include/platform/mir/options/configuration.h 2015-01-22 15:40:28 +0000 | |||
420 | @@ -33,6 +33,7 @@ | |||
421 | 33 | extern char const* const enable_input_opt; | 33 | extern char const* const enable_input_opt; |
422 | 34 | extern char const* const session_mediator_report_opt; | 34 | extern char const* const session_mediator_report_opt; |
423 | 35 | extern char const* const msg_processor_report_opt; | 35 | extern char const* const msg_processor_report_opt; |
424 | 36 | extern char const* const shared_library_prober_report_opt; | ||
425 | 36 | extern char const* const compositor_report_opt; | 37 | extern char const* const compositor_report_opt; |
426 | 37 | extern char const* const display_report_opt; | 38 | extern char const* const display_report_opt; |
427 | 38 | extern char const* const legacy_input_report_opt; | 39 | extern char const* const legacy_input_report_opt; |
428 | @@ -53,6 +54,7 @@ | |||
429 | 53 | extern char const* const lttng_opt_value; | 54 | extern char const* const lttng_opt_value; |
430 | 54 | 55 | ||
431 | 55 | extern char const* const platform_graphics_lib; | 56 | extern char const* const platform_graphics_lib; |
432 | 57 | extern char const* const platform_path; | ||
433 | 56 | 58 | ||
434 | 57 | class Configuration | 59 | class Configuration |
435 | 58 | { | 60 | { |
436 | 59 | 61 | ||
437 | === modified file 'src/include/platform/mir/options/default_configuration.h' | |||
438 | --- src/include/platform/mir/options/default_configuration.h 2015-01-14 06:39:13 +0000 | |||
439 | +++ src/include/platform/mir/options/default_configuration.h 2015-01-22 15:40:28 +0000 | |||
440 | @@ -25,6 +25,7 @@ | |||
441 | 25 | 25 | ||
442 | 26 | namespace mir | 26 | namespace mir |
443 | 27 | { | 27 | { |
444 | 28 | class SharedLibrary; | ||
445 | 28 | namespace options | 29 | namespace options |
446 | 29 | { | 30 | { |
447 | 30 | class DefaultConfiguration : public Configuration | 31 | class DefaultConfiguration : public Configuration |
448 | @@ -42,6 +43,10 @@ | |||
449 | 42 | boost::program_options::options_description_easy_init add_options(); | 43 | boost::program_options::options_description_easy_init add_options(); |
450 | 43 | 44 | ||
451 | 44 | private: | 45 | private: |
452 | 46 | // MUST be the first member to ensure it's destroyed last, lest we attempt to | ||
453 | 47 | // call destructors in DSOs we've unloaded. | ||
454 | 48 | std::shared_ptr<SharedLibrary> platform_graphics_library; | ||
455 | 49 | |||
456 | 45 | void add_platform_options(); | 50 | void add_platform_options(); |
457 | 46 | // accessed via the base interface, when access to add_options() has been "lost" | 51 | // accessed via the base interface, when access to add_options() has been "lost" |
458 | 47 | std::shared_ptr<options::Option> the_options() const override; | 52 | std::shared_ptr<options::Option> the_options() const override; |
459 | 48 | 53 | ||
460 | === removed file 'src/include/platform/mir/shared_library_loader.h' | |||
461 | --- src/include/platform/mir/shared_library_loader.h 2015-01-14 06:39:13 +0000 | |||
462 | +++ src/include/platform/mir/shared_library_loader.h 1970-01-01 00:00:00 +0000 | |||
463 | @@ -1,28 +0,0 @@ | |||
464 | 1 | /* | ||
465 | 2 | * Copyright © 2013 Canonical Ltd. | ||
466 | 3 | * | ||
467 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
468 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
469 | 6 | * as published by the Free Software Foundation. | ||
470 | 7 | * | ||
471 | 8 | * This program is distributed in the hope that it will be useful, | ||
472 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
473 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
474 | 11 | * GNU Lesser General Public License for more details. | ||
475 | 12 | * | ||
476 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
477 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
478 | 15 | * | ||
479 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | ||
480 | 17 | */ | ||
481 | 18 | |||
482 | 19 | #ifndef MIR_SHARED_LIBRARY_LOADER_H_ | ||
483 | 20 | #define MIR_SHARED_LIBRARY_LOADER_H_ | ||
484 | 21 | |||
485 | 22 | #include <string> | ||
486 | 23 | namespace mir | ||
487 | 24 | { | ||
488 | 25 | class SharedLibrary; | ||
489 | 26 | SharedLibrary const* load_library(std::string const& libname); | ||
490 | 27 | } | ||
491 | 28 | #endif | ||
492 | 29 | 0 | ||
493 | === modified file 'src/include/server/mir/default_server_configuration.h' | |||
494 | --- src/include/server/mir/default_server_configuration.h 2015-01-14 06:39:13 +0000 | |||
495 | +++ src/include/server/mir/default_server_configuration.h 2015-01-22 15:40:28 +0000 | |||
496 | @@ -40,6 +40,7 @@ | |||
497 | 40 | namespace mir | 40 | namespace mir |
498 | 41 | { | 41 | { |
499 | 42 | class ServerActionQueue; | 42 | class ServerActionQueue; |
500 | 43 | class SharedLibraryProberReport; | ||
501 | 43 | 44 | ||
502 | 44 | namespace compositor | 45 | namespace compositor |
503 | 45 | { | 46 | { |
504 | @@ -315,6 +316,7 @@ | |||
505 | 315 | 316 | ||
506 | 316 | virtual std::shared_ptr<time::Clock> the_clock(); | 317 | virtual std::shared_ptr<time::Clock> the_clock(); |
507 | 317 | virtual std::shared_ptr<ServerActionQueue> the_server_action_queue(); | 318 | virtual std::shared_ptr<ServerActionQueue> the_server_action_queue(); |
508 | 319 | virtual std::shared_ptr<SharedLibraryProberReport> the_shared_library_prober_report(); | ||
509 | 318 | 320 | ||
510 | 319 | protected: | 321 | protected: |
511 | 320 | std::shared_ptr<options::Option> the_options() const; | 322 | std::shared_ptr<options::Option> the_options() const; |
512 | @@ -424,6 +426,7 @@ | |||
513 | 424 | CachedPtr<scene::CoordinateTranslator> coordinate_translator; | 426 | CachedPtr<scene::CoordinateTranslator> coordinate_translator; |
514 | 425 | CachedPtr<EmergencyCleanup> emergency_cleanup; | 427 | CachedPtr<EmergencyCleanup> emergency_cleanup; |
515 | 426 | CachedPtr<shell::HostLifecycleEventListener> host_lifecycle_event_listener; | 428 | CachedPtr<shell::HostLifecycleEventListener> host_lifecycle_event_listener; |
516 | 429 | CachedPtr<SharedLibraryProberReport> shared_library_prober_report; | ||
517 | 427 | 430 | ||
518 | 428 | private: | 431 | private: |
519 | 429 | std::shared_ptr<options::Configuration> const configuration_options; | 432 | std::shared_ptr<options::Configuration> const configuration_options; |
520 | 430 | 433 | ||
521 | === modified file 'src/platform/CMakeLists.txt' | |||
522 | --- src/platform/CMakeLists.txt 2015-01-14 06:39:13 +0000 | |||
523 | +++ src/platform/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
524 | @@ -7,12 +7,10 @@ | |||
525 | 7 | 7 | ||
526 | 8 | set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) | 8 | set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) |
527 | 9 | 9 | ||
531 | 10 | add_library(mirplatformobjects OBJECT | 10 | add_definitions(-DMIR_SERVER_PLATFORM_PATH="${MIR_SERVER_PLATFORM_PATH}") |
532 | 11 | shared_library_loader.cpp | 11 | add_definitions(-DMIR_SERVER_GRAPHICS_PLATFORM_VERSION="${MIR_SERVER_GRAPHICS_PLATFORM_VERSION}") |
530 | 12 | ) | ||
533 | 13 | 12 | ||
534 | 14 | set(MIR_PLATFORM_OBJECTS | 13 | set(MIR_PLATFORM_OBJECTS |
535 | 15 | $<TARGET_OBJECTS:mirplatformobjects> | ||
536 | 16 | $<TARGET_OBJECTS:mirplatformgraphicscommon> | 14 | $<TARGET_OBJECTS:mirplatformgraphicscommon> |
537 | 17 | $<TARGET_OBJECTS:miroptions> | 15 | $<TARGET_OBJECTS:miroptions> |
538 | 18 | $<TARGET_OBJECTS:mirfatal> | 16 | $<TARGET_OBJECTS:mirfatal> |
539 | @@ -31,17 +29,19 @@ | |||
540 | 31 | ) | 29 | ) |
541 | 32 | 30 | ||
542 | 33 | target_link_libraries(mirplatform | 31 | target_link_libraries(mirplatform |
543 | 32 | |||
544 | 34 | mircommon | 33 | mircommon |
545 | 35 | ${MIR_PLATFORM_REFERENCES} | 34 | ${MIR_PLATFORM_REFERENCES} |
546 | 36 | ) | 35 | ) |
547 | 37 | 36 | ||
549 | 38 | set_target_properties(mirplatform | 37 | set_target_properties( |
550 | 38 | mirplatform | ||
551 | 39 | |||
552 | 39 | PROPERTIES | 40 | PROPERTIES |
553 | 40 | SOVERSION ${MIRPLATFORM_ABI} | 41 | SOVERSION ${MIRPLATFORM_ABI} |
554 | 41 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" | 42 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" |
555 | 42 | ) | 43 | ) |
556 | 43 | 44 | ||
557 | 44 | |||
558 | 45 | install(TARGETS mirplatform LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | 45 | install(TARGETS mirplatform LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
559 | 46 | 46 | ||
560 | 47 | add_subdirectory(graphics/) | 47 | add_subdirectory(graphics/) |
561 | 48 | 48 | ||
562 | === modified file 'src/platform/graphics/CMakeLists.txt' | |||
563 | --- src/platform/graphics/CMakeLists.txt 2015-01-14 06:39:13 +0000 | |||
564 | +++ src/platform/graphics/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
565 | @@ -12,6 +12,7 @@ | |||
566 | 12 | gl_program.cpp | 12 | gl_program.cpp |
567 | 13 | gl_texture.cpp | 13 | gl_texture.cpp |
568 | 14 | tessellation_helpers.cpp | 14 | tessellation_helpers.cpp |
569 | 15 | platform_probe.cpp | ||
570 | 15 | ) | 16 | ) |
571 | 16 | 17 | ||
572 | 17 | add_library(mirplatformgraphicscommon OBJECT | 18 | add_library(mirplatformgraphicscommon OBJECT |
573 | 18 | 19 | ||
574 | === added file 'src/platform/graphics/platform_probe.cpp' | |||
575 | --- src/platform/graphics/platform_probe.cpp 1970-01-01 00:00:00 +0000 | |||
576 | +++ src/platform/graphics/platform_probe.cpp 2015-01-22 15:40:28 +0000 | |||
577 | @@ -0,0 +1,59 @@ | |||
578 | 1 | /* | ||
579 | 2 | * Copyright © 2014 Canonical Ltd. | ||
580 | 3 | * | ||
581 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
582 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
583 | 6 | * as published by the Free Software Foundation. | ||
584 | 7 | * | ||
585 | 8 | * This program is distributed in the hope that it will be useful, | ||
586 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
587 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
588 | 11 | * GNU Lesser General Public License for more details. | ||
589 | 12 | * | ||
590 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
591 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
592 | 15 | * | ||
593 | 16 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | ||
594 | 17 | */ | ||
595 | 18 | |||
596 | 19 | #include "mir/logging/logger.h" | ||
597 | 20 | #include "mir/graphics/platform.h" | ||
598 | 21 | #include "mir/graphics/platform_probe.h" | ||
599 | 22 | |||
600 | 23 | #include <string> | ||
601 | 24 | #include <boost/throw_exception.hpp> | ||
602 | 25 | |||
603 | 26 | namespace ml = mir::logging; | ||
604 | 27 | |||
605 | 28 | std::shared_ptr<mir::SharedLibrary> | ||
606 | 29 | mir::graphics::module_for_device(std::vector<std::shared_ptr<SharedLibrary>> const& modules) | ||
607 | 30 | { | ||
608 | 31 | mir::graphics::PlatformPriority best_priority_so_far = mir::graphics::unsupported; | ||
609 | 32 | std::shared_ptr<mir::SharedLibrary> best_module_so_far; | ||
610 | 33 | for (auto& module : modules) | ||
611 | 34 | { | ||
612 | 35 | try | ||
613 | 36 | { | ||
614 | 37 | auto probe = module->load_function<mir::graphics::PlatformProbe>("probe_graphics_platform", | ||
615 | 38 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | ||
616 | 39 | auto module_priority = probe(); | ||
617 | 40 | if (module_priority > best_priority_so_far) | ||
618 | 41 | { | ||
619 | 42 | best_priority_so_far = module_priority; | ||
620 | 43 | best_module_so_far = module; | ||
621 | 44 | } | ||
622 | 45 | } | ||
623 | 46 | catch (std::runtime_error const& err) | ||
624 | 47 | { | ||
625 | 48 | // Tried to probe a SharedLibrary that isn't a platform module? | ||
626 | 49 | ml::log(ml::Severity::warning, | ||
627 | 50 | std::string{"Failed to probe module. Not a platform library? Error: "} + err.what(), | ||
628 | 51 | "Platform Probing"); | ||
629 | 52 | } | ||
630 | 53 | } | ||
631 | 54 | if (best_priority_so_far > mir::graphics::unsupported) | ||
632 | 55 | { | ||
633 | 56 | return best_module_so_far; | ||
634 | 57 | } | ||
635 | 58 | BOOST_THROW_EXCEPTION((std::runtime_error{"Failed to find platform for current system"})); | ||
636 | 59 | } | ||
637 | 0 | 60 | ||
638 | === modified file 'src/platform/options/default_configuration.cpp' | |||
639 | --- src/platform/options/default_configuration.cpp 2015-01-14 06:39:13 +0000 | |||
640 | +++ src/platform/options/default_configuration.cpp 2015-01-22 15:40:28 +0000 | |||
641 | @@ -17,11 +17,13 @@ | |||
642 | 17 | */ | 17 | */ |
643 | 18 | 18 | ||
644 | 19 | #include "mir/shared_library.h" | 19 | #include "mir/shared_library.h" |
645 | 20 | #include "mir/shared_library_loader.h" | ||
646 | 21 | #include "mir/options/default_configuration.h" | 20 | #include "mir/options/default_configuration.h" |
647 | 22 | #include "mir/graphics/platform.h" | 21 | #include "mir/graphics/platform.h" |
648 | 23 | #include "mir/default_configuration.h" | 22 | #include "mir/default_configuration.h" |
649 | 24 | #include "mir/abnormal_exit.h" | 23 | #include "mir/abnormal_exit.h" |
650 | 24 | #include "mir/shared_library_prober.h" | ||
651 | 25 | #include "mir/logging/null_shared_library_prober_report.h" | ||
652 | 26 | #include "mir/graphics/platform_probe.h" | ||
653 | 25 | 27 | ||
654 | 26 | #include <dlfcn.h> | 28 | #include <dlfcn.h> |
655 | 27 | 29 | ||
656 | @@ -39,6 +41,7 @@ | |||
657 | 39 | char const* const mo::connector_report_opt = "connector-report"; | 41 | char const* const mo::connector_report_opt = "connector-report"; |
658 | 40 | char const* const mo::scene_report_opt = "scene-report"; | 42 | char const* const mo::scene_report_opt = "scene-report"; |
659 | 41 | char const* const mo::input_report_opt = "input-report"; | 43 | char const* const mo::input_report_opt = "input-report"; |
660 | 44 | char const* const mo::shared_library_prober_report_opt = "shared-library-prober-report"; | ||
661 | 42 | char const* const mo::host_socket_opt = "host-socket"; | 45 | char const* const mo::host_socket_opt = "host-socket"; |
662 | 43 | char const* const mo::frontend_threads_opt = "ipc-thread-pool"; | 46 | char const* const mo::frontend_threads_opt = "ipc-thread-pool"; |
663 | 44 | char const* const mo::name_opt = "name"; | 47 | char const* const mo::name_opt = "name"; |
664 | @@ -52,12 +55,12 @@ | |||
665 | 52 | char const* const mo::lttng_opt_value = "lttng"; | 55 | char const* const mo::lttng_opt_value = "lttng"; |
666 | 53 | 56 | ||
667 | 54 | char const* const mo::platform_graphics_lib = "platform-graphics-lib"; | 57 | char const* const mo::platform_graphics_lib = "platform-graphics-lib"; |
668 | 58 | char const* const mo::platform_path = "platform-path"; | ||
669 | 55 | 59 | ||
670 | 56 | namespace | 60 | namespace |
671 | 57 | { | 61 | { |
672 | 58 | int const default_ipc_threads = 1; | 62 | int const default_ipc_threads = 1; |
673 | 59 | bool const enable_input_default = true; | 63 | bool const enable_input_default = true; |
674 | 60 | char const* const default_platform_graphics_lib = MIR_PLATFORM_DRIVER_BINARY; | ||
675 | 61 | 64 | ||
676 | 62 | // Hack around the way Qt loads mir: | 65 | // Hack around the way Qt loads mir: |
677 | 63 | // platform_api and therefore Mir are loaded via dlopen(..., RTLD_LOCAL). | 66 | // platform_api and therefore Mir are loaded via dlopen(..., RTLD_LOCAL). |
678 | @@ -114,8 +117,10 @@ | |||
679 | 114 | "Socket filename [string:default=$XDG_RUNTIME_DIR/mir_socket or /tmp/mir_socket]") | 117 | "Socket filename [string:default=$XDG_RUNTIME_DIR/mir_socket or /tmp/mir_socket]") |
680 | 115 | (no_server_socket_opt, "Do not provide a socket filename for client connections") | 118 | (no_server_socket_opt, "Do not provide a socket filename for client connections") |
681 | 116 | (prompt_socket_opt, "Provide a \"..._trusted\" filename for prompt helper connections") | 119 | (prompt_socket_opt, "Provide a \"..._trusted\" filename for prompt helper connections") |
684 | 117 | (platform_graphics_lib, po::value<std::string>()->default_value(default_platform_graphics_lib), | 120 | (platform_graphics_lib, po::value<std::string>(), |
685 | 118 | "Library to use for platform graphics support") | 121 | "Library to use for platform graphics support (default: autodetect)") |
686 | 122 | (platform_path, po::value<std::string>()->default_value(MIR_SERVER_PLATFORM_PATH), | ||
687 | 123 | "Directory to look for platform libraries (default: " MIR_SERVER_PLATFORM_PATH ")") | ||
688 | 119 | (enable_input_opt, po::value<bool>()->default_value(enable_input_default), | 124 | (enable_input_opt, po::value<bool>()->default_value(enable_input_default), |
689 | 120 | "Enable input.") | 125 | "Enable input.") |
690 | 121 | (compositor_report_opt, po::value<std::string>()->default_value(off_opt_value), | 126 | (compositor_report_opt, po::value<std::string>()->default_value(off_opt_value), |
691 | @@ -134,6 +139,8 @@ | |||
692 | 134 | "How to handle the MessageProcessor report. [{log,lttng,off}]") | 139 | "How to handle the MessageProcessor report. [{log,lttng,off}]") |
693 | 135 | (scene_report_opt, po::value<std::string>()->default_value(off_opt_value), | 140 | (scene_report_opt, po::value<std::string>()->default_value(off_opt_value), |
694 | 136 | "How to handle the scene report. [{log,lttng,off}]") | 141 | "How to handle the scene report. [{log,lttng,off}]") |
695 | 142 | (shared_library_prober_report_opt, po::value<std::string>()->default_value(log_opt_value), | ||
696 | 143 | "How to handle the SharedLibraryProber report. [{log,lttng,off}]") | ||
697 | 137 | (frontend_threads_opt, po::value<int>()->default_value(default_ipc_threads), | 144 | (frontend_threads_opt, po::value<int>()->default_value(default_ipc_threads), |
698 | 138 | "threads in frontend thread pool.") | 145 | "threads in frontend thread pool.") |
699 | 139 | (name_opt, po::value<std::string>(), | 146 | (name_opt, po::value<std::string>(), |
700 | @@ -156,26 +163,48 @@ | |||
701 | 156 | po::options_description program_options; | 163 | po::options_description program_options; |
702 | 157 | program_options.add_options() | 164 | program_options.add_options() |
703 | 158 | (platform_graphics_lib, | 165 | (platform_graphics_lib, |
705 | 159 | po::value<std::string>()->default_value(default_platform_graphics_lib), ""); | 166 | po::value<std::string>(), ""); |
706 | 167 | program_options.add_options() | ||
707 | 168 | (platform_path, | ||
708 | 169 | po::value<std::string>()->default_value(MIR_SERVER_PLATFORM_PATH), | ||
709 | 170 | ""); | ||
710 | 160 | mo::ProgramOption options; | 171 | mo::ProgramOption options; |
711 | 161 | options.parse_arguments(program_options, argc, argv); | 172 | options.parse_arguments(program_options, argc, argv); |
712 | 162 | 173 | ||
714 | 163 | std::string graphics_libname; | 174 | ensure_loaded_with_rtld_global(); |
715 | 175 | |||
716 | 176 | // TODO: We should just load all the platform plugins we can and present their options. | ||
717 | 164 | auto env_libname = ::getenv("MIR_SERVER_PLATFORM_GRAPHICS_LIB"); | 177 | auto env_libname = ::getenv("MIR_SERVER_PLATFORM_GRAPHICS_LIB"); |
732 | 165 | if (!options.is_set(platform_graphics_lib) && env_libname) | 178 | auto env_libpath = ::getenv("MIR_SERVER_PLATFORM_PATH"); |
733 | 166 | { | 179 | try |
734 | 167 | graphics_libname = std::string{env_libname}; | 180 | { |
735 | 168 | } | 181 | if (options.is_set(platform_graphics_lib)) |
736 | 169 | else | 182 | { |
737 | 170 | { | 183 | platform_graphics_library = std::make_shared<mir::SharedLibrary>(options.get<std::string>(platform_graphics_lib)); |
738 | 171 | graphics_libname = options.get<std::string>(platform_graphics_lib); | 184 | } |
739 | 172 | } | 185 | else if (env_libname) |
740 | 173 | 186 | { | |
741 | 174 | ensure_loaded_with_rtld_global(); | 187 | platform_graphics_library = std::make_shared<mir::SharedLibrary>(std::string{env_libname}); |
742 | 175 | 188 | } | |
743 | 176 | auto graphics_lib = load_library(graphics_libname); | 189 | else |
744 | 177 | auto add_platform_options = graphics_lib->load_function<mir::graphics::AddPlatformOptions>(std::string("add_platform_options")); | 190 | { |
745 | 178 | add_platform_options(*this->program_options); | 191 | mir::logging::NullSharedLibraryProberReport null_report; |
746 | 192 | auto const plugin_path = env_libpath ? env_libpath : options.get<std::string>(platform_path); | ||
747 | 193 | auto plugins = mir::libraries_for_path(plugin_path, null_report); | ||
748 | 194 | platform_graphics_library = mir::graphics::module_for_device(plugins); | ||
749 | 195 | } | ||
750 | 196 | |||
751 | 197 | auto add_platform_options = platform_graphics_library->load_function<mir::graphics::AddPlatformOptions>("add_graphics_platform_options"); | ||
752 | 198 | add_platform_options(*this->program_options); | ||
753 | 199 | } | ||
754 | 200 | catch(...) | ||
755 | 201 | { | ||
756 | 202 | // We don't actually care at this point if this failed. | ||
757 | 203 | // Maybe we've been pointed at the wrong place. Maybe this platform doesn't actually | ||
758 | 204 | // *have* platform-specific options. | ||
759 | 205 | // Regardless, if we need a platform and can't find one then we'll bail later | ||
760 | 206 | // in startup with a useful error. | ||
761 | 207 | } | ||
762 | 179 | } | 208 | } |
763 | 180 | 209 | ||
764 | 181 | boost::program_options::options_description_easy_init mo::DefaultConfiguration::add_options() | 210 | boost::program_options::options_description_easy_init mo::DefaultConfiguration::add_options() |
765 | 182 | 211 | ||
766 | === modified file 'src/platform/symbols.map' | |||
767 | --- src/platform/symbols.map 2015-01-20 06:24:53 +0000 | |||
768 | +++ src/platform/symbols.map 2015-01-22 15:40:28 +0000 | |||
769 | @@ -6,7 +6,6 @@ | |||
770 | 6 | mir::fatal_error*; | 6 | mir::fatal_error*; |
771 | 7 | mir::fatal_error_abort*; | 7 | mir::fatal_error_abort*; |
772 | 8 | mir::fatal_error_except*; | 8 | mir::fatal_error_except*; |
773 | 9 | mir::graphics::add_platform_options*; | ||
774 | 10 | mir::graphics::BufferBasic::BufferBasic*; | 9 | mir::graphics::BufferBasic::BufferBasic*; |
775 | 11 | mir::graphics::Buffer::Buffer*; | 10 | mir::graphics::Buffer::Buffer*; |
776 | 12 | mir::graphics::Buffer::can_bypass*; | 11 | mir::graphics::Buffer::can_bypass*; |
777 | @@ -17,8 +16,6 @@ | |||
778 | 17 | mir::graphics::Buffer::size*; | 16 | mir::graphics::Buffer::size*; |
779 | 18 | mir::graphics::Buffer::stride*; | 17 | mir::graphics::Buffer::stride*; |
780 | 19 | mir::graphics::Buffer::write*; | 18 | mir::graphics::Buffer::write*; |
781 | 20 | mir::graphics::create_guest_platform*; | ||
782 | 21 | mir::graphics::create_host_platform*; | ||
783 | 22 | mir::graphics::Cursor::?Cursor*; | 19 | mir::graphics::Cursor::?Cursor*; |
784 | 23 | mir::graphics::Cursor::Cursor*; | 20 | mir::graphics::Cursor::Cursor*; |
785 | 24 | mir::graphics::Cursor::hide*; | 21 | mir::graphics::Cursor::hide*; |
786 | @@ -81,6 +78,7 @@ | |||
787 | 81 | mir::graphics::GraphicBufferAllocator::GraphicBufferAllocator*; | 78 | mir::graphics::GraphicBufferAllocator::GraphicBufferAllocator*; |
788 | 82 | mir::graphics::GraphicBufferAllocator::operator*; | 79 | mir::graphics::GraphicBufferAllocator::operator*; |
789 | 83 | mir::graphics::GraphicBufferAllocator::supported_pixel_formats*; | 80 | mir::graphics::GraphicBufferAllocator::supported_pixel_formats*; |
790 | 81 | mir::graphics::module_for_device*; | ||
791 | 84 | mir::graphics::operator*; | 82 | mir::graphics::operator*; |
792 | 85 | mir::graphics::Platform::create_buffer_allocator*; | 83 | mir::graphics::Platform::create_buffer_allocator*; |
793 | 86 | mir::graphics::Platform::create_display*; | 84 | mir::graphics::Platform::create_display*; |
794 | @@ -127,6 +125,7 @@ | |||
795 | 127 | mir::options::glog_log_dir*; | 125 | mir::options::glog_log_dir*; |
796 | 128 | mir::options::glog_minloglevel*; | 126 | mir::options::glog_minloglevel*; |
797 | 129 | mir::options::glog_stderrthreshold*; | 127 | mir::options::glog_stderrthreshold*; |
798 | 128 | mir::options::platform_path*; | ||
799 | 130 | mir::options::host_socket_opt*; | 129 | mir::options::host_socket_opt*; |
800 | 131 | mir::options::input_report_opt*; | 130 | mir::options::input_report_opt*; |
801 | 132 | mir::options::legacy_input_report_opt*; | 131 | mir::options::legacy_input_report_opt*; |
802 | @@ -154,6 +153,7 @@ | |||
803 | 154 | mir::options::scene_report_opt*; | 153 | mir::options::scene_report_opt*; |
804 | 155 | mir::options::server_socket_opt*; | 154 | mir::options::server_socket_opt*; |
805 | 156 | mir::options::session_mediator_report_opt*; | 155 | mir::options::session_mediator_report_opt*; |
806 | 156 | mir::options::shared_library_prober_report_opt*; | ||
807 | 157 | mir::options::touchspots_opt*; | 157 | mir::options::touchspots_opt*; |
808 | 158 | non-virtual?thunk?to?mir::graphics::Cursor::?Cursor*; | 158 | non-virtual?thunk?to?mir::graphics::Cursor::?Cursor*; |
809 | 159 | non-virtual?thunk?to?mir::graphics::CursorImage::?CursorImage*; | 159 | non-virtual?thunk?to?mir::graphics::CursorImage::?CursorImage*; |
810 | 160 | 160 | ||
811 | === modified file 'src/platforms/CMakeLists.txt' | |||
812 | --- src/platforms/CMakeLists.txt 2015-01-22 03:10:13 +0000 | |||
813 | +++ src/platforms/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
814 | @@ -1,3 +1,19 @@ | |||
815 | 1 | # This needs to change whenever the ABI between the platform | ||
816 | 2 | # modules and the server changes in an incompatible way. | ||
817 | 3 | # This ABI is much smaller than the full libmirplatform ABI. | ||
818 | 4 | # | ||
819 | 5 | # TODO: Add an extra driver-ABI check target. | ||
820 | 6 | set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION "MIR_GRAPHICS_PLATFORM_1") | ||
821 | 7 | set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION ${MIR_SERVER_GRAPHICS_PLATFORM_VERSION} PARENT_SCOPE) | ||
822 | 8 | |||
823 | 9 | set(MIR_SERVER_PLATFORM_PATH | ||
824 | 10 | ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/mir/server-platform | ||
825 | 11 | ) | ||
826 | 12 | set(MIR_SERVER_PLATFORM_PATH | ||
827 | 13 | ${MIR_SERVER_PLATFORM_PATH} | ||
828 | 14 | PARENT_SCOPE | ||
829 | 15 | ) | ||
830 | 16 | |||
831 | 1 | set(server_common_include_dirs | 17 | set(server_common_include_dirs |
832 | 2 | ${PROJECT_SOURCE_DIR}/include/platform | 18 | ${PROJECT_SOURCE_DIR}/include/platform |
833 | 3 | ) | 19 | ) |
834 | 4 | 20 | ||
835 | === modified file 'src/platforms/android/server/CMakeLists.txt' | |||
836 | --- src/platforms/android/server/CMakeLists.txt 2015-01-22 03:10:13 +0000 | |||
837 | +++ src/platforms/android/server/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
838 | @@ -38,20 +38,17 @@ | |||
839 | 38 | ipc_operations.cpp | 38 | ipc_operations.cpp |
840 | 39 | hwc_blanking_control.cpp | 39 | hwc_blanking_control.cpp |
841 | 40 | ) | 40 | ) |
842 | 41 | |||
843 | 41 | add_library(mirplatformgraphicsandroid SHARED | 42 | add_library(mirplatformgraphicsandroid SHARED |
844 | 43 | |||
845 | 42 | $<TARGET_OBJECTS:mirplatformgraphicsandroidobjects> | 44 | $<TARGET_OBJECTS:mirplatformgraphicsandroidobjects> |
846 | 43 | ) | 45 | ) |
847 | 44 | 46 | ||
854 | 45 | set_target_properties( | 47 | target_link_libraries( |
855 | 46 | mirplatformgraphicsandroid PROPERTIES | 48 | mirplatformgraphicsandroid |
850 | 47 | OUTPUT_NAME ${MIR_PLATFORM_DRIVER} | ||
851 | 48 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/android | ||
852 | 49 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${server_symbol_map}" | ||
853 | 50 | ) | ||
856 | 51 | 49 | ||
858 | 52 | target_link_libraries(mirplatformgraphicsandroid | 50 | mirsharedandroid |
859 | 53 | mirplatform | 51 | mirplatform |
860 | 54 | mirsharedandroid | ||
861 | 55 | ${Boost_PROGRAM_OPTIONS_LIBRARY} | 52 | ${Boost_PROGRAM_OPTIONS_LIBRARY} |
862 | 56 | ${LIBHARDWARE_LIBRARIES} | 53 | ${LIBHARDWARE_LIBRARIES} |
863 | 57 | ${EGL_LDFLAGS} ${EGL_LIBRARIES} | 54 | ${EGL_LDFLAGS} ${EGL_LIBRARIES} |
864 | @@ -59,20 +56,14 @@ | |||
865 | 59 | ${ANDROID_PROPERTIES_LDFLAGS} | 56 | ${ANDROID_PROPERTIES_LDFLAGS} |
866 | 60 | ) | 57 | ) |
867 | 61 | 58 | ||
885 | 62 | install(TARGETS mirplatformgraphicsandroid LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/${PLATFORM_DRIVER}/android) | 59 | set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) |
886 | 63 | 60 | ||
887 | 64 | if (MIR_TEST_PLATFORM STREQUAL "android") | 61 | set_target_properties( |
888 | 65 | add_custom_command(TARGET mirplatformgraphicsandroid | 62 | mirplatformgraphicsandroid PROPERTIES |
889 | 66 | POST_BUILD | 63 | OUTPUT_NAME graphics-android |
890 | 67 | COMMAND ${CMAKE_COMMAND} -E remove ${MIR_PLATFORM_DRIVER_BINARY} | 64 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/server-modules |
891 | 68 | COMMAND ${CMAKE_COMMAND} -E create_symlink android/$<TARGET_FILE_NAME:mirplatformgraphicsandroid> ${MIR_PLATFORM_DRIVER_BINARY} | 65 | PREFIX "" |
892 | 69 | WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} | 66 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" |
893 | 70 | ) | 67 | ) |
894 | 71 | 68 | ||
895 | 72 | install(CODE | 69 | install(TARGETS mirplatformgraphicsandroid LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH}) |
879 | 73 | "execute_process( | ||
880 | 74 | COMMAND ln -sf mir/${PLATFORM_DRIVER}/android/${MIR_PLATFORM_DRIVER_BINARY} | ||
881 | 75 | WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} | ||
882 | 76 | )" | ||
883 | 77 | ) | ||
884 | 78 | endif() | ||
896 | 79 | 70 | ||
897 | === modified file 'src/platforms/android/server/platform.cpp' | |||
898 | --- src/platforms/android/server/platform.cpp 2015-01-22 03:10:13 +0000 | |||
899 | +++ src/platforms/android/server/platform.cpp 2015-01-22 15:40:28 +0000 | |||
900 | @@ -155,7 +155,7 @@ | |||
901 | 155 | return std::make_shared<mga::Platform>(nullptr, display_report, mga::OverlayOptimization::disabled); | 155 | return std::make_shared<mga::Platform>(nullptr, display_report, mga::OverlayOptimization::disabled); |
902 | 156 | } | 156 | } |
903 | 157 | 157 | ||
905 | 158 | extern "C" void add_platform_options( | 158 | extern "C" void add_graphics_platform_options( |
906 | 159 | boost::program_options::options_description& config) | 159 | boost::program_options::options_description& config) |
907 | 160 | { | 160 | { |
908 | 161 | config.add_options() | 161 | config.add_options() |
909 | @@ -166,3 +166,25 @@ | |||
910 | 166 | boost::program_options::value<bool>()->default_value(false), | 166 | boost::program_options::value<bool>()->default_value(false), |
911 | 167 | "[platform-specific] Whether to disable overlay optimizations [{on,off}]"); | 167 | "[platform-specific] Whether to disable overlay optimizations [{on,off}]"); |
912 | 168 | } | 168 | } |
913 | 169 | |||
914 | 170 | extern "C" mg::PlatformPriority probe_graphics_platform() | ||
915 | 171 | { | ||
916 | 172 | int err; | ||
917 | 173 | hw_module_t const* hw_module; | ||
918 | 174 | |||
919 | 175 | err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &hw_module); | ||
920 | 176 | |||
921 | 177 | return err < 0 ? mg::PlatformPriority::unsupported : mg::PlatformPriority::best; | ||
922 | 178 | } | ||
923 | 179 | |||
924 | 180 | mir::ModuleProperties const description = { | ||
925 | 181 | "android", | ||
926 | 182 | MIR_VERSION_MAJOR, | ||
927 | 183 | MIR_VERSION_MINOR, | ||
928 | 184 | MIR_VERSION_MICRO | ||
929 | 185 | }; | ||
930 | 186 | |||
931 | 187 | extern "C" mir::ModuleProperties const* describe_graphics_module() | ||
932 | 188 | { | ||
933 | 189 | return &description; | ||
934 | 190 | } | ||
935 | 169 | 191 | ||
936 | === added file 'src/platforms/android/server/symbols.map' | |||
937 | --- src/platforms/android/server/symbols.map 1970-01-01 00:00:00 +0000 | |||
938 | +++ src/platforms/android/server/symbols.map 2015-01-22 15:40:28 +0000 | |||
939 | @@ -0,0 +1,10 @@ | |||
940 | 1 | MIR_GRAPHICS_PLATFORM_1 { | ||
941 | 2 | global: | ||
942 | 3 | add_graphics_platform_options; | ||
943 | 4 | create_host_platform; | ||
944 | 5 | create_guest_platform; | ||
945 | 6 | probe_graphics_platform; | ||
946 | 7 | describe_graphics_module; | ||
947 | 8 | local: | ||
948 | 9 | *; | ||
949 | 10 | }; | ||
950 | 0 | 11 | ||
951 | === modified file 'src/platforms/common/server/symbols.map' | |||
952 | --- src/platforms/common/server/symbols.map 2015-01-22 03:10:13 +0000 | |||
953 | +++ src/platforms/common/server/symbols.map 2015-01-22 15:40:28 +0000 | |||
954 | @@ -1,8 +1,9 @@ | |||
956 | 1 | MIR_PLATFORM_1 { | 1 | MIR_GRAPHICS_PLATFORM_1 { |
957 | 2 | global: | 2 | global: |
959 | 3 | add_platform_options; | 3 | add_graphics_platform_options; |
960 | 4 | probe_graphics_platform; | ||
961 | 4 | create_host_platform; | 5 | create_host_platform; |
962 | 5 | create_guest_platform; | 6 | create_guest_platform; |
964 | 6 | mir_server_mesa_egl_native_display_is_valid; | 7 | describe_graphics_module; |
965 | 7 | local: *; | 8 | local: *; |
966 | 8 | }; | 9 | }; |
967 | 9 | 10 | ||
968 | === modified file 'src/platforms/mesa/server/CMakeLists.txt' | |||
969 | --- src/platforms/mesa/server/CMakeLists.txt 2015-01-22 03:10:13 +0000 | |||
970 | +++ src/platforms/mesa/server/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
971 | @@ -15,7 +15,9 @@ | |||
972 | 15 | string(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) | 15 | string(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) |
973 | 16 | add_definitions(-D__GBM__) | 16 | add_definitions(-D__GBM__) |
974 | 17 | 17 | ||
976 | 18 | add_library(mirplatformgraphicsmesaobjects OBJECT | 18 | add_library( |
977 | 19 | mirplatformgraphicsmesaobjects OBJECT | ||
978 | 20 | |||
979 | 19 | platform.cpp | 21 | platform.cpp |
980 | 20 | buffer_allocator.cpp | 22 | buffer_allocator.cpp |
981 | 21 | gbm_buffer.cpp | 23 | gbm_buffer.cpp |
982 | @@ -38,18 +40,15 @@ | |||
983 | 38 | nested_authentication.cpp | 40 | nested_authentication.cpp |
984 | 39 | ) | 41 | ) |
985 | 40 | 42 | ||
987 | 41 | add_library(mirplatformgraphicsmesa SHARED | 43 | add_library( |
988 | 44 | mirplatformgraphicsmesa MODULE | ||
989 | 45 | |||
990 | 42 | $<TARGET_OBJECTS:mirplatformgraphicsmesaobjects> | 46 | $<TARGET_OBJECTS:mirplatformgraphicsmesaobjects> |
991 | 43 | ) | 47 | ) |
992 | 44 | 48 | ||
999 | 45 | set_target_properties( | 49 | target_link_libraries( |
1000 | 46 | mirplatformgraphicsmesa PROPERTIES | 50 | mirplatformgraphicsmesa |
995 | 47 | OUTPUT_NAME ${MIR_PLATFORM_DRIVER} | ||
996 | 48 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/mesa | ||
997 | 49 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${server_symbol_map}" | ||
998 | 50 | ) | ||
1001 | 51 | 51 | ||
1002 | 52 | target_link_libraries(mirplatformgraphicsmesa | ||
1003 | 53 | mirplatform | 52 | mirplatform |
1004 | 54 | ${Boost_PROGRAM_OPTIONS_LIBRARY} | 53 | ${Boost_PROGRAM_OPTIONS_LIBRARY} |
1005 | 55 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} | 54 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} |
1006 | @@ -58,20 +57,14 @@ | |||
1007 | 58 | ${GLESv2_LDFLAGS} ${GLESv2_LIBRARIES} | 57 | ${GLESv2_LDFLAGS} ${GLESv2_LIBRARIES} |
1008 | 59 | ) | 58 | ) |
1009 | 60 | 59 | ||
1027 | 61 | install(TARGETS mirplatformgraphicsmesa LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/${PLATFORM_DRIVER}/mesa) | 60 | set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) |
1028 | 62 | 61 | ||
1029 | 63 | if (MIR_TEST_PLATFORM STREQUAL "mesa") | 62 | set_target_properties( |
1030 | 64 | add_custom_command(TARGET mirplatformgraphicsmesa | 63 | mirplatformgraphicsmesa PROPERTIES |
1031 | 65 | POST_BUILD | 64 | OUTPUT_NAME graphics-mesa |
1032 | 66 | COMMAND ${CMAKE_COMMAND} -E remove ${MIR_PLATFORM_DRIVER_BINARY} | 65 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/server-modules |
1033 | 67 | COMMAND ${CMAKE_COMMAND} -E create_symlink mesa/$<TARGET_FILE_NAME:mirplatformgraphicsmesa> ${MIR_PLATFORM_DRIVER_BINARY} | 66 | PREFIX "" |
1034 | 68 | WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} | 67 | LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}" |
1035 | 69 | ) | 68 | ) |
1036 | 70 | 69 | ||
1037 | 71 | install(CODE | 70 | install(TARGETS mirplatformgraphicsmesa LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH}) |
1021 | 72 | "execute_process( | ||
1022 | 73 | COMMAND ln -sf mir/${PLATFORM_DRIVER}/mesa/${MIR_PLATFORM_DRIVER_BINARY} | ||
1023 | 74 | WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} | ||
1024 | 75 | )" | ||
1025 | 76 | ) | ||
1026 | 77 | endif() | ||
1038 | 78 | 71 | ||
1039 | === modified file 'src/platforms/mesa/server/platform.cpp' | |||
1040 | --- src/platforms/mesa/server/platform.cpp 2015-01-22 03:10:13 +0000 | |||
1041 | +++ src/platforms/mesa/server/platform.cpp 2015-01-22 15:40:28 +0000 | |||
1042 | @@ -26,6 +26,7 @@ | |||
1043 | 26 | #include "mir/options/option.h" | 26 | #include "mir/options/option.h" |
1044 | 27 | #include "mir/graphics/native_buffer.h" | 27 | #include "mir/graphics/native_buffer.h" |
1045 | 28 | #include "mir/emergency_cleanup_registry.h" | 28 | #include "mir/emergency_cleanup_registry.h" |
1046 | 29 | #include "mir/udev/wrapper.h" | ||
1047 | 29 | 30 | ||
1048 | 30 | 31 | ||
1049 | 31 | #include <boost/throw_exception.hpp> | 32 | #include <boost/throw_exception.hpp> |
1050 | @@ -192,7 +193,7 @@ | |||
1051 | 192 | return false; | 193 | return false; |
1052 | 193 | } | 194 | } |
1053 | 194 | 195 | ||
1055 | 195 | extern "C" void add_platform_options(boost::program_options::options_description& config) | 196 | extern "C" void add_graphics_platform_options(boost::program_options::options_description& config) |
1056 | 196 | { | 197 | { |
1057 | 197 | config.add_options() | 198 | config.add_options() |
1058 | 198 | (vt_option_name, | 199 | (vt_option_name, |
1059 | @@ -202,3 +203,33 @@ | |||
1060 | 202 | boost::program_options::value<bool>()->default_value(true), | 203 | boost::program_options::value<bool>()->default_value(true), |
1061 | 203 | "[platform-specific] utilize the bypass optimization for fullscreen surfaces."); | 204 | "[platform-specific] utilize the bypass optimization for fullscreen surfaces."); |
1062 | 204 | } | 205 | } |
1063 | 206 | |||
1064 | 207 | extern "C" mg::PlatformPriority probe_graphics_platform() | ||
1065 | 208 | { | ||
1066 | 209 | auto udev = std::make_shared<mir::udev::Context>(); | ||
1067 | 210 | |||
1068 | 211 | mir::udev::Enumerator drm_devices{udev}; | ||
1069 | 212 | drm_devices.match_subsystem("drm"); | ||
1070 | 213 | drm_devices.match_sysname("card[0-9]*"); | ||
1071 | 214 | drm_devices.scan_devices(); | ||
1072 | 215 | |||
1073 | 216 | for (auto& device : drm_devices) | ||
1074 | 217 | { | ||
1075 | 218 | static_cast<void>(device); | ||
1076 | 219 | return mg::PlatformPriority::best; | ||
1077 | 220 | } | ||
1078 | 221 | |||
1079 | 222 | return mg::PlatformPriority::unsupported; | ||
1080 | 223 | } | ||
1081 | 224 | |||
1082 | 225 | mir::ModuleProperties const description = { | ||
1083 | 226 | "mesa", | ||
1084 | 227 | MIR_VERSION_MAJOR, | ||
1085 | 228 | MIR_VERSION_MINOR, | ||
1086 | 229 | MIR_VERSION_MICRO | ||
1087 | 230 | }; | ||
1088 | 231 | |||
1089 | 232 | extern "C" mir::ModuleProperties const* describe_graphics_module() | ||
1090 | 233 | { | ||
1091 | 234 | return &description; | ||
1092 | 235 | } | ||
1093 | 205 | 236 | ||
1094 | === added file 'src/platforms/mesa/server/symbols.map' | |||
1095 | --- src/platforms/mesa/server/symbols.map 1970-01-01 00:00:00 +0000 | |||
1096 | +++ src/platforms/mesa/server/symbols.map 2015-01-22 15:40:28 +0000 | |||
1097 | @@ -0,0 +1,16 @@ | |||
1098 | 1 | MIR_GRAPHICS_PLATFORM_1 { | ||
1099 | 2 | global: | ||
1100 | 3 | add_graphics_platform_options; | ||
1101 | 4 | create_host_platform; | ||
1102 | 5 | create_guest_platform; | ||
1103 | 6 | probe_graphics_platform; | ||
1104 | 7 | describe_graphics_module; | ||
1105 | 8 | local: | ||
1106 | 9 | *; | ||
1107 | 10 | }; | ||
1108 | 11 | |||
1109 | 12 | # Mesa EGL platform requires this, because madness. | ||
1110 | 13 | MIR_MESA_EGL_INTEGRATION { | ||
1111 | 14 | global: | ||
1112 | 15 | mir_server_mesa_egl_native_display_is_valid; | ||
1113 | 16 | }; | ||
1114 | 0 | 17 | ||
1115 | === modified file 'src/server/CMakeLists.txt' | |||
1116 | --- src/server/CMakeLists.txt 2015-01-20 10:07:15 +0000 | |||
1117 | +++ src/server/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
1118 | @@ -11,6 +11,9 @@ | |||
1119 | 11 | ${GLIB_INCLUDE_DIRS} | 11 | ${GLIB_INCLUDE_DIRS} |
1120 | 12 | ) | 12 | ) |
1121 | 13 | 13 | ||
1122 | 14 | add_definitions(-DMIR_SERVER_PLATFORM_PATH="${MIR_SERVER_PLATFORM_PATH}") | ||
1123 | 15 | add_definitions(-DMIR_SERVER_GRAPHICS_PLATFORM_VERSION="${MIR_SERVER_GRAPHICS_PLATFORM_VERSION}") | ||
1124 | 16 | |||
1125 | 14 | add_subdirectory(compositor/) | 17 | add_subdirectory(compositor/) |
1126 | 15 | add_subdirectory(graphics/) | 18 | add_subdirectory(graphics/) |
1127 | 16 | add_subdirectory(input/) | 19 | add_subdirectory(input/) |
1128 | @@ -78,8 +81,9 @@ | |||
1129 | 78 | ) | 81 | ) |
1130 | 79 | 82 | ||
1131 | 80 | target_link_libraries(mirserver LINK_PUBLIC | 83 | target_link_libraries(mirserver LINK_PUBLIC |
1132 | 84 | |||
1133 | 85 | mirclient | ||
1134 | 81 | mirplatform | 86 | mirplatform |
1135 | 82 | mirclient | ||
1136 | 83 | mircommon | 87 | mircommon |
1137 | 84 | mirprotobuf | 88 | mirprotobuf |
1138 | 85 | 3rd_party | 89 | 3rd_party |
1139 | 86 | 90 | ||
1140 | === modified file 'src/server/graphics/CMakeLists.txt' | |||
1141 | --- src/server/graphics/CMakeLists.txt 2015-01-16 02:57:31 +0000 | |||
1142 | +++ src/server/graphics/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
1143 | @@ -1,4 +1,4 @@ | |||
1145 | 1 | include_directories(${GLESv2_INCLUDE_DIRS}) | 1 | include_directories(${GLESv2_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}) |
1146 | 2 | 2 | ||
1147 | 3 | add_library( | 3 | add_library( |
1148 | 4 | mirgraphics OBJECT | 4 | mirgraphics OBJECT |
1149 | 5 | 5 | ||
1150 | === modified file 'src/server/graphics/default_configuration.cpp' | |||
1151 | --- src/server/graphics/default_configuration.cpp 2015-01-16 02:57:31 +0000 | |||
1152 | +++ src/server/graphics/default_configuration.cpp 2015-01-22 15:40:28 +0000 | |||
1153 | @@ -30,10 +30,11 @@ | |||
1154 | 30 | #include "mir/graphics/gl_config.h" | 30 | #include "mir/graphics/gl_config.h" |
1155 | 31 | #include "mir/graphics/platform.h" | 31 | #include "mir/graphics/platform.h" |
1156 | 32 | #include "mir/graphics/cursor.h" | 32 | #include "mir/graphics/cursor.h" |
1157 | 33 | #include "mir/graphics/platform_probe.h" | ||
1158 | 33 | #include "program_factory.h" | 34 | #include "program_factory.h" |
1159 | 34 | 35 | ||
1160 | 35 | #include "mir/shared_library.h" | 36 | #include "mir/shared_library.h" |
1162 | 36 | #include "mir/shared_library_loader.h" | 37 | #include "mir/shared_library_prober.h" |
1163 | 37 | #include "mir/abnormal_exit.h" | 38 | #include "mir/abnormal_exit.h" |
1164 | 38 | #include "mir/emergency_cleanup.h" | 39 | #include "mir/emergency_cleanup.h" |
1165 | 39 | #include "mir/log.h" | 40 | #include "mir/log.h" |
1166 | @@ -45,8 +46,15 @@ | |||
1167 | 45 | #include <map> | 46 | #include <map> |
1168 | 46 | 47 | ||
1169 | 47 | namespace mg = mir::graphics; | 48 | namespace mg = mir::graphics; |
1170 | 49 | namespace ml = mir::logging; | ||
1171 | 48 | namespace mgn = mir::graphics::nested; | 50 | namespace mgn = mir::graphics::nested; |
1172 | 49 | 51 | ||
1173 | 52 | namespace | ||
1174 | 53 | { | ||
1175 | 54 | // TODO: Temporary, until we actually manage module lifetimes | ||
1176 | 55 | static std::shared_ptr<mir::SharedLibrary> platform_library; | ||
1177 | 56 | } | ||
1178 | 57 | |||
1179 | 50 | std::shared_ptr<mg::DisplayConfigurationPolicy> | 58 | std::shared_ptr<mg::DisplayConfigurationPolicy> |
1180 | 51 | mir::DefaultServerConfiguration::the_display_configuration_policy() | 59 | mir::DefaultServerConfiguration::the_display_configuration_policy() |
1181 | 52 | { | 60 | { |
1182 | @@ -65,7 +73,6 @@ | |||
1183 | 65 | return wrapped; | 73 | return wrapped; |
1184 | 66 | } | 74 | } |
1185 | 67 | 75 | ||
1186 | 68 | |||
1187 | 69 | namespace | 76 | namespace |
1188 | 70 | { | 77 | { |
1189 | 71 | //TODO: what is the point of NestedContext if its just the same as mgn:HostConnection? | 78 | //TODO: what is the point of NestedContext if its just the same as mgn:HostConnection? |
1190 | @@ -102,24 +109,49 @@ | |||
1191 | 102 | return graphics_platform( | 109 | return graphics_platform( |
1192 | 103 | [this]()->std::shared_ptr<mg::Platform> | 110 | [this]()->std::shared_ptr<mg::Platform> |
1193 | 104 | { | 111 | { |
1195 | 105 | auto graphics_lib = mir::load_library(the_options()->get<std::string>(options::platform_graphics_lib)); | 112 | // fallback to standalone if host socket is unset |
1196 | 113 | if (the_options()->is_set(options::platform_graphics_lib)) | ||
1197 | 114 | { | ||
1198 | 115 | platform_library = std::make_shared<mir::SharedLibrary>(the_options()->get<std::string>(options::platform_graphics_lib)); | ||
1199 | 116 | } | ||
1200 | 117 | else | ||
1201 | 118 | { | ||
1202 | 119 | auto const& path = the_options()->get<std::string>(options::platform_path); | ||
1203 | 120 | auto platforms = mir::libraries_for_path(path, *the_shared_library_prober_report()); | ||
1204 | 121 | if (platforms.empty()) | ||
1205 | 122 | { | ||
1206 | 123 | auto msg = "Failed to find any platform plugins in: " + path; | ||
1207 | 124 | throw std::runtime_error(msg.c_str()); | ||
1208 | 125 | } | ||
1209 | 126 | platform_library = mir::graphics::module_for_device(platforms); | ||
1210 | 127 | } | ||
1211 | 128 | auto create_host_platform = platform_library->load_function<mg::CreateHostPlatform>( | ||
1212 | 129 | "create_host_platform", | ||
1213 | 130 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | ||
1214 | 131 | auto create_guest_platform = platform_library->load_function<mg::CreateGuestPlatform>( | ||
1215 | 132 | "create_guest_platform", | ||
1216 | 133 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | ||
1217 | 134 | auto describe_module = platform_library->load_function<mg::DescribeModule>( | ||
1218 | 135 | "describe_graphics_module", | ||
1219 | 136 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); | ||
1220 | 137 | auto description = describe_module(); | ||
1221 | 138 | ml::log(ml::Severity::informational, | ||
1222 | 139 | std::string{"Selected driver: "} + description->name + " (version " + | ||
1223 | 140 | std::to_string(description->major_version) + "." + | ||
1224 | 141 | std::to_string(description->minor_version) + "." + | ||
1225 | 142 | std::to_string(description->micro_version) + ")", | ||
1226 | 143 | "Platform Loader"); | ||
1227 | 106 | 144 | ||
1232 | 107 | auto create_host_platform = graphics_lib->load_function<mg::CreateHostPlatform>("create_host_platform"); | 145 | if (!the_options()->is_set(options::host_socket_opt)) |
1233 | 108 | auto create_guest_platform = graphics_lib->load_function<mg::CreateGuestPlatform>("create_guest_platform"); | 146 | return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report()); |
1234 | 109 | if (the_options()->is_set(options::host_socket_opt)) | 147 | else |
1231 | 110 | { | ||
1235 | 111 | return create_guest_platform( | 148 | return create_guest_platform( |
1236 | 112 | the_display_report(), | 149 | the_display_report(), |
1237 | 113 | std::make_shared<MirConnectionNestedContext>(the_host_connection())); | 150 | std::make_shared<MirConnectionNestedContext>(the_host_connection())); |
1243 | 114 | } | 151 | |
1239 | 115 | else | ||
1240 | 116 | { | ||
1241 | 117 | return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report()); | ||
1242 | 118 | } | ||
1244 | 119 | }); | 152 | }); |
1245 | 120 | } | 153 | } |
1246 | 121 | 154 | ||
1247 | 122 | |||
1248 | 123 | std::shared_ptr<mg::GraphicBufferAllocator> | 155 | std::shared_ptr<mg::GraphicBufferAllocator> |
1249 | 124 | mir::DefaultServerConfiguration::the_buffer_allocator() | 156 | mir::DefaultServerConfiguration::the_buffer_allocator() |
1250 | 125 | { | 157 | { |
1251 | 126 | 158 | ||
1252 | === modified file 'src/server/report/default_server_configuration.cpp' | |||
1253 | --- src/server/report/default_server_configuration.cpp 2014-03-06 06:05:17 +0000 | |||
1254 | +++ src/server/report/default_server_configuration.cpp 2015-01-22 15:40:28 +0000 | |||
1255 | @@ -117,3 +117,12 @@ | |||
1256 | 117 | return report_factory(options::scene_report_opt)->create_scene_report(); | 117 | return report_factory(options::scene_report_opt)->create_scene_report(); |
1257 | 118 | }); | 118 | }); |
1258 | 119 | } | 119 | } |
1259 | 120 | |||
1260 | 121 | auto mir::DefaultServerConfiguration::the_shared_library_prober_report() -> std::shared_ptr<SharedLibraryProberReport> | ||
1261 | 122 | { | ||
1262 | 123 | return shared_library_prober_report( | ||
1263 | 124 | [this]()->std::shared_ptr<SharedLibraryProberReport> | ||
1264 | 125 | { | ||
1265 | 126 | return report_factory(options::shared_library_prober_report_opt)->create_shared_library_prober_report(); | ||
1266 | 127 | }); | ||
1267 | 128 | } | ||
1268 | 120 | 129 | ||
1269 | === modified file 'src/server/report/logging/logging_report_factory.cpp' | |||
1270 | --- src/server/report/logging/logging_report_factory.cpp 2014-02-11 15:18:07 +0000 | |||
1271 | +++ src/server/report/logging/logging_report_factory.cpp 2015-01-22 15:40:28 +0000 | |||
1272 | @@ -25,6 +25,7 @@ | |||
1273 | 25 | #include "scene_report.h" | 25 | #include "scene_report.h" |
1274 | 26 | #include "session_mediator_report.h" | 26 | #include "session_mediator_report.h" |
1275 | 27 | #include "input_report.h" | 27 | #include "input_report.h" |
1276 | 28 | #include "mir/logging/shared_library_prober_report.h" | ||
1277 | 28 | 29 | ||
1278 | 29 | #include "mir/default_server_configuration.h" | 30 | #include "mir/default_server_configuration.h" |
1279 | 30 | 31 | ||
1280 | @@ -72,4 +73,8 @@ | |||
1281 | 72 | return std::make_shared<logging::InputReport>(logger); | 73 | return std::make_shared<logging::InputReport>(logger); |
1282 | 73 | } | 74 | } |
1283 | 74 | 75 | ||
1284 | 76 | std::shared_ptr<mir::SharedLibraryProberReport> mr::LoggingReportFactory::create_shared_library_prober_report() | ||
1285 | 77 | { | ||
1286 | 78 | return std::make_shared<mir::logging::SharedLibraryProberReport>(logger); | ||
1287 | 79 | } | ||
1288 | 75 | 80 | ||
1289 | 76 | 81 | ||
1290 | === modified file 'src/server/report/logging_report_factory.h' | |||
1291 | --- src/server/report/logging_report_factory.h 2014-02-11 15:18:07 +0000 | |||
1292 | +++ src/server/report/logging_report_factory.h 2015-01-22 15:40:28 +0000 | |||
1293 | @@ -47,6 +47,7 @@ | |||
1294 | 47 | std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() override; | 47 | std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() override; |
1295 | 48 | std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() override; | 48 | std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() override; |
1296 | 49 | std::shared_ptr<input::InputReport> create_input_report() override; | 49 | std::shared_ptr<input::InputReport> create_input_report() override; |
1297 | 50 | std::shared_ptr<mir::SharedLibraryProberReport> create_shared_library_prober_report() override; | ||
1298 | 50 | 51 | ||
1299 | 51 | private: | 52 | private: |
1300 | 52 | std::shared_ptr<mir::logging::Logger> const logger; | 53 | std::shared_ptr<mir::logging::Logger> const logger; |
1301 | 53 | 54 | ||
1302 | === modified file 'src/server/report/lttng/CMakeLists.txt' | |||
1303 | --- src/server/report/lttng/CMakeLists.txt 2015-01-14 06:39:13 +0000 | |||
1304 | +++ src/server/report/lttng/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
1305 | @@ -17,6 +17,7 @@ | |||
1306 | 17 | session_mediator_report.cpp | 17 | session_mediator_report.cpp |
1307 | 18 | scene_report.cpp | 18 | scene_report.cpp |
1308 | 19 | server_tracepoint_provider.cpp | 19 | server_tracepoint_provider.cpp |
1309 | 20 | shared_library_prober_report.cpp | ||
1310 | 20 | ) | 21 | ) |
1311 | 21 | 22 | ||
1312 | 22 | add_library( | 23 | add_library( |
1313 | 23 | 24 | ||
1314 | === modified file 'src/server/report/lttng/lttng_report_factory.cpp' | |||
1315 | --- src/server/report/lttng/lttng_report_factory.cpp 2014-02-11 15:18:07 +0000 | |||
1316 | +++ src/server/report/lttng/lttng_report_factory.cpp 2015-01-22 15:40:28 +0000 | |||
1317 | @@ -25,6 +25,7 @@ | |||
1318 | 25 | #include "message_processor_report.h" | 25 | #include "message_processor_report.h" |
1319 | 26 | #include "scene_report.h" | 26 | #include "scene_report.h" |
1320 | 27 | #include "session_mediator_report.h" | 27 | #include "session_mediator_report.h" |
1321 | 28 | #include "shared_library_prober_report.h" | ||
1322 | 28 | 29 | ||
1323 | 29 | std::shared_ptr<mir::compositor::CompositorReport> mir::report::LttngReportFactory::create_compositor_report() | 30 | std::shared_ptr<mir::compositor::CompositorReport> mir::report::LttngReportFactory::create_compositor_report() |
1324 | 30 | { | 31 | { |
1325 | @@ -61,4 +62,9 @@ | |||
1326 | 61 | return std::make_shared<lttng::InputReport>(); | 62 | return std::make_shared<lttng::InputReport>(); |
1327 | 62 | } | 63 | } |
1328 | 63 | 64 | ||
1329 | 65 | std::shared_ptr<mir::SharedLibraryProberReport> mir::report::LttngReportFactory::create_shared_library_prober_report() | ||
1330 | 66 | { | ||
1331 | 67 | return std::make_shared<lttng::SharedLibraryProberReport>(); | ||
1332 | 68 | } | ||
1333 | 69 | |||
1334 | 64 | 70 | ||
1335 | 65 | 71 | ||
1336 | === added file 'src/server/report/lttng/shared_library_prober_report.cpp' | |||
1337 | --- src/server/report/lttng/shared_library_prober_report.cpp 1970-01-01 00:00:00 +0000 | |||
1338 | +++ src/server/report/lttng/shared_library_prober_report.cpp 2015-01-22 15:40:28 +0000 | |||
1339 | @@ -0,0 +1,52 @@ | |||
1340 | 1 | /* | ||
1341 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1342 | 3 | * | ||
1343 | 4 | * This program is free software: you can redistribute it and/or modify | ||
1344 | 5 | * it under the terms of the GNU General Public License version 3 as | ||
1345 | 6 | * published by the Free Software Foundation. | ||
1346 | 7 | * | ||
1347 | 8 | * This program is distributed in the hope that it will be useful, | ||
1348 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1349 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1350 | 11 | * GNU General Public License for more details. | ||
1351 | 12 | * | ||
1352 | 13 | * You should have received a copy of the GNU General Public License | ||
1353 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1354 | 15 | * | ||
1355 | 16 | * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com> | ||
1356 | 17 | */ | ||
1357 | 18 | |||
1358 | 19 | #include "shared_library_prober_report.h" | ||
1359 | 20 | |||
1360 | 21 | #include "mir/report/lttng/mir_tracepoint.h" | ||
1361 | 22 | |||
1362 | 23 | #define TRACEPOINT_DEFINE | ||
1363 | 24 | #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE | ||
1364 | 25 | #include "shared_library_prober_report_tp.h" | ||
1365 | 26 | |||
1366 | 27 | namespace mrl = mir::report::lttng; | ||
1367 | 28 | namespace bf = boost::filesystem; | ||
1368 | 29 | |||
1369 | 30 | void mrl::SharedLibraryProberReport::probing_path(bf::path const& path) | ||
1370 | 31 | { | ||
1371 | 32 | mir_tracepoint(mir_server_shared_library_prober, probing_path, | ||
1372 | 33 | path.string().c_str()); | ||
1373 | 34 | } | ||
1374 | 35 | |||
1375 | 36 | void mrl::SharedLibraryProberReport::probing_failed(bf::path const& path, std::exception const& error) | ||
1376 | 37 | { | ||
1377 | 38 | mir_tracepoint(mir_server_shared_library_prober, probing_failed, | ||
1378 | 39 | path.string().c_str(), error.what()); | ||
1379 | 40 | } | ||
1380 | 41 | |||
1381 | 42 | void mrl::SharedLibraryProberReport::loading_library(bf::path const& filename) | ||
1382 | 43 | { | ||
1383 | 44 | mir_tracepoint(mir_server_shared_library_prober, loading_library, | ||
1384 | 45 | filename.string().c_str()); | ||
1385 | 46 | } | ||
1386 | 47 | |||
1387 | 48 | void mrl::SharedLibraryProberReport::loading_failed(bf::path const& filename, std::exception const& error) | ||
1388 | 49 | { | ||
1389 | 50 | mir_tracepoint(mir_server_shared_library_prober, loading_failed, | ||
1390 | 51 | filename.string().c_str(), error.what()); | ||
1391 | 52 | } | ||
1392 | 0 | 53 | ||
1393 | === added file 'src/server/report/lttng/shared_library_prober_report.h' | |||
1394 | --- src/server/report/lttng/shared_library_prober_report.h 1970-01-01 00:00:00 +0000 | |||
1395 | +++ src/server/report/lttng/shared_library_prober_report.h 2015-01-22 15:40:28 +0000 | |||
1396 | @@ -0,0 +1,48 @@ | |||
1397 | 1 | /* | ||
1398 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1399 | 3 | * | ||
1400 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1401 | 5 | * under the terms of the GNU General Public License version 3, | ||
1402 | 6 | * as published by the Free Software Foundation. | ||
1403 | 7 | * | ||
1404 | 8 | * This program is distributed in the hope that it will be useful, | ||
1405 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1406 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1407 | 11 | * GNU General Public License for more details. | ||
1408 | 12 | * | ||
1409 | 13 | * You should have received a copy of the GNU General Public License | ||
1410 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1411 | 15 | * | ||
1412 | 16 | * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com> | ||
1413 | 17 | */ | ||
1414 | 18 | |||
1415 | 19 | #ifndef MIR_REPORT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_H_ | ||
1416 | 20 | #define MIR_REPORT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_H_ | ||
1417 | 21 | |||
1418 | 22 | #include "server_tracepoint_provider.h" | ||
1419 | 23 | #include "mir/shared_library_prober_report.h" | ||
1420 | 24 | |||
1421 | 25 | namespace mir | ||
1422 | 26 | { | ||
1423 | 27 | namespace report | ||
1424 | 28 | { | ||
1425 | 29 | namespace lttng | ||
1426 | 30 | { | ||
1427 | 31 | |||
1428 | 32 | class SharedLibraryProberReport : public mir::SharedLibraryProberReport | ||
1429 | 33 | { | ||
1430 | 34 | public: | ||
1431 | 35 | void probing_path(boost::filesystem::path const& path) override; | ||
1432 | 36 | void probing_failed(boost::filesystem::path const& path, std::exception const& error) override; | ||
1433 | 37 | void loading_library(boost::filesystem::path const& filename) override; | ||
1434 | 38 | void loading_failed(boost::filesystem::path const& filename, std::exception const& error) override; | ||
1435 | 39 | |||
1436 | 40 | private: | ||
1437 | 41 | ServerTracepointProvider tp_provider; | ||
1438 | 42 | }; | ||
1439 | 43 | |||
1440 | 44 | } | ||
1441 | 45 | } | ||
1442 | 46 | } | ||
1443 | 47 | |||
1444 | 48 | #endif /* MIR_REPORT_LTTNG_SHARED_LIBRARY_PROBER_REPORT_H_ */ | ||
1445 | 0 | 49 | ||
1446 | === added file 'src/server/report/lttng/shared_library_prober_report_tp.h' | |||
1447 | --- src/server/report/lttng/shared_library_prober_report_tp.h 1970-01-01 00:00:00 +0000 | |||
1448 | +++ src/server/report/lttng/shared_library_prober_report_tp.h 2015-01-22 15:40:28 +0000 | |||
1449 | @@ -0,0 +1,70 @@ | |||
1450 | 1 | /* | ||
1451 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1452 | 3 | * | ||
1453 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1454 | 5 | * under the terms of the GNU General Public License version 3, | ||
1455 | 6 | * as published by the Free Software Foundation. | ||
1456 | 7 | * | ||
1457 | 8 | * This program is distributed in the hope that it will be useful, | ||
1458 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1459 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1460 | 11 | * GNU General Public License for more details. | ||
1461 | 12 | * | ||
1462 | 13 | * You should have received a copy of the GNU General Public License | ||
1463 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1464 | 15 | * | ||
1465 | 16 | * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com> | ||
1466 | 17 | */ | ||
1467 | 18 | |||
1468 | 19 | #undef TRACEPOINT_PROVIDER | ||
1469 | 20 | #define TRACEPOINT_PROVIDER mir_server_shared_library_prober | ||
1470 | 21 | |||
1471 | 22 | #undef TRACEPOINT_INCLUDE | ||
1472 | 23 | #define TRACEPOINT_INCLUDE "./shared_library_prober_report_tp.h" | ||
1473 | 24 | |||
1474 | 25 | #if !defined(MIR_LTTNG_SHARED_LIBRARY_PROBER_REPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) | ||
1475 | 26 | #define MIR_LTTNG_SHARED_LIBRARY_PROBER_REPORT_TP_H_ | ||
1476 | 27 | |||
1477 | 28 | #include "lttng_utils.h" | ||
1478 | 29 | |||
1479 | 30 | TRACEPOINT_EVENT( | ||
1480 | 31 | mir_server_shared_library_prober, | ||
1481 | 32 | probing_path, | ||
1482 | 33 | TP_ARGS(const char*, path), | ||
1483 | 34 | TP_FIELDS( | ||
1484 | 35 | ctf_string(path, path) | ||
1485 | 36 | ) | ||
1486 | 37 | ) | ||
1487 | 38 | |||
1488 | 39 | TRACEPOINT_EVENT( | ||
1489 | 40 | mir_server_shared_library_prober, | ||
1490 | 41 | probing_failed, | ||
1491 | 42 | TP_ARGS(const char*, path, const char*, message), | ||
1492 | 43 | TP_FIELDS( | ||
1493 | 44 | ctf_string(path, path) | ||
1494 | 45 | ctf_string(message, message) | ||
1495 | 46 | ) | ||
1496 | 47 | ) | ||
1497 | 48 | |||
1498 | 49 | TRACEPOINT_EVENT( | ||
1499 | 50 | mir_server_shared_library_prober, | ||
1500 | 51 | loading_library, | ||
1501 | 52 | TP_ARGS(const char*, path), | ||
1502 | 53 | TP_FIELDS( | ||
1503 | 54 | ctf_string(path, path) | ||
1504 | 55 | ) | ||
1505 | 56 | ) | ||
1506 | 57 | |||
1507 | 58 | TRACEPOINT_EVENT( | ||
1508 | 59 | mir_server_shared_library_prober, | ||
1509 | 60 | loading_failed, | ||
1510 | 61 | TP_ARGS(const char*, path, const char*, message), | ||
1511 | 62 | TP_FIELDS( | ||
1512 | 63 | ctf_string(path, path) | ||
1513 | 64 | ctf_string(message, message) | ||
1514 | 65 | ) | ||
1515 | 66 | ) | ||
1516 | 67 | |||
1517 | 68 | #endif /* MIR_LTTNG_SHARED_LIBRARY_PROBER_REPORT_TP_H_ */ | ||
1518 | 69 | |||
1519 | 70 | #include <lttng/tracepoint-event.h> | ||
1520 | 0 | 71 | ||
1521 | === modified file 'src/server/report/lttng/tracepoints.c' | |||
1522 | --- src/server/report/lttng/tracepoints.c 2014-02-03 11:44:32 +0000 | |||
1523 | +++ src/server/report/lttng/tracepoints.c 2015-01-22 15:40:28 +0000 | |||
1524 | @@ -8,3 +8,4 @@ | |||
1525 | 8 | #include "session_mediator_report_tp.h" | 8 | #include "session_mediator_report_tp.h" |
1526 | 9 | #include "scene_report_tp.h" | 9 | #include "scene_report_tp.h" |
1527 | 10 | #include "message_processor_report_tp.h" | 10 | #include "message_processor_report_tp.h" |
1528 | 11 | #include "shared_library_prober_report_tp.h" | ||
1529 | 11 | 12 | ||
1530 | === modified file 'src/server/report/lttng_report_factory.h' | |||
1531 | --- src/server/report/lttng_report_factory.h 2014-02-11 15:18:07 +0000 | |||
1532 | +++ src/server/report/lttng_report_factory.h 2015-01-22 15:40:28 +0000 | |||
1533 | @@ -35,6 +35,7 @@ | |||
1534 | 35 | std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() override; | 35 | std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() override; |
1535 | 36 | std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() override; | 36 | std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() override; |
1536 | 37 | std::shared_ptr<input::InputReport> create_input_report() override; | 37 | std::shared_ptr<input::InputReport> create_input_report() override; |
1537 | 38 | std::shared_ptr<SharedLibraryProberReport> create_shared_library_prober_report() override; | ||
1538 | 38 | }; | 39 | }; |
1539 | 39 | } | 40 | } |
1540 | 40 | } | 41 | } |
1541 | 41 | 42 | ||
1542 | === modified file 'src/server/report/null/null_report_factory.cpp' | |||
1543 | --- src/server/report/null/null_report_factory.cpp 2014-02-17 22:35:23 +0000 | |||
1544 | +++ src/server/report/null/null_report_factory.cpp 2015-01-22 15:40:28 +0000 | |||
1545 | @@ -25,6 +25,7 @@ | |||
1546 | 25 | #include "display_report.h" | 25 | #include "display_report.h" |
1547 | 26 | #include "input_report.h" | 26 | #include "input_report.h" |
1548 | 27 | #include "scene_report.h" | 27 | #include "scene_report.h" |
1549 | 28 | #include "mir/logging/null_shared_library_prober_report.h" | ||
1550 | 28 | 29 | ||
1551 | 29 | std::shared_ptr<mir::compositor::CompositorReport> mir::report::NullReportFactory::create_compositor_report() | 30 | std::shared_ptr<mir::compositor::CompositorReport> mir::report::NullReportFactory::create_compositor_report() |
1552 | 30 | { | 31 | { |
1553 | @@ -61,11 +62,21 @@ | |||
1554 | 61 | return std::make_shared<null::InputReport>(); | 62 | return std::make_shared<null::InputReport>(); |
1555 | 62 | } | 63 | } |
1556 | 63 | 64 | ||
1557 | 65 | std::shared_ptr<mir::SharedLibraryProberReport> mir::report::NullReportFactory::create_shared_library_prober_report() | ||
1558 | 66 | { | ||
1559 | 67 | return std::make_shared<logging::NullSharedLibraryProberReport>(); | ||
1560 | 68 | } | ||
1561 | 69 | |||
1562 | 64 | std::shared_ptr<mir::compositor::CompositorReport> mir::report::null_compositor_report() | 70 | std::shared_ptr<mir::compositor::CompositorReport> mir::report::null_compositor_report() |
1563 | 65 | { | 71 | { |
1564 | 66 | return NullReportFactory{}.create_compositor_report(); | 72 | return NullReportFactory{}.create_compositor_report(); |
1565 | 67 | } | 73 | } |
1566 | 68 | 74 | ||
1567 | 75 | std::shared_ptr<mir::SharedLibraryProberReport> mir::report::null_shared_library_prober_report() | ||
1568 | 76 | { | ||
1569 | 77 | return NullReportFactory{}.create_shared_library_prober_report(); | ||
1570 | 78 | } | ||
1571 | 79 | |||
1572 | 69 | std::shared_ptr<mir::graphics::DisplayReport> mir::report::null_display_report() | 80 | std::shared_ptr<mir::graphics::DisplayReport> mir::report::null_display_report() |
1573 | 70 | { | 81 | { |
1574 | 71 | return NullReportFactory{}.create_display_report(); | 82 | return NullReportFactory{}.create_display_report(); |
1575 | 72 | 83 | ||
1576 | === modified file 'src/server/report/null_report_factory.h' | |||
1577 | --- src/server/report/null_report_factory.h 2014-02-17 22:35:23 +0000 | |||
1578 | +++ src/server/report/null_report_factory.h 2015-01-22 15:40:28 +0000 | |||
1579 | @@ -35,6 +35,7 @@ | |||
1580 | 35 | std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() override; | 35 | std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() override; |
1581 | 36 | std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() override; | 36 | std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() override; |
1582 | 37 | std::shared_ptr<input::InputReport> create_input_report() override; | 37 | std::shared_ptr<input::InputReport> create_input_report() override; |
1583 | 38 | std::shared_ptr<mir::SharedLibraryProberReport> create_shared_library_prober_report() override; | ||
1584 | 38 | }; | 39 | }; |
1585 | 39 | 40 | ||
1586 | 40 | std::shared_ptr<compositor::CompositorReport> null_compositor_report(); | 41 | std::shared_ptr<compositor::CompositorReport> null_compositor_report(); |
1587 | @@ -44,6 +45,7 @@ | |||
1588 | 44 | std::shared_ptr<frontend::SessionMediatorReport> null_session_mediator_report(); | 45 | std::shared_ptr<frontend::SessionMediatorReport> null_session_mediator_report(); |
1589 | 45 | std::shared_ptr<frontend::MessageProcessorReport> null_message_processor_report(); | 46 | std::shared_ptr<frontend::MessageProcessorReport> null_message_processor_report(); |
1590 | 46 | std::shared_ptr<input::InputReport> null_input_report(); | 47 | std::shared_ptr<input::InputReport> null_input_report(); |
1591 | 48 | std::shared_ptr<mir::SharedLibraryProberReport> null_shared_library_prober_report(); | ||
1592 | 47 | 49 | ||
1593 | 48 | } | 50 | } |
1594 | 49 | } | 51 | } |
1595 | 50 | 52 | ||
1596 | === modified file 'src/server/report/report_factory.h' | |||
1597 | --- src/server/report/report_factory.h 2014-02-11 15:18:07 +0000 | |||
1598 | +++ src/server/report/report_factory.h 2015-01-22 15:40:28 +0000 | |||
1599 | @@ -23,6 +23,7 @@ | |||
1600 | 23 | 23 | ||
1601 | 24 | namespace mir | 24 | namespace mir |
1602 | 25 | { | 25 | { |
1603 | 26 | class SharedLibraryProberReport; | ||
1604 | 26 | namespace compositor | 27 | namespace compositor |
1605 | 27 | { | 28 | { |
1606 | 28 | class CompositorReport; | 29 | class CompositorReport; |
1607 | @@ -59,6 +60,7 @@ | |||
1608 | 59 | virtual std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() = 0; | 60 | virtual std::shared_ptr<frontend::SessionMediatorReport> create_session_mediator_report() = 0; |
1609 | 60 | virtual std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() = 0; | 61 | virtual std::shared_ptr<frontend::MessageProcessorReport> create_message_processor_report() = 0; |
1610 | 61 | virtual std::shared_ptr<input::InputReport> create_input_report() = 0; | 62 | virtual std::shared_ptr<input::InputReport> create_input_report() = 0; |
1611 | 63 | virtual std::shared_ptr<SharedLibraryProberReport> create_shared_library_prober_report() = 0; | ||
1612 | 62 | 64 | ||
1613 | 63 | protected: | 65 | protected: |
1614 | 64 | ReportFactory() = default; | 66 | ReportFactory() = default; |
1615 | 65 | 67 | ||
1616 | === modified file 'src/server/server.cpp' | |||
1617 | --- src/server/server.cpp 2015-01-19 11:40:40 +0000 | |||
1618 | +++ src/server/server.cpp 2015-01-22 15:40:28 +0000 | |||
1619 | @@ -188,12 +188,15 @@ | |||
1620 | 188 | // TODO this is an ugly frig to avoid exposing the render factory to end users and tests running headless | 188 | // TODO this is an ugly frig to avoid exposing the render factory to end users and tests running headless |
1621 | 189 | auto the_renderer_factory() -> std::shared_ptr<compositor::RendererFactory> override | 189 | auto the_renderer_factory() -> std::shared_ptr<compositor::RendererFactory> override |
1622 | 190 | { | 190 | { |
1624 | 191 | auto const graphics_lib = the_options()->get<std::string>(options::platform_graphics_lib); | 191 | auto const& options = the_options(); |
1625 | 192 | if (options->is_set(options::platform_graphics_lib)) | ||
1626 | 193 | { | ||
1627 | 194 | auto const graphics_lib = options->get<std::string>(options::platform_graphics_lib); | ||
1628 | 192 | 195 | ||
1633 | 193 | if (graphics_lib != "libmirplatformstub.so") | 196 | if (graphics_lib.find("graphics-dummy.so") != std::string::npos) |
1634 | 194 | return mir::DefaultServerConfiguration::the_renderer_factory(); | 197 | return std::make_shared<StubRendererFactory>(); |
1635 | 195 | else | 198 | } |
1636 | 196 | return std::make_shared<StubRendererFactory>(); | 199 | return mir::DefaultServerConfiguration::the_renderer_factory(); |
1637 | 197 | } | 200 | } |
1638 | 198 | 201 | ||
1639 | 199 | using mir::DefaultServerConfiguration::the_options; | 202 | using mir::DefaultServerConfiguration::the_options; |
1640 | 200 | 203 | ||
1641 | === modified file 'src/server/symbols.map' | |||
1642 | --- src/server/symbols.map 2015-01-21 08:38:18 +0000 | |||
1643 | +++ src/server/symbols.map 2015-01-22 15:40:28 +0000 | |||
1644 | @@ -110,6 +110,7 @@ | |||
1645 | 110 | mir::DefaultServerConfiguration::the_session_event_sink*; | 110 | mir::DefaultServerConfiguration::the_session_event_sink*; |
1646 | 111 | mir::DefaultServerConfiguration::the_session_listener*; | 111 | mir::DefaultServerConfiguration::the_session_listener*; |
1647 | 112 | mir::DefaultServerConfiguration::the_session_mediator_report*; | 112 | mir::DefaultServerConfiguration::the_session_mediator_report*; |
1648 | 113 | mir::DefaultServerConfiguration::the_shared_library_prober_report*; | ||
1649 | 113 | mir::DefaultServerConfiguration::the_shell_display_layout*; | 114 | mir::DefaultServerConfiguration::the_shell_display_layout*; |
1650 | 114 | mir::DefaultServerConfiguration::the_shell_focus_setter*; | 115 | mir::DefaultServerConfiguration::the_shell_focus_setter*; |
1651 | 115 | mir::DefaultServerConfiguration::the_snapshot_strategy*; | 116 | mir::DefaultServerConfiguration::the_snapshot_strategy*; |
1652 | @@ -594,6 +595,7 @@ | |||
1653 | 594 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_event_sink*; | 595 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_event_sink*; |
1654 | 595 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_listener*; | 596 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_listener*; |
1655 | 596 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_mediator_report*; | 597 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_mediator_report*; |
1656 | 598 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shared_library_prober_report*; | ||
1657 | 597 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell_display_layout*; | 599 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell_display_layout*; |
1658 | 598 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell_focus_setter*; | 600 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell_focus_setter*; |
1659 | 599 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_snapshot_strategy*; | 601 | non-virtual?thunk?to?mir::DefaultServerConfiguration::the_snapshot_strategy*; |
1660 | 600 | 602 | ||
1661 | === modified file 'src/wrapper.c' | |||
1662 | --- src/wrapper.c 2015-01-14 06:39:13 +0000 | |||
1663 | +++ src/wrapper.c 2015-01-22 15:40:28 +0000 | |||
1664 | @@ -46,6 +46,9 @@ | |||
1665 | 46 | *dest_max = '\0'; | 46 | *dest_max = '\0'; |
1666 | 47 | setenv("MIR_CLIENT_PLATFORM_PATH", path, 1); | 47 | setenv("MIR_CLIENT_PLATFORM_PATH", path, 1); |
1667 | 48 | printf("MIR_CLIENT_PLATFORM_PATH=%s\n", path); | 48 | printf("MIR_CLIENT_PLATFORM_PATH=%s\n", path); |
1668 | 49 | strncpy(pivot+7, "server-modules/", pivot_max-7); | ||
1669 | 50 | setenv("MIR_SERVER_PLATFORM_PATH", path, 1); | ||
1670 | 51 | printf("MIR_SERVER_PLATFORM_PATH=%s\n", path); | ||
1671 | 49 | 52 | ||
1672 | 50 | pivot[6] = '\0'; /* truncate lib/client-modules to just lib */ | 53 | pivot[6] = '\0'; /* truncate lib/client-modules to just lib */ |
1673 | 51 | setenv("LD_LIBRARY_PATH", path, 1); | 54 | setenv("LD_LIBRARY_PATH", path, 1); |
1674 | 52 | 55 | ||
1675 | === modified file 'tests/acceptance-tests/CMakeLists.txt' | |||
1676 | --- tests/acceptance-tests/CMakeLists.txt 2015-01-14 06:39:13 +0000 | |||
1677 | +++ tests/acceptance-tests/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
1678 | @@ -4,10 +4,6 @@ | |||
1679 | 4 | ${CMAKE_SOURCE_DIR} | 4 | ${CMAKE_SOURCE_DIR} |
1680 | 5 | ) | 5 | ) |
1681 | 6 | 6 | ||
1682 | 7 | add_definitions( | ||
1683 | 8 | -DMIR_PLATFORM_DRIVER_BINARY="${MIR_PLATFORM_DRIVER_BINARY}" | ||
1684 | 9 | ) | ||
1685 | 10 | |||
1686 | 11 | set( | 7 | set( |
1687 | 12 | SOURCES | 8 | SOURCES |
1688 | 13 | 9 | ||
1689 | @@ -67,9 +63,9 @@ | |||
1690 | 67 | mirplatform | 63 | mirplatform |
1691 | 68 | 64 | ||
1692 | 69 | mir-test | 65 | mir-test |
1693 | 66 | mir-test-framework | ||
1694 | 70 | mir-test-doubles | 67 | mir-test-doubles |
1695 | 71 | mir-test-doubles-platform | 68 | mir-test-doubles-platform |
1696 | 72 | mir-test-framework | ||
1697 | 73 | 3rd_party | 69 | 3rd_party |
1698 | 74 | 70 | ||
1699 | 75 | ${PROTOBUF_LIBRARIES} | 71 | ${PROTOBUF_LIBRARIES} |
1700 | 76 | 72 | ||
1701 | === modified file 'tests/acceptance-tests/server_configuration_wrapping.cpp' | |||
1702 | --- tests/acceptance-tests/server_configuration_wrapping.cpp 2014-11-06 03:56:24 +0000 | |||
1703 | +++ tests/acceptance-tests/server_configuration_wrapping.cpp 2015-01-22 15:40:28 +0000 | |||
1704 | @@ -21,11 +21,14 @@ | |||
1705 | 21 | 21 | ||
1706 | 22 | #include "mir_test_framework/headless_test.h" | 22 | #include "mir_test_framework/headless_test.h" |
1707 | 23 | 23 | ||
1708 | 24 | #include "mir_test_framework/executable_path.h" | ||
1709 | 25 | |||
1710 | 24 | #include <gtest/gtest.h> | 26 | #include <gtest/gtest.h> |
1711 | 25 | #include <gmock/gmock.h> | 27 | #include <gmock/gmock.h> |
1712 | 26 | 28 | ||
1713 | 27 | namespace ms = mir::scene; | 29 | namespace ms = mir::scene; |
1714 | 28 | namespace msh = mir::shell; | 30 | namespace msh = mir::shell; |
1715 | 31 | namespace mtf = mir_test_framework; | ||
1716 | 29 | 32 | ||
1717 | 30 | using namespace testing; | 33 | using namespace testing; |
1718 | 31 | 34 | ||
1719 | 32 | 35 | ||
1720 | === modified file 'tests/acceptance-tests/test_symbols_required_by_mesa.cpp' | |||
1721 | --- tests/acceptance-tests/test_symbols_required_by_mesa.cpp 2015-01-14 06:39:13 +0000 | |||
1722 | +++ tests/acceptance-tests/test_symbols_required_by_mesa.cpp 2015-01-22 15:40:28 +0000 | |||
1723 | @@ -28,7 +28,7 @@ | |||
1724 | 28 | 28 | ||
1725 | 29 | TEST(SymbolsRequiredByMesa, are_exported_by_client_platform_mesa) | 29 | TEST(SymbolsRequiredByMesa, are_exported_by_client_platform_mesa) |
1726 | 30 | { | 30 | { |
1728 | 31 | auto const handle = dlopen((mtf::library_path() + "/client-modules/mesa.so").c_str(), RTLD_LAZY); | 31 | auto const handle = dlopen(mtf::client_platform("mesa.so").c_str(), RTLD_LAZY); |
1729 | 32 | ASSERT_THAT(handle, NotNull()); | 32 | ASSERT_THAT(handle, NotNull()); |
1730 | 33 | 33 | ||
1731 | 34 | auto const sym = dlsym(handle, "mir_client_mesa_egl_native_display_is_valid"); | 34 | auto const sym = dlsym(handle, "mir_client_mesa_egl_native_display_is_valid"); |
1732 | @@ -39,7 +39,7 @@ | |||
1733 | 39 | 39 | ||
1734 | 40 | TEST(SymbolsRequiredByMesa, are_exported_by_libmirplatformgraphics) | 40 | TEST(SymbolsRequiredByMesa, are_exported_by_libmirplatformgraphics) |
1735 | 41 | { | 41 | { |
1737 | 42 | auto const handle = dlopen(MIR_PLATFORM_DRIVER_BINARY, RTLD_LAZY); | 42 | auto const handle = dlopen(mtf::server_platform("graphics-mesa.so").c_str(), RTLD_LAZY); |
1738 | 43 | ASSERT_THAT(handle, NotNull()); | 43 | ASSERT_THAT(handle, NotNull()); |
1739 | 44 | 44 | ||
1740 | 45 | auto const sym = dlsym(handle, "mir_server_mesa_egl_native_display_is_valid"); | 45 | auto const sym = dlsym(handle, "mir_server_mesa_egl_native_display_is_valid"); |
1741 | 46 | 46 | ||
1742 | === modified file 'tests/include/mir_test_framework/client_platform_factory.h' | |||
1743 | --- tests/include/mir_test_framework/client_platform_factory.h 2015-01-15 15:17:02 +0000 | |||
1744 | +++ tests/include/mir_test_framework/client_platform_factory.h 2015-01-22 15:40:28 +0000 | |||
1745 | @@ -37,7 +37,7 @@ | |||
1746 | 37 | mtd::MockClientContext ctx; | 37 | mtd::MockClientContext ctx; |
1747 | 38 | ON_CALL(ctx, populate(_)) | 38 | ON_CALL(ctx, populate(_)) |
1748 | 39 | .WillByDefault(Invoke([](MirPlatformPackage& package) { ::memset(&package, 0, sizeof(package)); })); | 39 | .WillByDefault(Invoke([](MirPlatformPackage& package) { ::memset(&package, 0, sizeof(package)); })); |
1750 | 40 | platform_library = std::make_shared<mir::SharedLibrary>(library_path() + "/client-modules/android.so"); | 40 | platform_library = std::make_shared<mir::SharedLibrary>(client_platform("android.so")); |
1751 | 41 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); | 41 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); |
1752 | 42 | return platform_factory(&ctx); | 42 | return platform_factory(&ctx); |
1753 | 43 | } | 43 | } |
1754 | @@ -52,7 +52,7 @@ | |||
1755 | 52 | ::memset(&package, 0, sizeof(package)); | 52 | ::memset(&package, 0, sizeof(package)); |
1756 | 53 | package.fd_items = 1; | 53 | package.fd_items = 1; |
1757 | 54 | })); | 54 | })); |
1759 | 55 | platform_library = std::make_shared<mir::SharedLibrary>(library_path() + "/client-modules/mesa.so"); | 55 | platform_library = std::make_shared<mir::SharedLibrary>(client_platform("mesa.so")); |
1760 | 56 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); | 56 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); |
1761 | 57 | return platform_factory(&ctx); | 57 | return platform_factory(&ctx); |
1762 | 58 | } | 58 | } |
1763 | 59 | 59 | ||
1764 | === modified file 'tests/include/mir_test_framework/executable_path.h' | |||
1765 | --- tests/include/mir_test_framework/executable_path.h 2015-01-14 06:39:13 +0000 | |||
1766 | +++ tests/include/mir_test_framework/executable_path.h 2015-01-22 15:40:28 +0000 | |||
1767 | @@ -26,5 +26,7 @@ | |||
1768 | 26 | std::string executable_path(); | 26 | std::string executable_path(); |
1769 | 27 | 27 | ||
1770 | 28 | std::string library_path(); | 28 | std::string library_path(); |
1771 | 29 | std::string server_platform(std::string const& name); | ||
1772 | 30 | std::string client_platform(std::string const& name); | ||
1773 | 29 | } | 31 | } |
1774 | 30 | #endif /* MIR_TEST_FRAMEWORK_EXECUTABLE_PATH_H_ */ | 32 | #endif /* MIR_TEST_FRAMEWORK_EXECUTABLE_PATH_H_ */ |
1775 | 31 | 33 | ||
1776 | === modified file 'tests/include/mir_test_framework/headless_test.h' | |||
1777 | --- tests/include/mir_test_framework/headless_test.h 2015-01-14 06:39:13 +0000 | |||
1778 | +++ tests/include/mir_test_framework/headless_test.h 2015-01-22 15:40:28 +0000 | |||
1779 | @@ -32,7 +32,7 @@ | |||
1780 | 32 | { | 32 | { |
1781 | 33 | /** Basic fixture for tests that don't use graphics hardware. | 33 | /** Basic fixture for tests that don't use graphics hardware. |
1782 | 34 | * This provides a mechanism for temporarily setting environment variables. | 34 | * This provides a mechanism for temporarily setting environment variables. |
1784 | 35 | * It automatically sets "MIR_SERVER_PLATFORM_GRAPHICS_LIB" to "libmirplatformstub.so" | 35 | * It automatically sets "MIR_SERVER_PLATFORM_GRAPHICS_LIB" to "graphics-dummy.so" |
1785 | 36 | * as the tests do not hit the graphics hardware. | 36 | * as the tests do not hit the graphics hardware. |
1786 | 37 | */ | 37 | */ |
1787 | 38 | class HeadlessTest : public ::testing::Test, public AsyncServerRunner | 38 | class HeadlessTest : public ::testing::Test, public AsyncServerRunner |
1788 | 39 | 39 | ||
1789 | === added file 'tests/include/mir_test_framework/stub_server_platform_factory.h' | |||
1790 | --- tests/include/mir_test_framework/stub_server_platform_factory.h 1970-01-01 00:00:00 +0000 | |||
1791 | +++ tests/include/mir_test_framework/stub_server_platform_factory.h 2015-01-22 15:40:28 +0000 | |||
1792 | @@ -0,0 +1,49 @@ | |||
1793 | 1 | /* | ||
1794 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1795 | 3 | * | ||
1796 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1797 | 5 | * under the terms of the GNU General Public License version 3, | ||
1798 | 6 | * as published by the Free Software Foundation. | ||
1799 | 7 | * | ||
1800 | 8 | * This program is distributed in the hope that it will be useful, | ||
1801 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1802 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1803 | 11 | * GNU General Public License for more details. | ||
1804 | 12 | * | ||
1805 | 13 | * You should have received a copy of the GNU General Public License | ||
1806 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1807 | 15 | * | ||
1808 | 16 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | ||
1809 | 17 | */ | ||
1810 | 18 | |||
1811 | 19 | #ifndef MIR_TEST_FRAMEWORK_STUB_SERVER_PLATFORM_FACTORY_ | ||
1812 | 20 | #define MIR_TEST_FRAMEWORK_STUB_SERVER_PLATFORM_FACTORY_ | ||
1813 | 21 | |||
1814 | 22 | #include "mir/geometry/rectangle.h" | ||
1815 | 23 | |||
1816 | 24 | #include "mir/graphics/platform.h" | ||
1817 | 25 | #include <vector> | ||
1818 | 26 | |||
1819 | 27 | namespace geom = mir::geometry; | ||
1820 | 28 | |||
1821 | 29 | namespace mir | ||
1822 | 30 | { | ||
1823 | 31 | namespace graphics | ||
1824 | 32 | { | ||
1825 | 33 | class Platform; | ||
1826 | 34 | } | ||
1827 | 35 | } | ||
1828 | 36 | |||
1829 | 37 | namespace mg = mir::graphics; | ||
1830 | 38 | |||
1831 | 39 | namespace mir_test_framework | ||
1832 | 40 | { | ||
1833 | 41 | |||
1834 | 42 | std::shared_ptr<mg::Platform> make_stubbed_server_graphics_platform(std::vector<geom::Rectangle> const& display_rects); | ||
1835 | 43 | |||
1836 | 44 | void set_next_display_rects(std::unique_ptr<std::vector<geom::Rectangle>>&& display_rects); | ||
1837 | 45 | |||
1838 | 46 | void set_next_preset_display(std::shared_ptr<mir::graphics::Display> const& display); | ||
1839 | 47 | |||
1840 | 48 | } | ||
1841 | 49 | #endif /* MIR_TEST_FRAMEWORK_STUB_SERVER_PLATFORM_FACTORY_ */ | ||
1842 | 0 | 50 | ||
1843 | === modified file 'tests/integration-tests/CMakeLists.txt' | |||
1844 | --- tests/integration-tests/CMakeLists.txt 2015-01-21 17:30:44 +0000 | |||
1845 | +++ tests/integration-tests/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
1846 | @@ -99,6 +99,15 @@ | |||
1847 | 99 | ${GTEST_BOTH_LIBRARIES} | 99 | ${GTEST_BOTH_LIBRARIES} |
1848 | 100 | ${GMOCK_LIBRARY} | 100 | ${GMOCK_LIBRARY} |
1849 | 101 | ${GMOCK_MAIN_LIBRARY} | 101 | ${GMOCK_MAIN_LIBRARY} |
1850 | 102 | # Mesa platform dependencies | ||
1851 | 103 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} | ||
1852 | 104 | ${GBM_LDFLAGS} ${GBM_LIBRARIES} | ||
1853 | 105 | # Android platform dependencies | ||
1854 | 106 | ${LIBHARDWARE_LIBRARIES} | ||
1855 | 107 | ${ANDROID_PROPERTIES_LIBRARIES} | ||
1856 | 108 | # Shared platform dependencies | ||
1857 | 109 | ${EGL_LDFLAGS} ${EGL_LIBRARIES} | ||
1858 | 110 | ${GLESv2_LDFLAGS} ${GLESv2_LIBRARIES} | ||
1859 | 102 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 111 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
1860 | 103 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} | 112 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} |
1861 | 104 | ${GBM_LDFLAGS} ${GBM_LIBRARIES} | 113 | ${GBM_LDFLAGS} ${GBM_LIBRARIES} |
1862 | @@ -108,7 +117,7 @@ | |||
1863 | 108 | ${MIR_SERVER_REFERENCES} | 117 | ${MIR_SERVER_REFERENCES} |
1864 | 109 | ) | 118 | ) |
1865 | 110 | 119 | ||
1867 | 111 | if (MIR_TEST_PLATFORM STREQUAL "android") | 120 | if (MIR_BUILD_PLATFORM_ANDROID) |
1868 | 112 | target_link_libraries(mir_integration_tests | 121 | target_link_libraries(mir_integration_tests |
1869 | 113 | mirsharedandroid | 122 | mirsharedandroid |
1870 | 114 | ${ANDROID_PROPERTIES_LDFLAGS} | 123 | ${ANDROID_PROPERTIES_LDFLAGS} |
1871 | 115 | 124 | ||
1872 | === modified file 'tests/mir_test_doubles/CMakeLists.txt' | |||
1873 | --- tests/mir_test_doubles/CMakeLists.txt 2015-01-14 06:39:13 +0000 | |||
1874 | +++ tests/mir_test_doubles/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
1875 | @@ -31,16 +31,18 @@ | |||
1876 | 31 | ) | 31 | ) |
1877 | 32 | 32 | ||
1878 | 33 | if (MIR_BUILD_PLATFORM_MESA) | 33 | if (MIR_BUILD_PLATFORM_MESA) |
1884 | 34 | include_directories(${DRM_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}) | 34 | include_directories(${DRM_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}) |
1885 | 35 | list(APPEND MIR_TEST_DOUBLES_PLATFORM_SRCS | 35 | list(APPEND MIR_TEST_DOUBLES_PLATFORM_SRCS |
1886 | 36 | ${CMAKE_CURRENT_SOURCE_DIR}/mock_drm.cpp | 36 | ${CMAKE_CURRENT_SOURCE_DIR}/mock_drm.cpp |
1887 | 37 | ${CMAKE_CURRENT_SOURCE_DIR}/mock_gbm.cpp | 37 | ${CMAKE_CURRENT_SOURCE_DIR}/mock_gbm.cpp |
1888 | 38 | ) | 38 | ) |
1889 | 39 | endif() | 39 | endif() |
1890 | 40 | |||
1891 | 40 | if (MIR_BUILD_PLATFORM_ANDROID) | 41 | if (MIR_BUILD_PLATFORM_ANDROID) |
1895 | 41 | list(APPEND MIR_TEST_DOUBLES_PLATFORM_SRCS | 42 | include_directories(SYSTEM ${ANDROID_HEADERS_INCLUDE_DIRS}) |
1896 | 42 | ${CMAKE_CURRENT_SOURCE_DIR}/mock_android_hw.cpp | 43 | list(APPEND MIR_TEST_DOUBLES_PLATFORM_SRCS |
1897 | 43 | ) | 44 | ${CMAKE_CURRENT_SOURCE_DIR}/mock_android_hw.cpp |
1898 | 45 | ) | ||
1899 | 44 | endif() | 46 | endif() |
1900 | 45 | 47 | ||
1901 | 46 | add_library( | 48 | add_library( |
1902 | 47 | 49 | ||
1903 | === modified file 'tests/mir_test_framework/CMakeLists.txt' | |||
1904 | --- tests/mir_test_framework/CMakeLists.txt 2015-01-14 06:39:13 +0000 | |||
1905 | +++ tests/mir_test_framework/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
1906 | @@ -11,6 +11,11 @@ | |||
1907 | 11 | ${ANDROID_HEADERS_INCLUDE_DIRS} | 11 | ${ANDROID_HEADERS_INCLUDE_DIRS} |
1908 | 12 | ) | 12 | ) |
1909 | 13 | 13 | ||
1910 | 14 | add_definitions( | ||
1911 | 15 | -DMIR_CLIENT_PLATFORM_PATH="${MIR_CLIENT_PLATFORM_PATH}" | ||
1912 | 16 | -DMIR_SERVER_PLATFORM_PATH="${MIR_SERVER_PLATFORM_PATH}" | ||
1913 | 17 | ) | ||
1914 | 18 | |||
1915 | 14 | set( | 19 | set( |
1916 | 15 | TEST_FRAMEWORK_SRCS | 20 | TEST_FRAMEWORK_SRCS |
1917 | 16 | 21 | ||
1918 | @@ -34,6 +39,7 @@ | |||
1919 | 34 | process.cpp | 39 | process.cpp |
1920 | 35 | using_stub_client_platform.cpp | 40 | using_stub_client_platform.cpp |
1921 | 36 | stub_client_platform_factory.cpp | 41 | stub_client_platform_factory.cpp |
1922 | 42 | stub_server_platform_factory.cpp | ||
1923 | 37 | udev_environment.cpp | 43 | udev_environment.cpp |
1924 | 38 | declarative_placement_strategy.cpp | 44 | declarative_placement_strategy.cpp |
1925 | 39 | fake_event_hub_server_configuration.cpp | 45 | fake_event_hub_server_configuration.cpp |
1926 | @@ -59,8 +65,8 @@ | |||
1927 | 59 | target_link_libraries( | 65 | target_link_libraries( |
1928 | 60 | mir-test-framework | 66 | mir-test-framework |
1929 | 61 | 67 | ||
1930 | 62 | mirplatformstub | ||
1931 | 63 | 3rd_party | 68 | 3rd_party |
1932 | 69 | mir-test-doubles | ||
1933 | 64 | 70 | ||
1934 | 65 | ${PROTOBUF_LIBRARIES} | 71 | ${PROTOBUF_LIBRARIES} |
1935 | 66 | ${Boost_LIBRARIES} | 72 | ${Boost_LIBRARIES} |
1936 | @@ -94,6 +100,31 @@ | |||
1937 | 94 | LINK_FLAGS "-Wl,--version-script,${symbol_map}" | 100 | LINK_FLAGS "-Wl,--version-script,${symbol_map}" |
1938 | 95 | ) | 101 | ) |
1939 | 96 | 102 | ||
1940 | 103 | set(server_symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols-server.map) | ||
1941 | 104 | add_library( | ||
1942 | 105 | mirplatformgraphicsstub MODULE | ||
1943 | 106 | |||
1944 | 107 | platform_graphics_dummy.cpp | ||
1945 | 108 | stubbed_graphics_platform.cpp | ||
1946 | 109 | ) | ||
1947 | 110 | |||
1948 | 111 | target_link_libraries( | ||
1949 | 112 | mirplatformgraphicsstub | ||
1950 | 113 | |||
1951 | 114 | mir-test | ||
1952 | 115 | mir-test-framework | ||
1953 | 116 | mir-test-doubles | ||
1954 | 117 | ${UMOCKDEV_LDFLAGS} ${UMOCKDEV_LIBRARIES} | ||
1955 | 118 | ) | ||
1956 | 119 | |||
1957 | 120 | set_target_properties( | ||
1958 | 121 | mirplatformgraphicsstub PROPERTIES; | ||
1959 | 122 | LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/server-modules | ||
1960 | 123 | OUTPUT_NAME graphics-dummy | ||
1961 | 124 | PREFIX "" | ||
1962 | 125 | LINK_FLAGS "-Wl,--version-script,${server_symbol_map}" | ||
1963 | 126 | ) | ||
1964 | 127 | |||
1965 | 97 | add_custom_command(TARGET mir-test-framework POST_BUILD | 128 | add_custom_command(TARGET mir-test-framework POST_BUILD |
1966 | 98 | COMMAND ${CMAKE_COMMAND} -E copy_directory | 129 | COMMAND ${CMAKE_COMMAND} -E copy_directory |
1967 | 99 | ${CMAKE_CURRENT_SOURCE_DIR}/udev_recordings ${CMAKE_BINARY_DIR}/bin/udev_recordings | 130 | ${CMAKE_CURRENT_SOURCE_DIR}/udev_recordings ${CMAKE_BINARY_DIR}/bin/udev_recordings |
1968 | @@ -105,21 +136,8 @@ | |||
1969 | 105 | COMMENT "Copying testing cursor themes to build dir..." | 136 | COMMENT "Copying testing cursor themes to build dir..." |
1970 | 106 | ) | 137 | ) |
1971 | 107 | 138 | ||
1989 | 108 | add_library( | 139 | string (REPLACE " -Wl,--no-undefined" " " CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) |
1990 | 109 | mirplatformstub SHARED | 140 | |
1991 | 110 | stubbed_graphics_platform.cpp | 141 | install(TARGETS mirplatformgraphicsstub LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH}) |
1992 | 111 | ) | 142 | |
1976 | 112 | |||
1977 | 113 | target_link_libraries(mirplatformstub | ||
1978 | 114 | mirplatform | ||
1979 | 115 | mir-test-doubles | ||
1980 | 116 | mir-test | ||
1981 | 117 | ) | ||
1982 | 118 | |||
1983 | 119 | set_target_properties(mirplatformstub | ||
1984 | 120 | PROPERTIES | ||
1985 | 121 | LINK_FLAGS "-Wl,--exclude-libs=ALL" | ||
1986 | 122 | ) | ||
1987 | 123 | |||
1988 | 124 | install(TARGETS mirplatformstub LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
1993 | 125 | install(TARGETS mirclientplatformstub LIBRARY DESTINATION ${MIR_CLIENT_PLATFORM_PATH}) | 143 | install(TARGETS mirclientplatformstub LIBRARY DESTINATION ${MIR_CLIENT_PLATFORM_PATH}) |
1994 | 126 | 144 | ||
1995 | === modified file 'tests/mir_test_framework/executable_path.cpp' | |||
1996 | --- tests/mir_test_framework/executable_path.cpp 2015-01-14 06:39:13 +0000 | |||
1997 | +++ tests/mir_test_framework/executable_path.cpp 2015-01-22 15:40:28 +0000 | |||
1998 | @@ -24,6 +24,7 @@ | |||
1999 | 24 | #include <stdexcept> | 24 | #include <stdexcept> |
2000 | 25 | #include <boost/throw_exception.hpp> | 25 | #include <boost/throw_exception.hpp> |
2001 | 26 | #include <boost/exception/errinfo_errno.hpp> | 26 | #include <boost/exception/errinfo_errno.hpp> |
2002 | 27 | #include <boost/filesystem.hpp> | ||
2003 | 27 | 28 | ||
2004 | 28 | std::string mir_test_framework::executable_path() | 29 | std::string mir_test_framework::executable_path() |
2005 | 29 | { | 30 | { |
2006 | @@ -43,3 +44,29 @@ | |||
2007 | 43 | { | 44 | { |
2008 | 44 | return executable_path() + "/../lib"; | 45 | return executable_path() + "/../lib"; |
2009 | 45 | } | 46 | } |
2010 | 47 | |||
2011 | 48 | std::string mir_test_framework::server_platform(std::string const& name) | ||
2012 | 49 | { | ||
2013 | 50 | for (auto const& option : | ||
2014 | 51 | {library_path() + "/server-modules/", library_path() + "/server-platform/", std::string(MIR_SERVER_PLATFORM_PATH) + '/'}) | ||
2015 | 52 | { | ||
2016 | 53 | auto path_to_test = option + name; | ||
2017 | 54 | if (boost::filesystem::exists(path_to_test)) | ||
2018 | 55 | return path_to_test; | ||
2019 | 56 | } | ||
2020 | 57 | |||
2021 | 58 | BOOST_THROW_EXCEPTION(std::runtime_error("Failed to find server platform in standard search locations")); | ||
2022 | 59 | } | ||
2023 | 60 | |||
2024 | 61 | std::string mir_test_framework::client_platform(std::string const& name) | ||
2025 | 62 | { | ||
2026 | 63 | for (auto const& option : | ||
2027 | 64 | {library_path() + "/client-modules/", library_path() + "/client-platform/", std::string(MIR_CLIENT_PLATFORM_PATH) + '/'}) | ||
2028 | 65 | { | ||
2029 | 66 | auto path_to_test = option + name; | ||
2030 | 67 | if (boost::filesystem::exists(path_to_test)) | ||
2031 | 68 | return path_to_test; | ||
2032 | 69 | } | ||
2033 | 70 | |||
2034 | 71 | BOOST_THROW_EXCEPTION(std::runtime_error("Failed to find server platform in standard search locations")); | ||
2035 | 72 | } | ||
2036 | 46 | 73 | ||
2037 | === modified file 'tests/mir_test_framework/headless_test.cpp' | |||
2038 | --- tests/mir_test_framework/headless_test.cpp 2015-01-14 06:39:13 +0000 | |||
2039 | +++ tests/mir_test_framework/headless_test.cpp 2015-01-22 15:40:28 +0000 | |||
2040 | @@ -17,52 +17,30 @@ | |||
2041 | 17 | */ | 17 | */ |
2042 | 18 | 18 | ||
2043 | 19 | #include "mir_test_framework/headless_test.h" | 19 | #include "mir_test_framework/headless_test.h" |
2044 | 20 | #include "mir_test_framework/stub_server_platform_factory.h" | ||
2045 | 20 | 21 | ||
2046 | 21 | #include "mir/shared_library.h" | 22 | #include "mir/shared_library.h" |
2047 | 22 | #include "mir/geometry/rectangle.h" | 23 | #include "mir/geometry/rectangle.h" |
2048 | 24 | #include "mir_test_framework/executable_path.h" | ||
2049 | 23 | 25 | ||
2050 | 24 | #include <boost/throw_exception.hpp> | 26 | #include <boost/throw_exception.hpp> |
2051 | 25 | 27 | ||
2052 | 26 | namespace geom = mir::geometry; | 28 | namespace geom = mir::geometry; |
2053 | 27 | namespace mtf = mir_test_framework; | 29 | namespace mtf = mir_test_framework; |
2054 | 28 | 30 | ||
2055 | 29 | namespace | ||
2056 | 30 | { | ||
2057 | 31 | const char* const mir_server_platform_graphics_lib = "MIR_SERVER_PLATFORM_GRAPHICS_LIB"; | ||
2058 | 32 | |||
2059 | 33 | std::chrono::seconds const timeout{10}; | ||
2060 | 34 | } | ||
2061 | 35 | |||
2062 | 36 | mtf::HeadlessTest::HeadlessTest() | 31 | mtf::HeadlessTest::HeadlessTest() |
2063 | 37 | { | 32 | { |
2065 | 38 | add_to_environment(mir_server_platform_graphics_lib, "libmirplatformstub.so"); | 33 | add_to_environment("MIR_SERVER_PLATFORM_GRAPHICS_LIB", mtf::server_platform("graphics-dummy.so").c_str()); |
2066 | 39 | } | 34 | } |
2067 | 40 | 35 | ||
2068 | 41 | mtf::HeadlessTest::~HeadlessTest() noexcept = default; | 36 | mtf::HeadlessTest::~HeadlessTest() noexcept = default; |
2069 | 42 | 37 | ||
2070 | 43 | |||
2071 | 44 | void mtf::HeadlessTest::preset_display(std::shared_ptr<mir::graphics::Display> const& display) | 38 | void mtf::HeadlessTest::preset_display(std::shared_ptr<mir::graphics::Display> const& display) |
2072 | 45 | { | 39 | { |
2082 | 46 | if (!server_platform_graphics_lib) | 40 | mtf::set_next_preset_display(display); |
2074 | 47 | server_platform_graphics_lib.reset(new mir::SharedLibrary{getenv(mir_server_platform_graphics_lib)}); | ||
2075 | 48 | |||
2076 | 49 | typedef void (*PresetDisplay)(std::shared_ptr<mir::graphics::Display> const&); | ||
2077 | 50 | |||
2078 | 51 | auto const preset_display = | ||
2079 | 52 | server_platform_graphics_lib->load_function<PresetDisplay>("preset_display"); | ||
2080 | 53 | |||
2081 | 54 | preset_display(display); | ||
2083 | 55 | } | 41 | } |
2084 | 56 | 42 | ||
2085 | 57 | void mtf::HeadlessTest::initial_display_layout(std::vector<geom::Rectangle> const& display_rects) | 43 | void mtf::HeadlessTest::initial_display_layout(std::vector<geom::Rectangle> const& display_rects) |
2086 | 58 | { | 44 | { |
2096 | 59 | if (!server_platform_graphics_lib) | 45 | mtf::set_next_display_rects(std::unique_ptr<std::vector<geom::Rectangle>>(new std::vector<geom::Rectangle>(display_rects))); |
2088 | 60 | server_platform_graphics_lib.reset(new mir::SharedLibrary{getenv(mir_server_platform_graphics_lib)}); | ||
2089 | 61 | |||
2090 | 62 | typedef void (*SetDisplayRects)(std::unique_ptr<std::vector<geom::Rectangle>>&&); | ||
2091 | 63 | |||
2092 | 64 | auto const set_display_rects = | ||
2093 | 65 | server_platform_graphics_lib->load_function<SetDisplayRects>("set_display_rects"); | ||
2094 | 66 | |||
2095 | 67 | set_display_rects(std::unique_ptr<std::vector<geom::Rectangle>>(new std::vector<geom::Rectangle>(display_rects))); | ||
2097 | 68 | } | 46 | } |
2098 | 69 | 47 | ||
2099 | === added file 'tests/mir_test_framework/platform_graphics_dummy.cpp' | |||
2100 | --- tests/mir_test_framework/platform_graphics_dummy.cpp 1970-01-01 00:00:00 +0000 | |||
2101 | +++ tests/mir_test_framework/platform_graphics_dummy.cpp 2015-01-22 15:40:28 +0000 | |||
2102 | @@ -0,0 +1,36 @@ | |||
2103 | 1 | /* | ||
2104 | 2 | * Copyright © 2014 Canonical Ltd. | ||
2105 | 3 | * | ||
2106 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
2107 | 5 | * under the terms of the GNU General Public License version 3, | ||
2108 | 6 | * as published by the Free Software Foundation. | ||
2109 | 7 | * | ||
2110 | 8 | * This program is distributed in the hope that it will be useful, | ||
2111 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2112 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2113 | 11 | * GNU General Public License for more details. | ||
2114 | 12 | * | ||
2115 | 13 | * You should have received a copy of the GNU General Public License | ||
2116 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2117 | 15 | * | ||
2118 | 16 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>> | ||
2119 | 17 | */ | ||
2120 | 18 | |||
2121 | 19 | #include "mir/graphics/platform.h" | ||
2122 | 20 | |||
2123 | 21 | extern "C" mir::graphics::PlatformPriority probe_graphics_platform() | ||
2124 | 22 | { | ||
2125 | 23 | return mir::graphics::supported; | ||
2126 | 24 | } | ||
2127 | 25 | |||
2128 | 26 | mir::ModuleProperties const description { | ||
2129 | 27 | "dummy", | ||
2130 | 28 | MIR_VERSION_MAJOR, | ||
2131 | 29 | MIR_VERSION_MINOR, | ||
2132 | 30 | MIR_VERSION_MICRO | ||
2133 | 31 | }; | ||
2134 | 32 | |||
2135 | 33 | extern "C" mir::ModuleProperties const* describe_graphics_module() | ||
2136 | 34 | { | ||
2137 | 35 | return &description; | ||
2138 | 36 | } | ||
2139 | 0 | 37 | ||
2140 | === modified file 'tests/mir_test_framework/stub_client_platform_factory.cpp' | |||
2141 | --- tests/mir_test_framework/stub_client_platform_factory.cpp 2015-01-15 15:17:02 +0000 | |||
2142 | +++ tests/mir_test_framework/stub_client_platform_factory.cpp 2015-01-22 15:40:28 +0000 | |||
2143 | @@ -22,6 +22,7 @@ | |||
2144 | 22 | #include "mir/client_buffer.h" | 22 | #include "mir/client_buffer.h" |
2145 | 23 | #include "mir/client_platform.h" | 23 | #include "mir/client_platform.h" |
2146 | 24 | 24 | ||
2147 | 25 | #include <unistd.h> | ||
2148 | 25 | #include <string.h> | 26 | #include <string.h> |
2149 | 26 | 27 | ||
2150 | 27 | namespace mcl = mir::client; | 28 | namespace mcl = mir::client; |
2151 | 28 | 29 | ||
2152 | === added file 'tests/mir_test_framework/stub_server_platform_factory.cpp' | |||
2153 | --- tests/mir_test_framework/stub_server_platform_factory.cpp 1970-01-01 00:00:00 +0000 | |||
2154 | +++ tests/mir_test_framework/stub_server_platform_factory.cpp 2015-01-22 15:40:28 +0000 | |||
2155 | @@ -0,0 +1,72 @@ | |||
2156 | 1 | |||
2157 | 2 | /* | ||
2158 | 3 | * Copyright © 2014 Canonical Ltd. | ||
2159 | 4 | * | ||
2160 | 5 | * This program is free software: you can redistribute it and/or modify it | ||
2161 | 6 | * under the terms of the GNU General Public License version 3, | ||
2162 | 7 | * as published by the Free Software Foundation. | ||
2163 | 8 | * | ||
2164 | 9 | * This program is distributed in the hope that it will be useful, | ||
2165 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2166 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2167 | 12 | * GNU General Public License for more details. | ||
2168 | 13 | * | ||
2169 | 14 | * You should have received a copy of the GNU General Public License | ||
2170 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2171 | 16 | * | ||
2172 | 17 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | ||
2173 | 18 | */ | ||
2174 | 19 | |||
2175 | 20 | #include "mir/shared_library.h" | ||
2176 | 21 | |||
2177 | 22 | #include "mir/geometry/rectangle.h" | ||
2178 | 23 | |||
2179 | 24 | #include "mir_test_framework/executable_path.h" | ||
2180 | 25 | #include "mir_test_framework/stub_server_platform_factory.h" | ||
2181 | 26 | |||
2182 | 27 | #include <vector> | ||
2183 | 28 | |||
2184 | 29 | namespace geom = mir::geometry; | ||
2185 | 30 | namespace mg = mir::graphics; | ||
2186 | 31 | namespace mtf = mir_test_framework; | ||
2187 | 32 | |||
2188 | 33 | namespace | ||
2189 | 34 | { | ||
2190 | 35 | // NOTE: Raw pointer, deliberately leaked to bypass all the fun | ||
2191 | 36 | // issues around global destructor ordering. | ||
2192 | 37 | mir::SharedLibrary* platform_lib{nullptr}; | ||
2193 | 38 | |||
2194 | 39 | void ensure_platform_library() | ||
2195 | 40 | { | ||
2196 | 41 | if (!platform_lib) | ||
2197 | 42 | { | ||
2198 | 43 | platform_lib = new mir::SharedLibrary{mtf::server_platform("graphics-dummy.so")}; | ||
2199 | 44 | } | ||
2200 | 45 | } | ||
2201 | 46 | } | ||
2202 | 47 | |||
2203 | 48 | std::shared_ptr<mg::Platform> mtf::make_stubbed_server_graphics_platform(std::vector<geom::Rectangle> const& display_rects) | ||
2204 | 49 | { | ||
2205 | 50 | ensure_platform_library(); | ||
2206 | 51 | auto factory = platform_lib->load_function<std::shared_ptr<mg::Platform>(*)(std::vector<geom::Rectangle> const&)>("create_stub_platform"); | ||
2207 | 52 | |||
2208 | 53 | return factory(display_rects); | ||
2209 | 54 | } | ||
2210 | 55 | |||
2211 | 56 | void mtf::set_next_display_rects(std::unique_ptr<std::vector<geom::Rectangle>>&& display_rects) | ||
2212 | 57 | { | ||
2213 | 58 | ensure_platform_library(); | ||
2214 | 59 | |||
2215 | 60 | auto rect_setter = platform_lib->load_function<void(*)(std::unique_ptr<std::vector<geom::Rectangle>>&&)>("set_next_display_rects"); | ||
2216 | 61 | |||
2217 | 62 | rect_setter(std::move(display_rects)); | ||
2218 | 63 | } | ||
2219 | 64 | |||
2220 | 65 | void mtf::set_next_preset_display(std::shared_ptr<mir::graphics::Display> const& display) | ||
2221 | 66 | { | ||
2222 | 67 | ensure_platform_library(); | ||
2223 | 68 | |||
2224 | 69 | auto display_setter = platform_lib->load_function<void(*)(std::shared_ptr<mir::graphics::Display> const&)>("set_next_preset_display"); | ||
2225 | 70 | |||
2226 | 71 | display_setter(display); | ||
2227 | 72 | } | ||
2228 | 0 | 73 | ||
2229 | === modified file 'tests/mir_test_framework/stubbed_graphics_platform.cpp' | |||
2230 | --- tests/mir_test_framework/stubbed_graphics_platform.cpp 2015-01-14 06:39:13 +0000 | |||
2231 | +++ tests/mir_test_framework/stubbed_graphics_platform.cpp 2015-01-22 15:40:28 +0000 | |||
2232 | @@ -243,8 +243,6 @@ | |||
2233 | 243 | 243 | ||
2234 | 244 | namespace | 244 | namespace |
2235 | 245 | { | 245 | { |
2236 | 246 | std::unique_ptr<std::vector<geom::Rectangle>> chosen_display_rects; | ||
2237 | 247 | |||
2238 | 248 | struct GuestPlatformAdapter : mg::Platform | 246 | struct GuestPlatformAdapter : mg::Platform |
2239 | 249 | { | 247 | { |
2240 | 250 | GuestPlatformAdapter( | 248 | GuestPlatformAdapter( |
2241 | @@ -285,6 +283,12 @@ | |||
2242 | 285 | }; | 283 | }; |
2243 | 286 | 284 | ||
2244 | 287 | std::weak_ptr<mg::Platform> the_graphics_platform{}; | 285 | std::weak_ptr<mg::Platform> the_graphics_platform{}; |
2245 | 286 | std::unique_ptr<std::vector<geom::Rectangle>> chosen_display_rects; | ||
2246 | 287 | } | ||
2247 | 288 | |||
2248 | 289 | extern "C" std::shared_ptr<mg::Platform> create_stub_platform(std::vector<geom::Rectangle> const& display_rects) | ||
2249 | 290 | { | ||
2250 | 291 | return std::make_shared<mtf::StubGraphicPlatform>(display_rects); | ||
2251 | 288 | } | 292 | } |
2252 | 289 | 293 | ||
2253 | 290 | extern "C" std::shared_ptr<mg::Platform> create_host_platform( | 294 | extern "C" std::shared_ptr<mg::Platform> create_host_platform( |
2254 | @@ -296,12 +300,12 @@ | |||
2255 | 296 | 300 | ||
2256 | 297 | if (auto const display_rects = std::move(chosen_display_rects)) | 301 | if (auto const display_rects = std::move(chosen_display_rects)) |
2257 | 298 | { | 302 | { |
2259 | 299 | result = std::make_shared<mtf::StubGraphicPlatform>(*display_rects); | 303 | result = create_stub_platform(*display_rects); |
2260 | 300 | } | 304 | } |
2261 | 301 | else | 305 | else |
2262 | 302 | { | 306 | { |
2263 | 303 | static std::vector<geom::Rectangle> const default_display_rects{geom::Rectangle{{0,0},{1600,1600}}}; | 307 | static std::vector<geom::Rectangle> const default_display_rects{geom::Rectangle{{0,0},{1600,1600}}}; |
2265 | 304 | result = std::make_shared<mtf::StubGraphicPlatform>(default_display_rects); | 308 | result = create_stub_platform(default_display_rects); |
2266 | 305 | } | 309 | } |
2267 | 306 | the_graphics_platform = result; | 310 | the_graphics_platform = result; |
2268 | 307 | return result; | 311 | return result; |
2269 | @@ -315,18 +319,18 @@ | |||
2270 | 315 | return std::make_shared<GuestPlatformAdapter>(context, graphics_platform); | 319 | return std::make_shared<GuestPlatformAdapter>(context, graphics_platform); |
2271 | 316 | } | 320 | } |
2272 | 317 | 321 | ||
2274 | 318 | extern "C" void add_platform_options( | 322 | extern "C" void add_graphis_platform_options( |
2275 | 319 | boost::program_options::options_description& /*config*/) | 323 | boost::program_options::options_description& /*config*/) |
2276 | 320 | { | 324 | { |
2277 | 321 | } | 325 | } |
2278 | 322 | 326 | ||
2280 | 323 | extern "C" void set_display_rects( | 327 | extern "C" void set_next_display_rects( |
2281 | 324 | std::unique_ptr<std::vector<geom::Rectangle>>&& display_rects) | 328 | std::unique_ptr<std::vector<geom::Rectangle>>&& display_rects) |
2282 | 325 | { | 329 | { |
2283 | 326 | chosen_display_rects = std::move(display_rects); | 330 | chosen_display_rects = std::move(display_rects); |
2284 | 327 | } | 331 | } |
2285 | 328 | 332 | ||
2287 | 329 | extern "C" void preset_display(std::shared_ptr<mir::graphics::Display> const& display) | 333 | extern "C" void set_next_preset_display(std::shared_ptr<mir::graphics::Display> const& display) |
2288 | 330 | { | 334 | { |
2289 | 331 | display_preset = display; | 335 | display_preset = display; |
2290 | 332 | } | 336 | } |
2291 | 333 | 337 | ||
2292 | === modified file 'tests/mir_test_framework/stubbed_server_configuration.cpp' | |||
2293 | --- tests/mir_test_framework/stubbed_server_configuration.cpp 2015-01-14 06:39:13 +0000 | |||
2294 | +++ tests/mir_test_framework/stubbed_server_configuration.cpp 2015-01-22 15:40:28 +0000 | |||
2295 | @@ -19,7 +19,7 @@ | |||
2296 | 19 | #include "mir_test_framework/stubbed_server_configuration.h" | 19 | #include "mir_test_framework/stubbed_server_configuration.h" |
2297 | 20 | #include "mir_test_framework/command_line_server_configuration.h" | 20 | #include "mir_test_framework/command_line_server_configuration.h" |
2298 | 21 | 21 | ||
2300 | 22 | #include "stubbed_graphics_platform.h" | 22 | #include "mir_test_framework/stub_server_platform_factory.h" |
2301 | 23 | 23 | ||
2302 | 24 | #include "mir/options/default_configuration.h" | 24 | #include "mir/options/default_configuration.h" |
2303 | 25 | #include "mir/graphics/cursor.h" | 25 | #include "mir/graphics/cursor.h" |
2304 | @@ -92,7 +92,7 @@ | |||
2305 | 92 | { | 92 | { |
2306 | 93 | if (!graphics_platform) | 93 | if (!graphics_platform) |
2307 | 94 | { | 94 | { |
2309 | 95 | graphics_platform = std::make_shared<StubGraphicPlatform>(display_rects); | 95 | graphics_platform = mtf::make_stubbed_server_graphics_platform(display_rects); |
2310 | 96 | } | 96 | } |
2311 | 97 | 97 | ||
2312 | 98 | return graphics_platform; | 98 | return graphics_platform; |
2313 | 99 | 99 | ||
2314 | === added file 'tests/mir_test_framework/symbols-server.map' | |||
2315 | --- tests/mir_test_framework/symbols-server.map 1970-01-01 00:00:00 +0000 | |||
2316 | +++ tests/mir_test_framework/symbols-server.map 2015-01-22 15:40:28 +0000 | |||
2317 | @@ -0,0 +1,8 @@ | |||
2318 | 1 | MIR_GRAPHICS_PLATFORM_1 { | ||
2319 | 2 | global: | ||
2320 | 3 | add_graphics_platform_options; | ||
2321 | 4 | create_host_platform; | ||
2322 | 5 | create_guest_platform; | ||
2323 | 6 | probe_graphics_platform; | ||
2324 | 7 | describe_graphics_module; | ||
2325 | 8 | }; | ||
2326 | 0 | 9 | ||
2327 | === modified file 'tests/mir_test_framework/testing_client_options.cpp' | |||
2328 | --- tests/mir_test_framework/testing_client_options.cpp 2015-01-19 04:52:47 +0000 | |||
2329 | +++ tests/mir_test_framework/testing_client_options.cpp 2015-01-22 15:40:28 +0000 | |||
2330 | @@ -16,63 +16,12 @@ | |||
2331 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
2332 | 17 | */ | 17 | */ |
2333 | 18 | 18 | ||
2334 | 19 | #include "mir_test_framework/testing_client_configuration.h" | ||
2335 | 20 | #include "mir_test_framework/stub_client_connection_configuration.h" | 19 | #include "mir_test_framework/stub_client_connection_configuration.h" |
2336 | 21 | #include "mir_test_doubles/stub_client_buffer_factory.h" | ||
2337 | 22 | #include "mir/options/program_option.h" | ||
2338 | 23 | #include "src/client/default_connection_configuration.h" | 20 | #include "src/client/default_connection_configuration.h" |
2344 | 24 | #include "mir/client_platform_factory.h" | 21 | #include "mir_test_framework/stub_client_platform_factory.h" |
2340 | 25 | #include "mir/client_buffer_factory.h" | ||
2341 | 26 | #include "mir/client_buffer.h" | ||
2342 | 27 | #include "mir/client_platform.h" | ||
2343 | 28 | #include "src/client/mir_connection.h" | ||
2345 | 29 | 22 | ||
2346 | 30 | namespace mcl = mir::client; | 23 | namespace mcl = mir::client; |
2392 | 31 | namespace mtf=mir_test_framework; | 24 | namespace mtf = mir_test_framework; |
2348 | 32 | namespace geom = mir::geometry; | ||
2349 | 33 | namespace mtd = mir::test::doubles; | ||
2350 | 34 | |||
2351 | 35 | namespace | ||
2352 | 36 | { | ||
2353 | 37 | struct StubClientPlatform : public mcl::ClientPlatform | ||
2354 | 38 | { | ||
2355 | 39 | MirPlatformType platform_type() const | ||
2356 | 40 | { | ||
2357 | 41 | return mir_platform_type_gbm; | ||
2358 | 42 | } | ||
2359 | 43 | |||
2360 | 44 | std::shared_ptr<mcl::ClientBufferFactory> create_buffer_factory() | ||
2361 | 45 | { | ||
2362 | 46 | return std::make_shared<mtd::StubClientBufferFactory>(); | ||
2363 | 47 | } | ||
2364 | 48 | |||
2365 | 49 | std::shared_ptr<EGLNativeWindowType> create_egl_native_window(mcl::ClientSurface*) | ||
2366 | 50 | { | ||
2367 | 51 | auto fake_window = reinterpret_cast<EGLNativeWindowType>(0x12345678lu); | ||
2368 | 52 | return std::make_shared<EGLNativeWindowType>(fake_window); | ||
2369 | 53 | } | ||
2370 | 54 | |||
2371 | 55 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() | ||
2372 | 56 | { | ||
2373 | 57 | auto fake_display = reinterpret_cast<EGLNativeDisplayType>(0x12345678lu); | ||
2374 | 58 | return std::make_shared<EGLNativeDisplayType>(fake_display); | ||
2375 | 59 | } | ||
2376 | 60 | |||
2377 | 61 | MirNativeBuffer* convert_native_buffer(mir::graphics::NativeBuffer*) const | ||
2378 | 62 | { | ||
2379 | 63 | return nullptr; | ||
2380 | 64 | } | ||
2381 | 65 | }; | ||
2382 | 66 | |||
2383 | 67 | struct StubClientPlatformFactory : public mcl::ClientPlatformFactory | ||
2384 | 68 | { | ||
2385 | 69 | std::shared_ptr<mcl::ClientPlatform> create_client_platform(mcl::ClientContext*) | ||
2386 | 70 | { | ||
2387 | 71 | return std::make_shared<StubClientPlatform>(); | ||
2388 | 72 | } | ||
2389 | 73 | }; | ||
2390 | 74 | |||
2391 | 75 | } | ||
2393 | 76 | 25 | ||
2394 | 77 | mtf::StubConnectionConfiguration::StubConnectionConfiguration(std::string const& socket_file) | 26 | mtf::StubConnectionConfiguration::StubConnectionConfiguration(std::string const& socket_file) |
2395 | 78 | : DefaultConnectionConfiguration(socket_file) | 27 | : DefaultConnectionConfiguration(socket_file) |
2396 | 79 | 28 | ||
2397 | === modified file 'tests/unit-tests/CMakeLists.txt' | |||
2398 | --- tests/unit-tests/CMakeLists.txt 2015-01-22 03:10:13 +0000 | |||
2399 | +++ tests/unit-tests/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
2400 | @@ -1,7 +1,23 @@ | |||
2401 | 1 | include(CMakeDependentOption) | 1 | include(CMakeDependentOption) |
2402 | 2 | 2 | ||
2403 | 3 | add_definitions(-DTEST_RECORDINGS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/input_recordings/") | ||
2404 | 4 | |||
2405 | 5 | if (MIR_BUILD_PLATFORM_ANDROID) | ||
2406 | 6 | add_definitions(-DMIR_BUILD_PLATFORM_ANDROID) | ||
2407 | 7 | endif() | ||
2408 | 8 | |||
2409 | 9 | if (MIR_BUILD_PLATFORM_MESA) | ||
2410 | 10 | add_definitions(-DMIR_BUILD_PLATFORM_MESA) | ||
2411 | 11 | endif() | ||
2412 | 12 | |||
2413 | 3 | include_directories( | 13 | include_directories( |
2414 | 4 | ${CMAKE_SOURCE_DIR} | 14 | ${CMAKE_SOURCE_DIR} |
2415 | 15 | |||
2416 | 16 | ${ANDROID_HEADERS_INCLUDE_DIRS} | ||
2417 | 17 | ${DRM_INCLUDE_DIRS} | ||
2418 | 18 | ${GBM_INCLUDE_DIRS} | ||
2419 | 19 | ${UMOCKDEV_INCLUDE_DIRS} | ||
2420 | 20 | |||
2421 | 5 | ${PROJECT_SOURCE_DIR}/src/include/platform | 21 | ${PROJECT_SOURCE_DIR}/src/include/platform |
2422 | 6 | ${PROJECT_SOURCE_DIR}/src/include/server | 22 | ${PROJECT_SOURCE_DIR}/src/include/server |
2423 | 7 | ${PROJECT_SOURCE_DIR}/src/include/client | 23 | ${PROJECT_SOURCE_DIR}/src/include/client |
2424 | @@ -10,12 +26,6 @@ | |||
2425 | 10 | ${GLIB_INCLUDE_DIRS} | 26 | ${GLIB_INCLUDE_DIRS} |
2426 | 11 | ) | 27 | ) |
2427 | 12 | 28 | ||
2428 | 13 | add_definitions( | ||
2429 | 14 | -DTEST_RECORDINGS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/input_recordings/" | ||
2430 | 15 | -DMIR_CLIENT_DRIVER_BINARY="${MIR_CLIENT_DRIVER_BINARY}" | ||
2431 | 16 | ) | ||
2432 | 17 | |||
2433 | 18 | include_directories(${DRM_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS} ${UMOCKDEV_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}) | ||
2434 | 19 | # TODO: Aim to remove | 29 | # TODO: Aim to remove |
2435 | 20 | include_directories(${MIR_XCURSOR_INCLUDE_DIRECTORIES}) | 30 | include_directories(${MIR_XCURSOR_INCLUDE_DIRECTORIES}) |
2436 | 21 | 31 | ||
2437 | @@ -79,9 +89,9 @@ | |||
2438 | 79 | demo-shell | 89 | demo-shell |
2439 | 80 | 90 | ||
2440 | 81 | mir-test | 91 | mir-test |
2441 | 92 | mir-test-framework | ||
2442 | 82 | mir-test-doubles | 93 | mir-test-doubles |
2443 | 83 | mir-test-doubles-platform | 94 | mir-test-doubles-platform |
2444 | 84 | mir-test-framework | ||
2445 | 85 | 95 | ||
2446 | 86 | 3rd_party | 96 | 3rd_party |
2447 | 87 | 97 | ||
2448 | @@ -91,6 +101,15 @@ | |||
2449 | 91 | ${GMOCK_MAIN_LIBRARY} | 101 | ${GMOCK_MAIN_LIBRARY} |
2450 | 92 | ${Boost_LIBRARIES} | 102 | ${Boost_LIBRARIES} |
2451 | 93 | ${UMOCKDEV_LIBRARIES} | 103 | ${UMOCKDEV_LIBRARIES} |
2452 | 104 | # Mesa platform dependencies | ||
2453 | 105 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} | ||
2454 | 106 | ${GBM_LDFLAGS} ${GBM_LIBRARIES} | ||
2455 | 107 | # Android platform dependencies | ||
2456 | 108 | ${LIBHARDWARE_LIBRARIES} | ||
2457 | 109 | ${ANDROID_PROPERTIES_LIBRARIES} | ||
2458 | 110 | # Shared platform dependencies | ||
2459 | 111 | ${EGL_LDFLAGS} ${EGL_LIBRARIES} | ||
2460 | 112 | ${GLESv2_LDFLAGS} ${GLESv2_LIBRARIES} | ||
2461 | 94 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 113 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
2462 | 95 | ${LIBHARDWARE_LDFLAGS} ${LIBHARDWARE_LIBRARIES} | 114 | ${LIBHARDWARE_LDFLAGS} ${LIBHARDWARE_LIBRARIES} |
2463 | 96 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} | 115 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} |
2464 | @@ -99,7 +118,7 @@ | |||
2465 | 99 | ${MIR_SERVER_REFERENCES} | 118 | ${MIR_SERVER_REFERENCES} |
2466 | 100 | ) | 119 | ) |
2467 | 101 | 120 | ||
2469 | 102 | if (MIR_TEST_PLATFORM STREQUAL "android") | 121 | if (MIR_BUILD_PLATFORM_ANDROID) |
2470 | 103 | target_link_libraries(mir_unit_tests | 122 | target_link_libraries(mir_unit_tests |
2471 | 104 | mirsharedandroid | 123 | mirsharedandroid |
2472 | 105 | ${ANDROID_PROPERTIES_LDFLAGS} | 124 | ${ANDROID_PROPERTIES_LDFLAGS} |
2473 | 106 | 125 | ||
2474 | === modified file 'tests/unit-tests/client/CMakeLists.txt' | |||
2475 | --- tests/unit-tests/client/CMakeLists.txt 2015-01-14 06:39:13 +0000 | |||
2476 | +++ tests/unit-tests/client/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
2477 | @@ -13,6 +13,7 @@ | |||
2478 | 13 | ${CMAKE_CURRENT_SOURCE_DIR}/test_probing_client_platform_factory.cpp | 13 | ${CMAKE_CURRENT_SOURCE_DIR}/test_probing_client_platform_factory.cpp |
2479 | 14 | ${CMAKE_CURRENT_SOURCE_DIR}/test_mir_prompt_session.cpp | 14 | ${CMAKE_CURRENT_SOURCE_DIR}/test_mir_prompt_session.cpp |
2480 | 15 | ${CMAKE_CURRENT_SOURCE_DIR}/test_event_distributor.cpp | 15 | ${CMAKE_CURRENT_SOURCE_DIR}/test_event_distributor.cpp |
2481 | 16 | ${CMAKE_CURRENT_SOURCE_DIR}/test_probing_client_platform_factory.cpp | ||
2482 | 16 | ${CMAKE_CURRENT_SOURCE_DIR}/test_periodic_perf_report.cpp | 17 | ${CMAKE_CURRENT_SOURCE_DIR}/test_periodic_perf_report.cpp |
2483 | 17 | ) | 18 | ) |
2484 | 18 | 19 | ||
2485 | 19 | 20 | ||
2486 | === modified file 'tests/unit-tests/client/test_client_platform.cpp' | |||
2487 | --- tests/unit-tests/client/test_client_platform.cpp 2015-01-19 04:52:47 +0000 | |||
2488 | +++ tests/unit-tests/client/test_client_platform.cpp 2015-01-22 15:40:28 +0000 | |||
2489 | @@ -59,7 +59,7 @@ | |||
2490 | 59 | struct ClientPlatformTest : public ::testing::TestWithParam<ClientPlatformTraits const*> | 59 | struct ClientPlatformTest : public ::testing::TestWithParam<ClientPlatformTraits const*> |
2491 | 60 | { | 60 | { |
2492 | 61 | ClientPlatformTest() | 61 | ClientPlatformTest() |
2494 | 62 | : platform_library{mtf::library_path() + "/" + GetParam()->platform_library_name}, | 62 | : platform_library{mtf::client_platform(GetParam()->platform_library_name)}, |
2495 | 63 | create_client_platform{platform_library.load_function<mcl::CreateClientPlatform>("create_client_platform")}, | 63 | create_client_platform{platform_library.load_function<mcl::CreateClientPlatform>("create_client_platform")}, |
2496 | 64 | probe{platform_library.load_function<mcl::ClientPlatformProbe>("is_appropriate_module")} | 64 | probe{platform_library.load_function<mcl::ClientPlatformProbe>("is_appropriate_module")} |
2497 | 65 | { | 65 | { |
2498 | @@ -78,7 +78,7 @@ | |||
2499 | 78 | }; | 78 | }; |
2500 | 79 | 79 | ||
2501 | 80 | #ifdef MIR_BUILD_PLATFORM_ANDROID | 80 | #ifdef MIR_BUILD_PLATFORM_ANDROID |
2503 | 81 | ClientPlatformTraits const android_platform{"/client-modules/android.so", | 81 | ClientPlatformTraits const android_platform{"android.so", |
2504 | 82 | [](MirPlatformPackage& pkg) | 82 | [](MirPlatformPackage& pkg) |
2505 | 83 | { | 83 | { |
2506 | 84 | ::memset(&pkg, 0, sizeof(pkg)); | 84 | ::memset(&pkg, 0, sizeof(pkg)); |
2507 | @@ -93,7 +93,7 @@ | |||
2508 | 93 | #endif | 93 | #endif |
2509 | 94 | 94 | ||
2510 | 95 | #ifdef MIR_BUILD_PLATFORM_MESA | 95 | #ifdef MIR_BUILD_PLATFORM_MESA |
2512 | 96 | ClientPlatformTraits const mesa_platform{"/client-modules/mesa.so", | 96 | ClientPlatformTraits const mesa_platform{"mesa.so", |
2513 | 97 | [](MirPlatformPackage& pkg) | 97 | [](MirPlatformPackage& pkg) |
2514 | 98 | { | 98 | { |
2515 | 99 | ::memset(&pkg, 0, sizeof(pkg)); | 99 | ::memset(&pkg, 0, sizeof(pkg)); |
2516 | @@ -108,7 +108,7 @@ | |||
2517 | 108 | 108 | ||
2518 | 109 | #endif | 109 | #endif |
2519 | 110 | 110 | ||
2521 | 111 | ClientPlatformTraits const dummy_platform{"/client-modules/dummy.so", | 111 | ClientPlatformTraits const dummy_platform{"dummy.so", |
2522 | 112 | [](MirPlatformPackage& pkg) | 112 | [](MirPlatformPackage& pkg) |
2523 | 113 | { | 113 | { |
2524 | 114 | mtf::create_stub_platform_package(pkg); | 114 | mtf::create_stub_platform_package(pkg); |
2525 | 115 | 115 | ||
2526 | === modified file 'tests/unit-tests/client/test_probing_client_platform_factory.cpp' | |||
2527 | --- tests/unit-tests/client/test_probing_client_platform_factory.cpp 2015-01-15 15:17:02 +0000 | |||
2528 | +++ tests/unit-tests/client/test_probing_client_platform_factory.cpp 2015-01-22 15:40:28 +0000 | |||
2529 | @@ -36,10 +36,10 @@ | |||
2530 | 36 | { | 36 | { |
2531 | 37 | std::vector<std::shared_ptr<mir::SharedLibrary>> modules; | 37 | std::vector<std::shared_ptr<mir::SharedLibrary>> modules; |
2532 | 38 | #ifdef MIR_BUILD_PLATFORM_MESA | 38 | #ifdef MIR_BUILD_PLATFORM_MESA |
2534 | 39 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::library_path() + "/client-modules/mesa.so")); | 39 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("mesa.so"))); |
2535 | 40 | #endif | 40 | #endif |
2536 | 41 | #ifdef MIR_BUILD_PLATFORM_ANDROID | 41 | #ifdef MIR_BUILD_PLATFORM_ANDROID |
2538 | 42 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::library_path() + "/client-modules/android.so")); | 42 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("android.so"))); |
2539 | 43 | #endif | 43 | #endif |
2540 | 44 | return modules; | 44 | return modules; |
2541 | 45 | } | 45 | } |
2542 | @@ -127,7 +127,7 @@ | |||
2543 | 127 | auto modules = all_available_modules(); | 127 | auto modules = all_available_modules(); |
2544 | 128 | // NOTE: For minimum fuss, load something that has minimal side-effects... | 128 | // NOTE: For minimum fuss, load something that has minimal side-effects... |
2545 | 129 | modules.push_back(std::make_shared<mir::SharedLibrary>("libc.so.6")); | 129 | modules.push_back(std::make_shared<mir::SharedLibrary>("libc.so.6")); |
2547 | 130 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::library_path() + "/client-modules/dummy.so")); | 130 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("dummy.so"))); |
2548 | 131 | 131 | ||
2549 | 132 | mir::client::ProbingClientPlatformFactory factory{modules}; | 132 | mir::client::ProbingClientPlatformFactory factory{modules}; |
2550 | 133 | 133 | ||
2551 | 134 | 134 | ||
2552 | === modified file 'tests/unit-tests/graphics/CMakeLists.txt' | |||
2553 | --- tests/unit-tests/graphics/CMakeLists.txt 2015-01-16 02:57:31 +0000 | |||
2554 | +++ tests/unit-tests/graphics/CMakeLists.txt 2015-01-22 15:40:28 +0000 | |||
2555 | @@ -10,6 +10,7 @@ | |||
2556 | 10 | ${CMAKE_CURRENT_SOURCE_DIR}/test_surfaceless_egl_context.cpp | 10 | ${CMAKE_CURRENT_SOURCE_DIR}/test_surfaceless_egl_context.cpp |
2557 | 11 | ${CMAKE_CURRENT_SOURCE_DIR}/test_overlapping_output_grouping.cpp | 11 | ${CMAKE_CURRENT_SOURCE_DIR}/test_overlapping_output_grouping.cpp |
2558 | 12 | ${CMAKE_CURRENT_SOURCE_DIR}/test_program_factory.cpp | 12 | ${CMAKE_CURRENT_SOURCE_DIR}/test_program_factory.cpp |
2559 | 13 | ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_prober.cpp | ||
2560 | 13 | ${CMAKE_CURRENT_SOURCE_DIR}/test_software_cursor.cpp | 14 | ${CMAKE_CURRENT_SOURCE_DIR}/test_software_cursor.cpp |
2561 | 14 | ) | 15 | ) |
2562 | 15 | 16 | ||
2563 | 16 | 17 | ||
2564 | === modified file 'tests/unit-tests/graphics/android/test_platform.cpp' | |||
2565 | --- tests/unit-tests/graphics/android/test_platform.cpp 2015-01-22 03:10:13 +0000 | |||
2566 | +++ tests/unit-tests/graphics/android/test_platform.cpp 2015-01-22 15:40:28 +0000 | |||
2567 | @@ -28,6 +28,8 @@ | |||
2568 | 28 | #include "mir_test_doubles/fd_matcher.h" | 28 | #include "mir_test_doubles/fd_matcher.h" |
2569 | 29 | #include "mir_test/fake_shared.h" | 29 | #include "mir_test/fake_shared.h" |
2570 | 30 | #include "mir_test_doubles/mock_android_native_buffer.h" | 30 | #include "mir_test_doubles/mock_android_native_buffer.h" |
2571 | 31 | #include "mir_test_framework/executable_path.h" | ||
2572 | 32 | #include "mir/shared_library.h" | ||
2573 | 31 | #include <system/window.h> | 33 | #include <system/window.h> |
2574 | 32 | #include <gtest/gtest.h> | 34 | #include <gtest/gtest.h> |
2575 | 33 | 35 | ||
2576 | @@ -38,6 +40,9 @@ | |||
2577 | 38 | namespace mr=mir::report; | 40 | namespace mr=mir::report; |
2578 | 39 | namespace geom=mir::geometry; | 41 | namespace geom=mir::geometry; |
2579 | 40 | namespace mo=mir::options; | 42 | namespace mo=mir::options; |
2580 | 43 | namespace mtf=mir_test_framework; | ||
2581 | 44 | |||
2582 | 45 | static const char probe_platform[] = "probe_graphics_platform"; | ||
2583 | 41 | 46 | ||
2584 | 42 | class PlatformBufferIPCPackaging : public ::testing::Test | 47 | class PlatformBufferIPCPackaging : public ::testing::Test |
2585 | 43 | { | 48 | { |
2586 | @@ -227,6 +232,27 @@ | |||
2587 | 227 | EXPECT_EQ(EGL_DEFAULT_DISPLAY, platform.egl_native_display()); | 232 | EXPECT_EQ(EGL_DEFAULT_DISPLAY, platform.egl_native_display()); |
2588 | 228 | } | 233 | } |
2589 | 229 | 234 | ||
2590 | 235 | TEST(AndroidGraphicsPlatform, probe_returns_unsupported_when_no_hwaccess) | ||
2591 | 236 | { | ||
2592 | 237 | using namespace testing; | ||
2593 | 238 | NiceMock<mtd::HardwareAccessMock> hwaccess; | ||
2594 | 239 | |||
2595 | 240 | ON_CALL(hwaccess, hw_get_module(_,_)).WillByDefault(Return(-1)); | ||
2596 | 241 | |||
2597 | 242 | mir::SharedLibrary platform_lib{mtf::server_platform("graphics-android.so")}; | ||
2598 | 243 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); | ||
2599 | 244 | EXPECT_EQ(mg::PlatformPriority::unsupported, probe()); | ||
2600 | 245 | } | ||
2601 | 246 | |||
2602 | 247 | TEST(AndroidGraphicsPlatform, probe_returns_best_when_hwaccess_succeeds) | ||
2603 | 248 | { | ||
2604 | 249 | testing::NiceMock<mtd::HardwareAccessMock> hwaccess; | ||
2605 | 250 | |||
2606 | 251 | mir::SharedLibrary platform_lib{mtf::server_platform("graphics-android.so")}; | ||
2607 | 252 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); | ||
2608 | 253 | EXPECT_EQ(mg::PlatformPriority::best, probe()); | ||
2609 | 254 | } | ||
2610 | 255 | |||
2611 | 230 | TEST(NestedPlatformCreation, doesnt_access_display_hardware) | 256 | TEST(NestedPlatformCreation, doesnt_access_display_hardware) |
2612 | 231 | { | 257 | { |
2613 | 232 | using namespace testing; | 258 | using namespace testing; |
2614 | 233 | 259 | ||
2615 | === modified file 'tests/unit-tests/graphics/mesa/test_platform.cpp' | |||
2616 | --- tests/unit-tests/graphics/mesa/test_platform.cpp 2015-01-22 03:10:13 +0000 | |||
2617 | +++ tests/unit-tests/graphics/mesa/test_platform.cpp 2015-01-22 15:40:28 +0000 | |||
2618 | @@ -23,6 +23,7 @@ | |||
2619 | 23 | #include "src/platforms/mesa/server/platform.h" | 23 | #include "src/platforms/mesa/server/platform.h" |
2620 | 24 | #include "src/server/report/null_report_factory.h" | 24 | #include "src/server/report/null_report_factory.h" |
2621 | 25 | #include "mir/emergency_cleanup_registry.h" | 25 | #include "mir/emergency_cleanup_registry.h" |
2622 | 26 | #include "mir/shared_library.h" | ||
2623 | 26 | 27 | ||
2624 | 27 | #include "mir_test_doubles/mock_buffer.h" | 28 | #include "mir_test_doubles/mock_buffer.h" |
2625 | 28 | #include "mir_test_doubles/mock_buffer_ipc_message.h" | 29 | #include "mir_test_doubles/mock_buffer_ipc_message.h" |
2626 | @@ -33,6 +34,7 @@ | |||
2627 | 33 | #include <gtest/gtest.h> | 34 | #include <gtest/gtest.h> |
2628 | 34 | 35 | ||
2629 | 35 | #include "mir_test_framework/udev_environment.h" | 36 | #include "mir_test_framework/udev_environment.h" |
2630 | 37 | #include "mir_test_framework/executable_path.h" | ||
2631 | 36 | #include "mir_test/pipe.h" | 38 | #include "mir_test/pipe.h" |
2632 | 37 | 39 | ||
2633 | 38 | #include "mir_test_doubles/mock_drm.h" | 40 | #include "mir_test_doubles/mock_drm.h" |
2634 | @@ -55,6 +57,8 @@ | |||
2635 | 55 | namespace | 57 | namespace |
2636 | 56 | { | 58 | { |
2637 | 57 | 59 | ||
2638 | 60 | const char probe_platform[] = "probe_graphics_platform"; | ||
2639 | 61 | |||
2640 | 58 | class MesaGraphicsPlatform : public ::testing::Test | 62 | class MesaGraphicsPlatform : public ::testing::Test |
2641 | 59 | { | 63 | { |
2642 | 60 | public: | 64 | public: |
2643 | @@ -338,3 +342,23 @@ | |||
2644 | 338 | 342 | ||
2645 | 339 | Mock::VerifyAndClearExpectations(&mock_drm); | 343 | Mock::VerifyAndClearExpectations(&mock_drm); |
2646 | 340 | } | 344 | } |
2647 | 345 | |||
2648 | 346 | TEST_F(MesaGraphicsPlatform, probe_returns_unsupported_when_no_drm_udev_devices) | ||
2649 | 347 | { | ||
2650 | 348 | mtf::UdevEnvironment udev_environment; | ||
2651 | 349 | |||
2652 | 350 | mir::SharedLibrary platform_lib{mtf::server_platform("graphics-mesa.so")}; | ||
2653 | 351 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); | ||
2654 | 352 | EXPECT_EQ(mg::PlatformPriority::unsupported, probe()); | ||
2655 | 353 | } | ||
2656 | 354 | |||
2657 | 355 | TEST_F(MesaGraphicsPlatform, probe_returns_best_when_drm_devices_exist) | ||
2658 | 356 | { | ||
2659 | 357 | mtf::UdevEnvironment udev_environment; | ||
2660 | 358 | |||
2661 | 359 | udev_environment.add_standard_device("standard-drm-devices"); | ||
2662 | 360 | |||
2663 | 361 | mir::SharedLibrary platform_lib{mtf::server_platform("graphics-mesa.so")}; | ||
2664 | 362 | auto probe = platform_lib.load_function<mg::PlatformProbe>(probe_platform); | ||
2665 | 363 | EXPECT_EQ(mg::PlatformPriority::best, probe()); | ||
2666 | 364 | } | ||
2667 | 341 | 365 | ||
2668 | === added file 'tests/unit-tests/graphics/test_platform_prober.cpp' | |||
2669 | --- tests/unit-tests/graphics/test_platform_prober.cpp 1970-01-01 00:00:00 +0000 | |||
2670 | +++ tests/unit-tests/graphics/test_platform_prober.cpp 2015-01-22 15:40:28 +0000 | |||
2671 | @@ -0,0 +1,215 @@ | |||
2672 | 1 | /* | ||
2673 | 2 | * Copyright © 2014 Canonical Ltd. | ||
2674 | 3 | * | ||
2675 | 4 | * This program is free software: you can redistribute it and/or modify | ||
2676 | 5 | * it under the terms of the GNU General Public License version 3 as | ||
2677 | 6 | * published by the Free Software Foundation. | ||
2678 | 7 | * | ||
2679 | 8 | * This program is distributed in the hope that it will be useful, | ||
2680 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2681 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2682 | 11 | * GNU General Public License for more details. | ||
2683 | 12 | * | ||
2684 | 13 | * You should have received a copy of the GNU General Public License | ||
2685 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2686 | 15 | * | ||
2687 | 16 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | ||
2688 | 17 | */ | ||
2689 | 18 | |||
2690 | 19 | #include <gtest/gtest.h> | ||
2691 | 20 | |||
2692 | 21 | #include "mir/graphics/platform.h" | ||
2693 | 22 | #include "mir/graphics/platform_probe.h" | ||
2694 | 23 | |||
2695 | 24 | #include "mir/raii.h" | ||
2696 | 25 | |||
2697 | 26 | #ifdef MIR_BUILD_PLATFORM_MESA | ||
2698 | 27 | #include "mir_test_doubles/mock_drm.h" | ||
2699 | 28 | #include "mir_test_doubles/mock_gbm.h" | ||
2700 | 29 | #endif | ||
2701 | 30 | |||
2702 | 31 | #ifdef MIR_BUILD_PLATFORM_ANDROID | ||
2703 | 32 | #include "mir_test_doubles/mock_android_hw.h" | ||
2704 | 33 | #endif | ||
2705 | 34 | |||
2706 | 35 | #include "mir_test_framework/udev_environment.h" | ||
2707 | 36 | #include "mir_test_framework/executable_path.h" | ||
2708 | 37 | |||
2709 | 38 | namespace mtf = mir_test_framework; | ||
2710 | 39 | namespace mtd = mir::test::doubles; | ||
2711 | 40 | |||
2712 | 41 | namespace | ||
2713 | 42 | { | ||
2714 | 43 | const char describe_module[] = "describe_graphics_module"; | ||
2715 | 44 | |||
2716 | 45 | std::vector<std::shared_ptr<mir::SharedLibrary>> available_platforms() | ||
2717 | 46 | { | ||
2718 | 47 | std::vector<std::shared_ptr<mir::SharedLibrary>> modules; | ||
2719 | 48 | |||
2720 | 49 | #ifdef MIR_BUILD_PLATFORM_MESA | ||
2721 | 50 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::server_platform("graphics-mesa.so"))); | ||
2722 | 51 | #endif | ||
2723 | 52 | #ifdef MIR_BUILD_PLATFORM_ANDROID | ||
2724 | 53 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::server_platform("graphics-android.so"))); | ||
2725 | 54 | #endif | ||
2726 | 55 | return modules; | ||
2727 | 56 | } | ||
2728 | 57 | |||
2729 | 58 | void add_dummy_platform(std::vector<std::shared_ptr<mir::SharedLibrary>>& modules) | ||
2730 | 59 | { | ||
2731 | 60 | modules.insert(modules.begin(), std::make_shared<mir::SharedLibrary>(mtf::server_platform("graphics-dummy.so"))); | ||
2732 | 61 | } | ||
2733 | 62 | |||
2734 | 63 | std::shared_ptr<void> ensure_android_probing_fails() | ||
2735 | 64 | { | ||
2736 | 65 | #ifdef MIR_BUILD_PLATFORM_ANDROID | ||
2737 | 66 | using namespace testing; | ||
2738 | 67 | auto mock_android = std::make_shared<NiceMock<mtd::HardwareAccessMock>>(); | ||
2739 | 68 | ON_CALL(*mock_android, hw_get_module(_, _)) | ||
2740 | 69 | .WillByDefault(Return(-1)); | ||
2741 | 70 | return mock_android; | ||
2742 | 71 | #else | ||
2743 | 72 | return std::shared_ptr<void>{}; | ||
2744 | 73 | #endif | ||
2745 | 74 | } | ||
2746 | 75 | |||
2747 | 76 | std::shared_ptr<void> ensure_mesa_probing_fails() | ||
2748 | 77 | { | ||
2749 | 78 | return std::make_shared<mtf::UdevEnvironment>(); | ||
2750 | 79 | } | ||
2751 | 80 | |||
2752 | 81 | std::shared_ptr<void> ensure_mesa_probing_succeeds() | ||
2753 | 82 | { | ||
2754 | 83 | auto udev = std::make_shared<mtf::UdevEnvironment>(); | ||
2755 | 84 | |||
2756 | 85 | udev->add_standard_device("standard-drm-devices"); | ||
2757 | 86 | |||
2758 | 87 | return udev; | ||
2759 | 88 | } | ||
2760 | 89 | |||
2761 | 90 | std::shared_ptr<void> ensure_android_probing_succeeds() | ||
2762 | 91 | { | ||
2763 | 92 | #ifdef MIR_BUILD_PLATFORM_ANDROID | ||
2764 | 93 | using namespace testing; | ||
2765 | 94 | auto mock_android = std::make_shared<NiceMock<mtd::HardwareAccessMock>>(); | ||
2766 | 95 | ON_CALL(*mock_android, hw_get_module(_, _)) | ||
2767 | 96 | .WillByDefault(Return(0)); | ||
2768 | 97 | return mock_android; | ||
2769 | 98 | #else | ||
2770 | 99 | return std::shared_ptr<void>{}; | ||
2771 | 100 | #endif | ||
2772 | 101 | } | ||
2773 | 102 | } | ||
2774 | 103 | |||
2775 | 104 | TEST(ServerPlatformProbe, ConstructingWithNoModulesIsAnError) | ||
2776 | 105 | { | ||
2777 | 106 | std::vector<std::shared_ptr<mir::SharedLibrary>> empty_modules; | ||
2778 | 107 | EXPECT_THROW(mir::graphics::module_for_device(empty_modules), | ||
2779 | 108 | std::runtime_error); | ||
2780 | 109 | } | ||
2781 | 110 | |||
2782 | 111 | #ifdef MIR_BUILD_PLATFORM_MESA | ||
2783 | 112 | TEST(ServerPlatformProbe, LoadsMesaPlatformWhenDrmDevicePresent) | ||
2784 | 113 | { | ||
2785 | 114 | using namespace testing; | ||
2786 | 115 | auto block_android = ensure_android_probing_fails(); | ||
2787 | 116 | auto fake_mesa = ensure_mesa_probing_succeeds(); | ||
2788 | 117 | |||
2789 | 118 | auto modules = available_platforms(); | ||
2790 | 119 | |||
2791 | 120 | auto module = mir::graphics::module_for_device(modules); | ||
2792 | 121 | ASSERT_NE(nullptr, module); | ||
2793 | 122 | |||
2794 | 123 | auto descriptor = module->load_function<mir::graphics::DescribeModule>(describe_module); | ||
2795 | 124 | auto description = descriptor(); | ||
2796 | 125 | |||
2797 | 126 | EXPECT_THAT(description->name, HasSubstr("mesa")); | ||
2798 | 127 | } | ||
2799 | 128 | #endif | ||
2800 | 129 | |||
2801 | 130 | #ifdef MIR_BUILD_PLATFORM_ANDROID | ||
2802 | 131 | TEST(ServerPlatformProbe, LoadsAndroidPlatformWhenHwaccessSucceeds) | ||
2803 | 132 | { | ||
2804 | 133 | using namespace testing; | ||
2805 | 134 | |||
2806 | 135 | auto block_mesa = ensure_mesa_probing_fails(); | ||
2807 | 136 | auto fake_android = ensure_android_probing_succeeds(); | ||
2808 | 137 | |||
2809 | 138 | auto modules = available_platforms(); | ||
2810 | 139 | |||
2811 | 140 | auto module = mir::graphics::module_for_device(modules); | ||
2812 | 141 | ASSERT_NE(nullptr, module); | ||
2813 | 142 | |||
2814 | 143 | auto descriptor = module->load_function<mir::graphics::DescribeModule>(describe_module); | ||
2815 | 144 | auto description = descriptor(); | ||
2816 | 145 | |||
2817 | 146 | EXPECT_THAT(description->name, HasSubstr("android")); | ||
2818 | 147 | } | ||
2819 | 148 | #endif | ||
2820 | 149 | |||
2821 | 150 | TEST(ServerPlatformProbe, ThrowsExceptionWhenNothingProbesSuccessfully) | ||
2822 | 151 | { | ||
2823 | 152 | using namespace testing; | ||
2824 | 153 | auto block_android = ensure_android_probing_fails(); | ||
2825 | 154 | auto block_mesa = ensure_mesa_probing_fails(); | ||
2826 | 155 | |||
2827 | 156 | |||
2828 | 157 | EXPECT_THROW(mir::graphics::module_for_device(available_platforms()), | ||
2829 | 158 | std::runtime_error); | ||
2830 | 159 | } | ||
2831 | 160 | |||
2832 | 161 | TEST(ServerPlatformProbe, LoadsSupportedModuleWhenNoBestModule) | ||
2833 | 162 | { | ||
2834 | 163 | using namespace testing; | ||
2835 | 164 | auto block_android = ensure_android_probing_fails(); | ||
2836 | 165 | auto block_mesa = ensure_mesa_probing_fails(); | ||
2837 | 166 | |||
2838 | 167 | auto modules = available_platforms(); | ||
2839 | 168 | add_dummy_platform(modules); | ||
2840 | 169 | |||
2841 | 170 | auto module = mir::graphics::module_for_device(modules); | ||
2842 | 171 | ASSERT_NE(nullptr, module); | ||
2843 | 172 | |||
2844 | 173 | auto descriptor = module->load_function<mir::graphics::DescribeModule>(describe_module); | ||
2845 | 174 | auto description = descriptor(); | ||
2846 | 175 | |||
2847 | 176 | EXPECT_THAT(description->name, HasSubstr("dummy")); | ||
2848 | 177 | } | ||
2849 | 178 | |||
2850 | 179 | TEST(ServerPlatformProbe, LoadsMesaOrAndroidInPreferenceToDummy) | ||
2851 | 180 | { | ||
2852 | 181 | using namespace testing; | ||
2853 | 182 | |||
2854 | 183 | auto ensure_mesa = ensure_mesa_probing_succeeds(); | ||
2855 | 184 | auto ensure_android = ensure_android_probing_succeeds(); | ||
2856 | 185 | |||
2857 | 186 | auto modules = available_platforms(); | ||
2858 | 187 | add_dummy_platform(modules); | ||
2859 | 188 | |||
2860 | 189 | auto module = mir::graphics::module_for_device(modules); | ||
2861 | 190 | ASSERT_NE(nullptr, module); | ||
2862 | 191 | |||
2863 | 192 | auto descriptor = module->load_function<mir::graphics::DescribeModule>(describe_module); | ||
2864 | 193 | auto description = descriptor(); | ||
2865 | 194 | |||
2866 | 195 | EXPECT_THAT(description->name, Not(HasSubstr("dummy"))); | ||
2867 | 196 | } | ||
2868 | 197 | |||
2869 | 198 | TEST(ServerPlatformProbe, IgnoresNonPlatformModules) | ||
2870 | 199 | { | ||
2871 | 200 | using namespace testing; | ||
2872 | 201 | |||
2873 | 202 | auto ensure_mesa = ensure_mesa_probing_succeeds(); | ||
2874 | 203 | auto ensure_android = ensure_android_probing_succeeds(); | ||
2875 | 204 | |||
2876 | 205 | auto modules = available_platforms(); | ||
2877 | 206 | add_dummy_platform(modules); | ||
2878 | 207 | |||
2879 | 208 | // NOTE: We want to load something that doesn't link with libmirplatform, | ||
2880 | 209 | // due to protobuf throwing a screaming hissy fit if it gets loaded twice. | ||
2881 | 210 | modules.push_back(std::make_shared<mir::SharedLibrary>(mtf::client_platform("dummy.so"))); | ||
2882 | 211 | |||
2883 | 212 | |||
2884 | 213 | auto module = mir::graphics::module_for_device(modules); | ||
2885 | 214 | EXPECT_NE(nullptr, module); | ||
2886 | 215 | } | ||
2887 | 0 | 216 | ||
2888 | === modified file 'tests/unit-tests/shared_library_test.cpp' | |||
2889 | --- tests/unit-tests/shared_library_test.cpp 2015-01-14 06:39:13 +0000 | |||
2890 | +++ tests/unit-tests/shared_library_test.cpp 2015-01-22 15:40:28 +0000 | |||
2891 | @@ -59,7 +59,7 @@ | |||
2892 | 59 | public: | 59 | public: |
2893 | 60 | SharedLibrary() | 60 | SharedLibrary() |
2894 | 61 | : nonexistent_library{"imma_totally_not_a_library"}, | 61 | : nonexistent_library{"imma_totally_not_a_library"}, |
2896 | 62 | existing_library{mtf::library_path() + "/client-modules/mesa.so"}, | 62 | existing_library{mtf::client_platform("mesa.so")}, |
2897 | 63 | nonexistent_function{"yo_dawg"}, | 63 | nonexistent_function{"yo_dawg"}, |
2898 | 64 | existing_function{"create_client_platform"}, | 64 | existing_function{"create_client_platform"}, |
2899 | 65 | existent_version{"MIR_CLIENT_PLATFORM_2"}, | 65 | existent_version{"MIR_CLIENT_PLATFORM_2"}, |
2900 | 66 | 66 | ||
2901 | === modified file 'tools/install_on_android.sh' | |||
2902 | --- tools/install_on_android.sh 2015-01-14 06:39:13 +0000 | |||
2903 | +++ tools/install_on_android.sh 2015-01-22 15:40:28 +0000 | |||
2904 | @@ -32,11 +32,11 @@ | |||
2905 | 32 | lib/libmirclient.so.* \ | 32 | lib/libmirclient.so.* \ |
2906 | 33 | lib/libmircommon.so.* \ | 33 | lib/libmircommon.so.* \ |
2907 | 34 | lib/libmirplatform.so.* \ | 34 | lib/libmirplatform.so.* \ |
2910 | 35 | lib/libmirplatform*driver.so \ | 35 | lib/platform-graphics-dummy.so \ |
2911 | 36 | lib/libmirclient*driver.so \ | 36 | lib/client-modules/* \ |
2912 | 37 | lib/server-modules/* \ | ||
2913 | 37 | lib/libmirprotobuf.so.* \ | 38 | lib/libmirprotobuf.so.* \ |
2914 | 38 | lib/libmirclient-debug-extension.so.* \ | 39 | lib/libmirclient-debug-extension.so.* \ |
2915 | 39 | lib/libmirplatformstub.so \ | ||
2916 | 40 | lib/libmirserver.so.* | 40 | lib/libmirserver.so.* |
2917 | 41 | do | 41 | do |
2918 | 42 | adb push $x ${RUN_DIR} | 42 | adb push $x ${RUN_DIR} |
2919 | 43 | 43 | ||
2920 | === modified file 'tools/valgrind_suppressions_armhf' | |||
2921 | --- tools/valgrind_suppressions_armhf 2015-01-14 06:39:13 +0000 | |||
2922 | +++ tools/valgrind_suppressions_armhf 2015-01-22 15:40:28 +0000 | |||
2923 | @@ -127,6 +127,15 @@ | |||
2924 | 127 | # memory errors. | 127 | # memory errors. |
2925 | 128 | 128 | ||
2926 | 129 | { | 129 | { |
2927 | 130 | spurious_strlen_addr4 | ||
2928 | 131 | Memcheck:Addr4 | ||
2929 | 132 | ... | ||
2930 | 133 | fun:dlsym | ||
2931 | 134 | ... | ||
2932 | 135 | fun:_ZN50SharedLibrary_load_nonexistent_function_fails_Test8TestBodyEv | ||
2933 | 136 | } | ||
2934 | 137 | |||
2935 | 138 | { | ||
2936 | 130 | mir_sharedlibrary_cond | 139 | mir_sharedlibrary_cond |
2937 | 131 | Memcheck:Cond | 140 | Memcheck:Cond |
2938 | 132 | fun:_ZN3mir13SharedLibraryC1EPKc | 141 | fun:_ZN3mir13SharedLibraryC1EPKc |
FAILED: Continuous integration, rev:2122 jenkins. qa.ubuntu. com/job/ mir-ci/ 2295/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/391/ console jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/391/ console jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/365/ console jenkins. qa.ubuntu. com/job/ mir-vivid- amd64-ci/ 286/console jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 365/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/2295/ rebuild
http://