From 48878185249e788913c7dd9903e3651601c8f0ca Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 16 Jul 2025 15:25:54 -0400 Subject: [PATCH] Makefile: test-system-local checks for SKOPEO_BINARY Signed-off-by: Lokesh Mandvekar --- Makefile | 3 +-- hack/test-system.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a707d44c..d0fb5fac 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/hack/test-system.sh b/hack/test-system.sh index 5474cfca..a2550183 100755 --- a/hack/test-system.sh +++ b/hack/test-system.sh @@ -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