Codebase list wayland / c70fd8a
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
1 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
209209 exec-fd-leak-checker \
210210 fixed-benchmark
211211
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
213217
214218 libtest_runner_la_SOURCES = \
215219 tests/test-runner.c \
216220 tests/test-runner.h \
217 tests/test-helpers.c \
218221 tests/test-compositor.h \
219222 tests/test-compositor.c
220223 libtest_runner_la_LIBADD = \
222225 libwayland-util.la \
223226 libwayland-client.la \
224227 libwayland-server.la \
228 libtest-helpers.la \
225229 -lrt -ldl $(FFI_LIBS)
226
227230
228231 array_test_SOURCES = tests/array-test.c
229232 array_test_LDADD = libtest-runner.la
269272 headers_test_SOURCES = tests/headers-test.c \
270273 tests/headers-protocol-test.c \
271274 tests/headers-protocol-core-test.c
272 headers_test_LDADD = libtest-runner.la
273275 nodist_headers_test_SOURCES = \
274276 protocol/wayland-server-protocol-core.h \
275277 protocol/wayland-client-protocol-core.h
279281 endif
280282
281283 fixed_benchmark_SOURCES = tests/fixed-benchmark.c
282 fixed_benchmark_LDADD = libtest-runner.la
283284
284285 os_wrappers_test_SOURCES = tests/os-wrappers-test.c
285286 os_wrappers_test_LDADD = libtest-runner.la
286287
287288 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
289290
290291 EXTRA_DIST += tests/scanner-test.sh \
291292 protocol/tests.xml \