teflon/tests: avoid loading build-tree tensorflow-lite stub at runtime

It can be quite confusing to see the tests failing to load models
without knowing why. To avoid making people waste time with strace, link
with the stubs at build time but look for the actual implementation at
run time.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40269>
This commit is contained in:
Tomeu Vizoso 2026-05-24 10:28:41 +02:00 committed by Marge Bot
parent 31fe3637a2
commit b33f0cc7fc

View file

@ -18,9 +18,10 @@ libteflon = shared_library(
if with_tests
tensorflow_lite = shared_library(
'tensorflow-lite',
'tensorflow-lite-stub',
[ 'tflite-stub.c' ],
include_directories : [ inc_include ],
link_args : [ '-Wl,-soname,libtensorflow-lite.so' ],
install : false,
)