summaryrefslogtreecommitdiff
path: root/test/meson.build
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-05 13:50:03 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-05 20:31:14 +0300
commit8c2b092a20ec0c6bcfc4af489fb6b4b7ab656d63 (patch)
tree7f80708f36080c08e58ea65b0243dba19eef32bf /test/meson.build
parent487989eec64aa9f57f39b3bdcf619a5d435efac6 (diff)
test: threads: Fix link failure due to missing dependency
Commit 036d26d6677e ("test: threads: Test thread cleanup upon abnormal termination") added calls to functions provided by the pthread library in the threads test, but didn't add the corresponding dependency. This caused a link breakage on some platforms: /usr/bin/ld: test/threads.p/threads.cpp.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.4' /usr/bin/ld: /lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Fix it by adding the missing dependency. Fixes: 036d26d6677e ("test: threads: Test thread cleanup upon abnormal termination") Reported-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Tested-by: Naushir Patuck <naush@raspberrypi.com> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build23
1 files changed, 19 insertions, 4 deletions
diff --git a/test/meson.build b/test/meson.build
index 6cc77841..9bf7bf34 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -51,7 +51,7 @@ internal_tests = [
['pixel-format', 'pixel-format.cpp'],
['shared-fd', 'shared-fd.cpp'],
['signal-threads', 'signal-threads.cpp'],
- ['threads', 'threads.cpp'],
+ ['threads', 'threads.cpp', [libthreads]],
['timer', 'timer.cpp'],
['timer-thread', 'timer-thread.cpp'],
['unique-fd', 'unique-fd.cpp'],
@@ -65,8 +65,13 @@ internal_non_parallel_tests = [
]
foreach t : public_tests
+ deps = [libcamera_public]
+ if t.length() > 2
+ deps += t[2]
+ endif
+
exe = executable(t[0], t[1],
- dependencies : libcamera_public,
+ dependencies : deps,
link_with : test_libraries,
include_directories : test_includes_public)
@@ -74,8 +79,13 @@ foreach t : public_tests
endforeach
foreach t : internal_tests
+ deps = [libcamera_private]
+ if t.length() > 2
+ deps += t[2]
+ endif
+
exe = executable(t[0], t[1],
- dependencies : libcamera_private,
+ dependencies : deps,
link_with : test_libraries,
include_directories : test_includes_internal)
@@ -83,8 +93,13 @@ foreach t : internal_tests
endforeach
foreach t : internal_non_parallel_tests
+ deps = [libcamera_private]
+ if t.length() > 2
+ deps += t[2]
+ endif
+
exe = executable(t[0], t[1],
- dependencies : libcamera_private,
+ dependencies : deps,
link_with : test_libraries,
include_directories : test_includes_internal)