Skip to content

Commit

Permalink
tests: Skip composefs tests without the feature
Browse files Browse the repository at this point in the history
Previously this was masked by us shipping composefs vendored.
  • Loading branch information
cgwalters committed Feb 15, 2024
1 parent f46cc0c commit 72fb279
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 2 additions & 0 deletions tests/test-admin-deploy-composefs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 72fb279

Please sign in to comment.