diff --git a/tests/installed-tests.sh.in b/tests/installed-tests.sh.in new file mode 100644 index 0000000000..e0978ec40a --- /dev/null +++ b/tests/installed-tests.sh.in @@ -0,0 +1,4 @@ +# Copyright 2024 Collabora Ltd. +# SPDX-License-Identifier: LGPL-2.1-or-later + +FUSERMOUNT='@FUSERMOUNT@' diff --git a/tests/libtest.sh b/tests/libtest.sh index c4a403f598..b29ba55521 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -38,6 +38,10 @@ else test_builddir=$(dirname $0) fi +if [ -e "$test_srcdir/installed-tests.sh" ]; then + . "$test_srcdir/installed-tests.sh" +fi + # All the asserts and ok functions below are wrapped such that they # don't output any set -x traces of their internals (but still echo # errors to stderr). This way the log output focuses on tracing what diff --git a/tests/meson.build b/tests/meson.build index db42c8a938..07606e35d6 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -40,6 +40,17 @@ else tests_environment.set('FLATPAK_DBUSPROXY', get_option('system_dbus_proxy')) endif +if get_option('installed_tests') + configure_file( + input : 'installed-tests.sh.in', + output : 'installed-tests.sh', + configuration : { + 'FUSERMOUNT' : fusermount, + }, + install_dir : installed_testdir, + ) +endif + # Explicitly doing a find_program() for this avoids lots of output with # older Meson versions tap_test = find_program(