tests: Skip seccomp tests when seccomp is unavailable

Fixes the testsuite with `-Dseccomp=disabled`.
This commit is contained in:
bbhtt
2026-06-08 23:35:19 +05:30
committed by Sebastian Wick
parent f7138cbbc3
commit 489b3972cb
3 changed files with 8 additions and 0 deletions

View File

@@ -631,6 +631,12 @@ skip_without_libsystemd () {
fi
}
skip_without_seccomp () {
if [ "${HAVE_SECCOMP:-0}" != "1" ]; then
skip "seccomp support disabled"
fi
}
FLATPAK_SYSTEM_CERTS_D=$(pwd)/certs.d
export FLATPAK_SYSTEM_CERTS_D

View File

@@ -30,6 +30,7 @@ tests_environment = {
'G_TEST_SRCDIR' : meson.current_source_dir(),
'FLATPAK_BWRAP' : env_flatpak_bwrap,
'FLATPAK_DBUSPROXY' : env_flatpak_dbusproxy,
'HAVE_SECCOMP' : libseccomp_dep.found() ? '1' : '0',
}
tests_environment_prepend = {

View File

@@ -6,6 +6,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh
skip_without_seccomp
skip_without_bwrap
echo "1..18"