Nested platform is not testable
Bug #1299101 reported by
Alexandros Frantzis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Alexandros Frantzis | ||
mir (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
The nested platform is not testable at the moment, since it interacts directly with the client library and we have no way to fake these interactions. Some approaches we can consider:
* abstract interaction in the nested platform with the client by using an interface
* provide a mechanism to override client library functions inside mirclient
* link-time seam for mirclient like we have for GL, EGL etc
Related branches
lp://staging/~afrantzis/mir/abstract-host-connection
- Robert Carr (community): Approve
- Alan Griffiths: Approve
- Kevin DuBois (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 923 lines (+331/-245)15 files modifiedsrc/server/graphics/default_configuration.cpp (+2/-2)
src/server/graphics/nested/CMakeLists.txt (+1/-1)
src/server/graphics/nested/host_connection.cpp (+0/-32)
src/server/graphics/nested/host_connection.h (+38/-12)
src/server/graphics/nested/mir_api_wrappers.h (+0/-66)
src/server/graphics/nested/mir_client_host_connection.cpp (+169/-0)
src/server/graphics/nested/mir_client_host_connection.h (+60/-0)
src/server/graphics/nested/nested_display.cpp (+8/-37)
src/server/graphics/nested/nested_display.h (+1/-2)
src/server/graphics/nested/nested_display_configuration.cpp (+9/-10)
src/server/graphics/nested/nested_display_configuration.h (+7/-5)
src/server/graphics/nested/nested_output.cpp (+5/-16)
src/server/graphics/nested/nested_output.h (+4/-19)
src/server/graphics/nested/nested_platform.cpp (+4/-38)
tests/unit-tests/graphics/nested/test_nested_display_configuration.cpp (+23/-5)
Changed in mir: | |
assignee: | nobody → Alexandros Frantzis (afrantzis) |
Changed in mir: | |
milestone: | none → 0.1.9 |
status: | New → In Progress |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Changed in mir (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
To post a comment you must log in.
Remember to not get caught assuming all tests must fit into the Google Test concept of a test. CMake only requires that a "test" be a command which can run and return success/failure. So it is relatively easy to script nested servers for that.
The difficulty then is to do so in a way that the outer server does not touch the graphics hardware. We need a stub graphics platform and/or one that can feed back into Google Test for convenience. But remember Google Test is just one option.