tests: fix main symbol duplication
So far I got these errors before patching:
libtool: link: cc -o .libs/headers-test -pthread -Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -O2 -pipe tests/headers-test.o tests/headers-protocol-test.o tests/headers-protocol-core-test.o /tmp/obj/wayland-1.16.0/build-amd64/.libs/libtest-runner.a -L.libs -lwayland-client -lffi -lm -lwayland-server -lkvm -Wl,-rpath-link,/usr/local/lib
ld: error: duplicate symbol: main
>>> defined at headers-test.c:53 (/tmp/obj/wayland-1.16.0/wayland-1.16.0/tests/headers-test.c:53)
>>> tests/headers-test.o:(main)
>>> defined at test-runner.c:377 (/tmp/obj/wayland-1.16.0/wayland-1.16.0/tests/test-runner.c:377)
>>> test-runner.o:(.text+0x250) in archive /tmp/obj/wayland-1.16.0/build-amd64/.libs/libtest-runner.a
libtool: link: cc -o .libs/exec-fd-leak-checker -pthread -Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -O2 -pipe tests/exec-fd-leak-checker.o /tmp/obj/wayland-1.16.0/build-amd64/.libs/libtest-runner.a -L.libs -lwayland-client -lffi -lm -lwayland-server -lkvm -Wl,-rpath-link,/usr/local/lib
ld: error: duplicate symbol: main
>>> defined at exec-fd-leak-checker.c:57 (/tmp/obj/wayland-1.16.0/wayland-1.16.0/tests/exec-fd-leak-checker.c:57)
>>> tests/exec-fd-leak-checker.o:(main)
>>> defined at test-runner.c:377 (/tmp/obj/wayland-1.16.0/wayland-1.16.0/tests/test-runner.c:377)
>>> test-runner.o:(.text+0x250) in archive /tmp/obj/wayland-1.16.0/build-amd64/.libs/libtest-runner.a
Makefile.am: error: object 'tests/test-helpers.$(OBJEXT)' created both with libtool and without
libtool: link: cc -o .libs/fixed-benchmark -pthread -Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -O2 -pipe tests/fixed-benchmark.o /tmp/obj/wayland-1.16.0/build-amd64/.libs/libtest-runner.a -L.libs -lwayland-client -lffi -lm -lwayland-server -lkvm -Wl,-rpath-link,/usr/local/lib
ld: error: duplicate symbol: main
>>> defined at fixed-benchmark.c:100 (/tmp/obj/wayland-1.16.0/wayland-1.16.0/tests/fixed-benchmark.c:100)
>>> tests/fixed-benchmark.o:(main)
>>> defined at test-runner.c:377 (/tmp/obj/wayland-1.16.0/wayland-1.16.0/tests/test-runner.c:377)
>>> test-runner.o:(.text+0x250) in archive /tmp/obj/wayland-1.16.0/build-amd64/.libs/libtest-runner.a
This commit fixes all of that.
Signed-off-by: Leonid Bobrov <mazocomp@disroot.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Leonid Bobrov via wayland-devel authored 5 years ago
Pekka Paalanen committed 5 years ago
209 | 209 | exec-fd-leak-checker \ |
210 | 210 | fixed-benchmark |
211 | 211 | |
212 | noinst_LTLIBRARIES += libtest-runner.la | |
212 | noinst_LTLIBRARIES += \ | |
213 | libtest-runner.la \ | |
214 | libtest-helpers.la | |
215 | ||
216 | libtest_helpers_la_SOURCES = tests/test-helpers.c | |
213 | 217 | |
214 | 218 | libtest_runner_la_SOURCES = \ |
215 | 219 | tests/test-runner.c \ |
216 | 220 | tests/test-runner.h \ |
217 | tests/test-helpers.c \ | |
218 | 221 | tests/test-compositor.h \ |
219 | 222 | tests/test-compositor.c |
220 | 223 | libtest_runner_la_LIBADD = \ |
222 | 225 | libwayland-util.la \ |
223 | 226 | libwayland-client.la \ |
224 | 227 | libwayland-server.la \ |
228 | libtest-helpers.la \ | |
225 | 229 | -lrt -ldl $(FFI_LIBS) |
226 | ||
227 | 230 | |
228 | 231 | array_test_SOURCES = tests/array-test.c |
229 | 232 | array_test_LDADD = libtest-runner.la |
269 | 272 | headers_test_SOURCES = tests/headers-test.c \ |
270 | 273 | tests/headers-protocol-test.c \ |
271 | 274 | tests/headers-protocol-core-test.c |
272 | headers_test_LDADD = libtest-runner.la | |
273 | 275 | nodist_headers_test_SOURCES = \ |
274 | 276 | protocol/wayland-server-protocol-core.h \ |
275 | 277 | protocol/wayland-client-protocol-core.h |
279 | 281 | endif |
280 | 282 | |
281 | 283 | fixed_benchmark_SOURCES = tests/fixed-benchmark.c |
282 | fixed_benchmark_LDADD = libtest-runner.la | |
283 | 284 | |
284 | 285 | os_wrappers_test_SOURCES = tests/os-wrappers-test.c |
285 | 286 | os_wrappers_test_LDADD = libtest-runner.la |
286 | 287 | |
287 | 288 | exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c |
288 | exec_fd_leak_checker_LDADD = libtest-runner.la | |
289 | exec_fd_leak_checker_LDADD = libtest-helpers.la | |
289 | 290 | |
290 | 291 | EXTRA_DIST += tests/scanner-test.sh \ |
291 | 292 | protocol/tests.xml \ |