Mir

Merge lp:~alan-griffiths/mir/miromnibus into lp:mir

Proposed by Alan Griffiths
Status: Work in progress
Proposed branch: lp:~alan-griffiths/mir/miromnibus
Merge into: lp:mir
Prerequisite: lp:~alan-griffiths/mir/integration-and-unit-tests-link-against-internals
Diff against target: 201 lines (+59/-52)
6 files modified
debian/mir-test-tools.install (+2/-0)
src/CMakeLists.txt (+1/-0)
src/server/CMakeLists.txt (+2/-0)
tests/CMakeLists.txt (+42/-0)
tests/integration-tests/CMakeLists.txt (+6/-25)
tests/unit-tests/CMakeLists.txt (+6/-27)
To merge this branch: bzr merge lp:~alan-griffiths/mir/miromnibus
Reviewer Review Type Date Requested Status
Robert Carr (community) Abstain
PS Jenkins bot (community) continuous-integration Needs Fixing
Kevin DuBois (community) Needs Fixing
Alexandros Frantzis (community) Needs Fixing
Daniel van Vugt Needs Fixing
Review via email: mp+232264@code.launchpad.net

Commit message

Added a "mir-all-bare" shared library so that unit_tests and integration_tests do not need to duplicate all the Mir code.

Description of the change

Added a "mir-all-bare" shared library so that unit_tests and integration_tests do not need to duplicate all the Mir code in the executables.

To post a comment you must log in.
lp:~alan-griffiths/mir/miromnibus updated
1868. By Alan Griffiths

A bit less duplication

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~alan-griffiths/mir/miromnibus updated
1869. By Alan Griffiths

Install libmiromnibus.so in mir/tools

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~alan-griffiths/mir/miromnibus updated
1870. By Alan Griffiths

install(TARGETS miromnibus was inside wrong condition

1871. By Alan Griffiths

merge lp:~mir-team/mir/development-branch

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

> bzr: ERROR: Invalid http response for http://bazaar.launchpad.net/~mir-team/mir/development-branch/.bzr/branch-format: Unable to handle http code 502: Bad Gateway

Triggering rebuild

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~alan-griffiths/mir/miromnibus updated
1872. By Alan Griffiths

Take the version of libmiromnibus.so from libmirserver.so

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

> dh_install: usr/lib/arm-linux-gnueabihf/libmiromnibus.so exists in debian/tmp but is not installed to anywhere

Rats!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like a good idea, but a more meaningful library name than "libmiromnibus" should be used. Something like "libmirtesting" etc.

review: Needs Fixing
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> Sounds like a good idea, but a more meaningful library name than "libmiromnibus" should be used.
> Something like "libmirtesting" etc.

+1

review: Needs Fixing
Revision history for this message
Kevin DuBois (kdub) wrote :

abstain on the naming, mostly because I'd expect libmirtesting to be new test oriented code, not just the mirserver code with all the symbols exposed.

needs fixing because jenkins doesn't like the installation step.

review: Needs Fixing
lp:~alan-griffiths/mir/miromnibus updated
1873. By Alan Griffiths

merge lp:~mir-team/mir/development-branch

1874. By Alan Griffiths

Keep packaging happy

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

> abstain on the naming, mostly because I'd expect libmirtesting to be new test
> oriented code, not just the mirserver code with all the symbols exposed.

+1

> needs fixing because jenkins doesn't like the installation step.

Fixed

lp:~alan-griffiths/mir/miromnibus updated
1875. By Alan Griffiths

merge lp:~mir-team/mir/development-branch

1876. By Alan Griffiths

s/miromnibus/mir-all-bare/

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

It took me a short while to figure out the meaning of the new name too :)

I think we could still do better in naming. And syntactically we should avoid "-" in the library name for consistency.

Revision history for this message
Robert Carr (robertcarr) wrote :

It also took me a short while to figure out the meaning of the new name (though...I guess I will say less than 90 seconds lol)

I would call it libmirallsymbolsexported

review: Abstain

Unmerged revisions

1876. By Alan Griffiths

s/miromnibus/mir-all-bare/

1875. By Alan Griffiths

merge lp:~mir-team/mir/development-branch

1874. By Alan Griffiths

Keep packaging happy

1873. By Alan Griffiths

merge lp:~mir-team/mir/development-branch

1872. By Alan Griffiths

Take the version of libmiromnibus.so from libmirserver.so

1871. By Alan Griffiths

merge lp:~mir-team/mir/development-branch

1870. By Alan Griffiths

install(TARGETS miromnibus was inside wrong condition

1869. By Alan Griffiths

Install libmiromnibus.so in mir/tools

1868. By Alan Griffiths

A bit less duplication

1867. By Alan Griffiths

Use libmiromnibus for unit-tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/mir-test-tools.install'
2--- debian/mir-test-tools.install 2014-08-06 03:10:56 +0000
3+++ debian/mir-test-tools.install 2014-08-29 16:22:45 +0000
4@@ -5,3 +5,5 @@
5 usr/bin/mir_performance_tests
6 usr/lib/*/mir/tools/libmirclientlttng.so
7 usr/lib/*/mir/tools/libmirserverlttng.so
8+usr/lib/*/libmir-all-bare.so.25
9+usr/lib/*/libmir-all-bare.so
10
11=== modified file 'src/CMakeLists.txt'
12--- src/CMakeLists.txt 2014-08-29 11:16:38 +0000
13+++ src/CMakeLists.txt 2014-08-29 16:22:45 +0000
14@@ -18,3 +18,4 @@
15 set(MIR_PLATFORM_REFERENCES ${MIR_PLATFORM_REFERENCES} PARENT_SCOPE)
16 set(MIR_COMMON_OBJECTS ${MIR_COMMON_OBJECTS} PARENT_SCOPE)
17 set(MIR_COMMON_REFERENCES ${MIR_COMMON_REFERENCES} PARENT_SCOPE)
18+set(MIRSERVER_ABI ${MIRSERVER_ABI} PARENT_SCOPE)
19\ No newline at end of file
20
21=== modified file 'src/server/CMakeLists.txt'
22--- src/server/CMakeLists.txt 2014-08-29 12:51:40 +0000
23+++ src/server/CMakeLists.txt 2014-08-29 16:22:45 +0000
24@@ -101,3 +101,5 @@
25 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mirserver.pc
26 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
27 )
28+
29+set(MIRSERVER_ABI ${MIRSERVER_ABI} PARENT_SCOPE)
30\ No newline at end of file
31
32=== modified file 'tests/CMakeLists.txt'
33--- tests/CMakeLists.txt 2014-08-06 03:10:56 +0000
34+++ tests/CMakeLists.txt 2014-08-29 16:22:45 +0000
35@@ -29,6 +29,48 @@
36 option(MIR_BUILD_PERFORMANCE_TESTS "Build performance tests" ON)
37 option(MIR_BUILD_UNIT_TESTS "Build unit tests" ON)
38
39+if (MIR_BUILD_INTEGRATION_TESTS OR MIR_BUILD_UNIT_TESTS)
40+ add_library(mir-all-bare SHARED
41+ ${MIR_SERVER_OBJECTS}
42+ $<TARGET_OBJECTS:mirclientobjects>
43+ ${MIR_PLATFORM_OBJECTS}
44+ ${MIR_COMMON_OBJECTS}
45+ )
46+
47+ target_link_libraries(mir-all-bare
48+ 3rd_party
49+ mirdraw
50+ mirtestdraw
51+ mirclientrpc
52+ mirclientlttngstatic
53+
54+ ${PROTOBUF_LIBRARIES}
55+ ${Boost_LIBRARIES}
56+ ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
57+ ${DRM_LDFLAGS}
58+ ${GBM_LDFLAGS}
59+ ${MIR_PLATFORM_REFERENCES}
60+ ${MIR_COMMON_REFERENCES}
61+ ${MIR_SERVER_REFERENCES}
62+ )
63+
64+ if (MIR_TEST_PLATFORM STREQUAL "android")
65+ target_link_libraries(mir-all-bare
66+ mirsharedandroid
67+ ${ANDROID_PROPERTIES_LDFLAGS}
68+ )
69+ endif()
70+
71+ set_target_properties(mir-all-bare
72+ PROPERTIES
73+ SOVERSION ${MIRSERVER_ABI}
74+ )
75+
76+ install(TARGETS mir-all-bare
77+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
78+ )
79+endif()
80+
81 if (MIR_BUILD_ACCEPTANCE_TESTS)
82 add_subdirectory(acceptance-tests/)
83 endif (MIR_BUILD_ACCEPTANCE_TESTS)
84
85=== modified file 'tests/integration-tests/CMakeLists.txt'
86--- tests/integration-tests/CMakeLists.txt 2014-08-29 12:51:40 +0000
87+++ tests/integration-tests/CMakeLists.txt 2014-08-29 16:22:45 +0000
88@@ -41,13 +41,10 @@
89 endif()
90
91 link_directories(${LIBRARY_OUTPUT_PATH})
92+
93 add_executable(
94 mir_integration_tests
95 ${INTEGRATION_TESTS_SRCS}
96- ${MIR_SERVER_OBJECTS}
97- $<TARGET_OBJECTS:mirclientobjects>
98- ${MIR_PLATFORM_OBJECTS}
99- ${MIR_COMMON_OBJECTS}
100 )
101
102 add_dependencies(mir_integration_tests GMock)
103@@ -61,32 +58,16 @@
104 mir-test-framework
105 mir-test-doubles
106
107- mirdraw
108- mirtestdraw
109- mirclientrpc
110- mirclientlttngstatic
111-
112- 3rd_party
113-
114- ${PROTOBUF_LIBRARIES}
115+ mir-all-bare
116+
117 ${Boost_LIBRARIES}
118 ${GTEST_BOTH_LIBRARIES}
119 ${GMOCK_LIBRARY}
120 ${GMOCK_MAIN_LIBRARY}
121 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
122- ${DRM_LDFLAGS} ${DRM_LIBRARIES}
123- ${GBM_LDFLAGS} ${GBM_LIBRARIES}
124- ${MIR_PLATFORM_REFERENCES}
125- ${MIR_COMMON_REFERENCES}
126- ${MIR_SERVER_REFERENCES}
127-)
128-
129-if (MIR_TEST_PLATFORM STREQUAL "android")
130-target_link_libraries(mir_integration_tests
131- mirsharedandroid
132- ${ANDROID_PROPERTIES_LDFLAGS}
133-)
134-endif()
135+ ${DRM_LDFLAGS}
136+ ${GBM_LDFLAGS}
137+)
138
139 CMAKE_DEPENDENT_OPTION(
140 MIR_RUN_INTEGRATION_TESTS
141
142=== modified file 'tests/unit-tests/CMakeLists.txt'
143--- tests/unit-tests/CMakeLists.txt 2014-08-29 12:51:40 +0000
144+++ tests/unit-tests/CMakeLists.txt 2014-08-29 16:22:45 +0000
145@@ -41,10 +41,6 @@
146
147 add_executable(mir_unit_tests
148 ${UNIT_TEST_SOURCES}
149- ${MIR_SERVER_OBJECTS}
150- $<TARGET_OBJECTS:mirclientobjects>
151- ${MIR_PLATFORM_OBJECTS}
152- ${MIR_COMMON_OBJECTS}
153 )
154
155 add_dependencies(mir_unit_tests GMock)
156@@ -54,39 +50,22 @@
157 target_link_libraries(
158 mir_unit_tests
159
160- mirdraw
161- mirtestdraw
162- mirclientrpc
163- mirclientlttngstatic
164- demo-shell
165-
166 mir-test
167 mir-test-doubles
168 mir-test-doubles-platform
169 mir-test-framework
170
171- 3rd_party
172+ demo-shell
173+ mir-all-bare
174
175- ${PROTOBUF_LIBRARIES}
176+ ${Boost_LIBRARIES}
177 ${GTEST_BOTH_LIBRARIES}
178 ${GMOCK_LIBRARY}
179 ${GMOCK_MAIN_LIBRARY}
180- ${Boost_LIBRARIES}
181- ${UMOCKDEV_LIBRARIES}
182 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
183- ${LIBHARDWARE_LDFLAGS} ${LIBHARDWARE_LIBRARIES}
184- ${DRM_LDFLAGS} ${DRM_LIBRARIES}
185- ${MIR_PLATFORM_REFERENCES}
186- ${MIR_COMMON_REFERENCES}
187- ${MIR_SERVER_REFERENCES}
188-)
189-
190-if (MIR_TEST_PLATFORM STREQUAL "android")
191-target_link_libraries(mir_unit_tests
192- mirsharedandroid
193- ${ANDROID_PROPERTIES_LDFLAGS}
194-)
195-endif()
196+ ${DRM_LDFLAGS}
197+ ${GBM_LDFLAGS}
198+)
199
200 # Umockdev uses glib, which uses the deprecated "register" allocation specifier
201 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dregister=")

Subscribers

People subscribed via source and target branches