Skip to content

Commit

Permalink
tests: Make sure FUSERMOUNT gets set for "as-installed" tests
Browse files Browse the repository at this point in the history
Otherwise, tests for OCI and the update portal fail with:

    /usr/libexec/installed-tests/Flatpak/libtest.sh: line 611: FUSERMOUNT: unbound variable

Fixes: 2cb17b4 "Do not hard-code fusermount, add option or auto-detect instead"
Signed-off-by: Simon McVittie <[email protected]>
  • Loading branch information
smcv committed Apr 8, 2024
1 parent 1f770f3 commit f16e064
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/installed-tests.sh.in
@@ -0,0 +1,4 @@
# Copyright 2024 Collabora Ltd.
# SPDX-License-Identifier: LGPL-2.1-or-later

FUSERMOUNT='@FUSERMOUNT@'
4 changes: 4 additions & 0 deletions tests/libtest.sh
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions tests/meson.build
Expand Up @@ -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(
Expand Down

0 comments on commit f16e064

Please sign in to comment.