libcamera/test/meson.build
Laurent Pinchart 8c2b092a20 test: threads: Fix link failure due to missing dependency
Commit 036d26d667 ("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: 036d26d667 ("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>
2022-10-05 20:31:14 +03:00

107 lines
3.3 KiB
Meson

# SPDX-License-Identifier: CC0-1.0
if not get_option('test')
test_enabled = false
subdir_done()
endif
test_enabled = true
subdir('libtest')
subdir('camera')
subdir('controls')
subdir('gstreamer')
subdir('ipa')
subdir('ipc')
subdir('log')
subdir('media_device')
subdir('pipeline')
subdir('process')
subdir('py')
subdir('serialization')
subdir('stream')
subdir('v4l2_compat')
subdir('v4l2_subdevice')
subdir('v4l2_videodevice')
public_tests = [
['color-space', 'color-space.cpp'],
['geometry', 'geometry.cpp'],
['public-api', 'public-api.cpp'],
['signal', 'signal.cpp'],
['span', 'span.cpp'],
]
internal_tests = [
['bayer-format', 'bayer-format.cpp'],
['byte-stream-buffer', 'byte-stream-buffer.cpp'],
['camera-sensor', 'camera-sensor.cpp'],
['delayed_controls', 'delayed_controls.cpp'],
['event', 'event.cpp'],
['event-dispatcher', 'event-dispatcher.cpp'],
['event-thread', 'event-thread.cpp'],
['file', 'file.cpp'],
['flags', 'flags.cpp'],
['hotplug-cameras', 'hotplug-cameras.cpp'],
['message', 'message.cpp'],
['object', 'object.cpp'],
['object-delete', 'object-delete.cpp'],
['object-invoke', 'object-invoke.cpp'],
['pixel-format', 'pixel-format.cpp'],
['shared-fd', 'shared-fd.cpp'],
['signal-threads', 'signal-threads.cpp'],
['threads', 'threads.cpp', [libthreads]],
['timer', 'timer.cpp'],
['timer-thread', 'timer-thread.cpp'],
['unique-fd', 'unique-fd.cpp'],
['utils', 'utils.cpp'],
['yaml-parser', 'yaml-parser.cpp'],
]
internal_non_parallel_tests = [
['fence', 'fence.cpp'],
['mapped-buffer', 'mapped-buffer.cpp'],
]
foreach t : public_tests
deps = [libcamera_public]
if t.length() > 2
deps += t[2]
endif
exe = executable(t[0], t[1],
dependencies : deps,
link_with : test_libraries,
include_directories : test_includes_public)
test(t[0], exe)
endforeach
foreach t : internal_tests
deps = [libcamera_private]
if t.length() > 2
deps += t[2]
endif
exe = executable(t[0], t[1],
dependencies : deps,
link_with : test_libraries,
include_directories : test_includes_internal)
test(t[0], exe)
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 : deps,
link_with : test_libraries,
include_directories : test_includes_internal)
test(t[0], exe, is_parallel : false)
endforeach