Makefile: test-system-local checks for SKOPEO_BINARY

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-07-16 15:25:54 -04:00
parent e014ad67c6
commit 4887818524
2 changed files with 9 additions and 6 deletions

View File

@@ -220,8 +220,7 @@ test-system:
exit $$rc
# Intended for CI, assumed to already be running in quay.io/libpod/skopeo_cidev container.
test-system-local: bin/skopeo
hack/warn-destructive-tests.sh
test-system-local: $(if $(SKOPEO_BINARY),,bin/skopeo)
hack/test-system.sh
test-unit:

View File

@@ -37,8 +37,12 @@ EOF
export CONTAINERS_STORAGE_CONF=/etc/containers/storage.conf
fi
# Build skopeo, install into /usr/bin
make PREFIX=/usr install
# Print what binary is being used for tests
if [[ -v SKOPEO_BINARY ]]; then
echo "Testing with $SKOPEO_BINARY ..."
else
echo "Testing with $(git rev-parse --show-toplevel)/bin/skopeo ..."
fi
# Run tests
SKOPEO_BINARY=/usr/bin/skopeo bats --tap systemtest
# The skopeo binary will be at ../bin/skopeo unless set via SKOPEO_BINARY var
bats --tap systemtest