Mir

Merge lp:~adconrad/mir/powerpc-porting into lp:mir

Proposed by Adam Conrad on 2015-06-04
Status: Merged
Approved by: Chris Halse Rogers on 2015-06-04
Approved revision: 2619
Merged at revision: 2619
Proposed branch: lp:~adconrad/mir/powerpc-porting
Merge into: lp:mir
Diff against target: 304 lines (+47/-33)
5 files modified
debian/control (+20/-19)
debian/create_postinst_prerm_scripts.sh (+4/-4)
debian/install_ld_so_conf.sh (+4/-4)
debian/rules (+10/-5)
tests/unit-tests/test_shared_library_prober.cpp (+9/-1)
To merge this branch: bzr merge lp:~adconrad/mir/powerpc-porting
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-06-04
Chris Halse Rogers 2015-06-04 Approve on 2015-06-04
Review via email: mp+261055@code.launchpad.net

Commit Message

Enable building on linux-any, invert x86/armhf tests to make them the exceptions, not the rules, and add ppc/ppc64el test data blobs.

Description of the Change

Should be self-explanatory, ish. This contains the porting (and two binary blobs) required to build on powerpc and ppc64el, and to pass the testsuite on ppc64el.

The testsuite on powerpc still fails, due to some needed big-endian porting work, but it seems like the lesser of two evils right now to have the package buildable but somewhat broken, rather than keep dealing with the fallout of only having mir on some arches.

To post a comment you must log in.
Chris Halse Rogers (raof) wrote :

LGTM. Thanks!

review: Approve
lp:~adconrad/mir/powerpc-porting updated on 2015-06-04
2619. By Adam Conrad on 2015-06-04

Invert arch tests to make x86/armhf the exceptions, not the rule, and enable on all linux-any.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-06-02 15:07:18 +0000
3+++ debian/control 2015-06-04 02:27:25 +0000
4@@ -34,7 +34,8 @@
5 libudev-dev,
6 libgtest-dev,
7 google-mock (>= 1.6.0+svn437),
8- valgrind [!arm64],
9+# only enable valgrind once it's been tested to work on each architecture:
10+ valgrind [amd64 i386 armhf],
11 libglib2.0-dev,
12 libfreetype6-dev,
13 abi-compliance-checker,
14@@ -47,7 +48,7 @@
15
16 Package: libmirprotobuf0
17 Section: libs
18-Architecture: i386 amd64 armhf arm64
19+Architecture: linux-any
20 Multi-Arch: same
21 Pre-Depends: ${misc:Pre-Depends}
22 Depends: ${misc:Depends},
23@@ -63,7 +64,7 @@
24 # ala pkg-xorg's xviddriver:Provides and ABI detection.
25 Package: libmirserver32
26 Section: libs
27-Architecture: i386 amd64 armhf arm64
28+Architecture: linux-any
29 Multi-Arch: same
30 Pre-Depends: ${misc:Pre-Depends}
31 Depends: ${misc:Depends},
32@@ -76,7 +77,7 @@
33
34 Package: libmirplatform7
35 Section: libs
36-Architecture: i386 amd64 armhf arm64
37+Architecture: linux-any
38 Multi-Arch: same
39 Pre-Depends: ${misc:Pre-Depends}
40 Depends: ${misc:Depends},
41@@ -90,7 +91,7 @@
42
43 Package: libmircommon-dev
44 Section: libdevel
45-Architecture: i386 amd64 armhf arm64
46+Architecture: linux-any
47 Multi-Arch: same
48 Pre-Depends: ${misc:Pre-Depends}
49 Depends: libmircommon5 (= ${binary:Version}),
50@@ -107,7 +108,7 @@
51
52 Package: libmirplatform-dev
53 Section: libdevel
54-Architecture: i386 amd64 armhf arm64
55+Architecture: linux-any
56 Multi-Arch: same
57 Pre-Depends: ${misc:Pre-Depends}
58 Depends: libmirplatform7 (= ${binary:Version}),
59@@ -124,7 +125,7 @@
60
61 Package: libmirserver-dev
62 Section: libdevel
63-Architecture: i386 amd64 armhf arm64
64+Architecture: linux-any
65 Multi-Arch: same
66 Pre-Depends: ${misc:Pre-Depends}
67 Depends: libmirserver32 (= ${binary:Version}),
68@@ -140,7 +141,7 @@
69
70 Package: libmirclient9
71 Section: libs
72-Architecture: i386 amd64 armhf arm64
73+Architecture: linux-any
74 Multi-Arch: same
75 Pre-Depends: ${misc:Pre-Depends}
76 Depends: ${misc:Depends},
77@@ -153,7 +154,7 @@
78
79 Package: libmirclient-dev
80 Section: libdevel
81-Architecture: i386 amd64 armhf arm64
82+Architecture: linux-any
83 Multi-Arch: same
84 Pre-Depends: ${misc:Pre-Depends}
85 Depends: libmirclient9 (= ${binary:Version}),
86@@ -168,7 +169,7 @@
87
88 Package: libmirclient-debug-extension1
89 Section: libs
90-Architecture: i386 amd64 armhf arm64
91+Architecture: linux-any
92 Multi-Arch: same
93 Pre-Depends: ${misc:Pre-Depends}
94 Depends: ${misc:Depends},
95@@ -189,7 +190,7 @@
96
97 Package: libmirclient-debug-extension-dev
98 Section: libdevel
99-Architecture: i386 amd64 armhf arm64
100+Architecture: linux-any
101 Multi-Arch: same
102 Pre-Depends: ${misc:Pre-Depends}
103 Depends: libmirclient-debug-extension1 (= ${binary:Version}),
104@@ -213,7 +214,7 @@
105 the debug extensions.
106
107 Package: mir-demos
108-Architecture: i386 amd64 armhf arm64
109+Architecture: linux-any
110 Depends: ${misc:Depends},
111 ${shlibs:Depends},
112 Recommends: fonts-liberation
113@@ -224,7 +225,7 @@
114 Contains demo applications (with source) that use the Mir display server
115
116 Package: mir-utils
117-Architecture: i386 amd64 armhf arm64
118+Architecture: linux-any
119 Depends: ${misc:Depends},
120 ${shlibs:Depends},
121 Description: Display server for Ubuntu - utility programs
122@@ -241,7 +242,7 @@
123 This package installs the mir API documentation.
124
125 Package: mir-test-tools
126-Architecture: i386 amd64 armhf arm64
127+Architecture: linux-any
128 Multi-Arch: same
129 Pre-Depends: ${misc:Pre-Depends}
130 Depends: ${misc:Depends},
131@@ -255,7 +256,7 @@
132
133 Package: libmircommon5
134 Section: libs
135-Architecture: i386 amd64 armhf arm64
136+Architecture: linux-any
137 Multi-Arch: same
138 Pre-Depends: ${misc:Pre-Depends}
139 Depends: ${misc:Depends},
140@@ -269,7 +270,7 @@
141 # Longer-term these drivers should move out-of-tree
142 Package: mir-platform-graphics-mesa2
143 Section: libs
144-Architecture: i386 amd64 armhf arm64
145+Architecture: linux-any
146 Multi-Arch: same
147 Pre-Depends: ${misc:Pre-Depends}
148 Depends: ${misc:Depends},
149@@ -297,7 +298,7 @@
150
151 Package: mir-client-platform-mesa2
152 Section: libs
153-Architecture: i386 amd64 armhf arm64
154+Architecture: linux-any
155 Multi-Arch: same
156 Pre-Depends: ${misc:Pre-Depends}
157 Depends: ${misc:Depends},
158@@ -311,7 +312,7 @@
159
160 Package: mir-client-platform-mesa-dev
161 Section: libdevel
162-Architecture: i386 amd64 armhf arm64
163+Architecture: linux-any
164 Multi-Arch: same
165 Pre-Depends: ${misc:Pre-Depends}
166 Depends: libmircommon-dev,
167@@ -339,7 +340,7 @@
168
169 Package: mir-graphics-drivers-desktop
170 Section: libs
171-Architecture: i386 amd64 armhf arm64
172+Architecture: linux-any
173 Multi-Arch: same
174 Pre-Depends: ${misc:Pre-Depends}
175 Depends: ${misc:Depends},
176
177=== modified file 'debian/create_postinst_prerm_scripts.sh'
178--- debian/create_postinst_prerm_scripts.sh 2015-01-21 07:34:50 +0000
179+++ debian/create_postinst_prerm_scripts.sh 2015-06-04 02:27:25 +0000
180@@ -8,12 +8,12 @@
181
182 mir_platform_types="${PLATFORM_DRIVER}"
183 case $deb_host_arch in
184- arm64)
185+ amd64|i386|armhf)
186+ mir_platforms="android mesa"
187+ ;;
188+ *)
189 mir_platforms="mesa"
190 ;;
191- *)
192- mir_platforms="android mesa"
193- ;;
194 esac
195
196 create_script()
197
198=== modified file 'debian/install_ld_so_conf.sh'
199--- debian/install_ld_so_conf.sh 2015-01-21 07:34:50 +0000
200+++ debian/install_ld_so_conf.sh 2015-06-04 02:27:25 +0000
201@@ -7,12 +7,12 @@
202
203 mir_platform_types="${PLATFORM_DRIVER} ${CLIENT_DRIVER}"
204 case $DEB_HOST_ARCH in
205- arm64)
206+ amd64|i386|armhf)
207+ mir_platforms="android mesa"
208+ ;;
209+ *)
210 mir_platforms="mesa"
211 ;;
212- *)
213- mir_platforms="android mesa"
214- ;;
215 esac
216
217 for platform_type in $mir_platform_types;
218
219=== modified file 'debian/rules'
220--- debian/rules 2015-05-19 21:34:34 +0000
221+++ debian/rules 2015-06-04 02:27:25 +0000
222@@ -2,6 +2,7 @@
223
224 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
225 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
226+DEB_HOST_ARCH_ENDIAN ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_ENDIAN)
227 EXACT_PACKAGE_VERSION = $(shell dpkg-parsechangelog | grep Version | cut -d' ' -f 2)
228
229 export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
230@@ -12,7 +13,11 @@
231 # Enable verbose debugging output from the testsuite
232 export MIR_SERVER_LOGGING = on
233 override_dh_auto_test:
234+ifeq ($(DEB_HOST_ARCH_ENDIAN),little)
235 GTEST_OUTPUT=xml:./ dh_auto_test --max-parallel=1 -- ARGS="-V"
236+else
237+ echo "Testsuite disabled on $(DEB_HOST_ARCH) due to lack of big-endian support."
238+endif
239
240 COMMON_CONFIGURE_OPTIONS = \
241 -DCMAKE_INSTALL_LIBEXECDIR="lib/$(DEB_HOST_MULTIARCH)/mir"
242@@ -25,14 +30,14 @@
243 -DMIR_RUN_INTEGRATION_TESTS=OFF \
244 -DMIR_PLATFORM=android\;mesa
245 else
246-ifeq ($(DEB_HOST_ARCH),arm64)
247+ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH)),)
248+ dh_auto_configure -- \
249+ $(COMMON_CONFIGURE_OPTIONS) \
250+ -DMIR_PLATFORM=mesa\;android
251+else
252 dh_auto_configure -- \
253 $(COMMON_CONFIGURE_OPTIONS) \
254 -DMIR_PLATFORM=mesa
255-else
256- dh_auto_configure -- \
257- $(COMMON_CONFIGURE_OPTIONS) \
258- -DMIR_PLATFORM=mesa\;android
259 endif
260 endif
261
262
263=== added file 'tests/unit-tests/test_data/libpowerpc.so'
264Binary files tests/unit-tests/test_data/libpowerpc.so 1970-01-01 00:00:00 +0000 and tests/unit-tests/test_data/libpowerpc.so 2015-06-04 02:27:25 +0000 differ
265=== added file 'tests/unit-tests/test_data/libppc64el.so'
266Binary files tests/unit-tests/test_data/libppc64el.so 1970-01-01 00:00:00 +0000 and tests/unit-tests/test_data/libppc64el.so 2015-06-04 02:27:25 +0000 differ
267=== modified file 'tests/unit-tests/test_shared_library_prober.cpp'
268--- tests/unit-tests/test_shared_library_prober.cpp 2015-05-07 09:06:20 +0000
269+++ tests/unit-tests/test_shared_library_prober.cpp 2015-06-04 02:27:25 +0000
270@@ -162,6 +162,8 @@
271 EXPECT_CALL(report, loading_library(FilenameMatches("libarmhf.so")));
272 EXPECT_CALL(report, loading_library(FilenameMatches("libi386.so")));
273 EXPECT_CALL(report, loading_library(FilenameMatches("libarm64.so")));
274+ EXPECT_CALL(report, loading_library(FilenameMatches("libpowerpc.so")));
275+ EXPECT_CALL(report, loading_library(FilenameMatches("libppc64el.so")));
276 EXPECT_CALL(report, loading_library(FilenameMatches("libinvalid.so.3")));
277
278 mir::libraries_for_path(library_path, report);
279@@ -176,6 +178,8 @@
280 bool amd64_failed{false};
281 bool i386_failed{false};
282 bool arm64_failed{false};
283+ bool powerpc_failed{false};
284+ bool ppc64el_failed{false};
285 bool invalid_failed{false};
286
287 ON_CALL(report, loading_failed(FilenameMatches("libamd64.so"), _))
288@@ -186,11 +190,15 @@
289 .WillByDefault(InvokeWithoutArgs([&i386_failed]() { i386_failed = true; }));
290 ON_CALL(report, loading_failed(FilenameMatches("libarm64.so"), _))
291 .WillByDefault(InvokeWithoutArgs([&arm64_failed]() { arm64_failed = true; }));
292+ ON_CALL(report, loading_failed(FilenameMatches("libpowerpc.so"), _))
293+ .WillByDefault(InvokeWithoutArgs([&powerpc_failed]() { powerpc_failed = true; }));
294+ ON_CALL(report, loading_failed(FilenameMatches("libppc64el.so"), _))
295+ .WillByDefault(InvokeWithoutArgs([&ppc64el_failed]() { ppc64el_failed = true; }));
296 ON_CALL(report, loading_failed(FilenameMatches("libinvalid.so.3"), _))
297 .WillByDefault(InvokeWithoutArgs([&invalid_failed]() { invalid_failed = true; }));
298
299 mir::libraries_for_path(library_path, report);
300
301 EXPECT_TRUE(invalid_failed);
302- EXPECT_TRUE(i386_failed || amd64_failed || armhf_failed || arm64_failed);
303+ EXPECT_TRUE(i386_failed || amd64_failed || armhf_failed || arm64_failed || powerpc_failed || ppc64el_failed);
304 }

Subscribers

People subscribed via source and target branches