From 72fb279fadcdc84a9328c8e5a9affe99a5ea8f16 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 15 Feb 2024 10:31:26 -0500 Subject: [PATCH] tests: Skip composefs tests without the feature Previously this was masked by us shipping composefs vendored. --- tests/libtest.sh | 10 ++++++++-- tests/test-admin-deploy-composefs.sh | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/libtest.sh b/tests/libtest.sh index d1c99eab8f..16d3870080 100755 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -706,8 +706,14 @@ has_gpgme () { } skip_without_gpgme() { - if ! has_gpgme; then - skip "no gpg support compiled in" + skip_without_feature gpgme +} + +skip_without_feature() { + local feature + feature=$1 + if ! ${CMD_PREFIX} ostree --version | grep -q -F -e '- '$feature; then + skip "missing feature: ${feature}" fi } diff --git a/tests/test-admin-deploy-composefs.sh b/tests/test-admin-deploy-composefs.sh index a4565a7416..903436161c 100755 --- a/tests/test-admin-deploy-composefs.sh +++ b/tests/test-admin-deploy-composefs.sh @@ -21,6 +21,8 @@ set -euox pipefail . $(dirname $0)/libtest.sh +skip_without_feature composefs + # Exports OSTREE_SYSROOT so --sysroot not needed. setup_os_repository "archive" "syslinux"