Makefile: use hack/test-system.sh for test-system-local

This will ensure both `test-system` and `test-system-local` work.

The `test-system` target will use the skopeo binary at `./bin/skopeo`.
Setting SKOPEO_BINARY should have no effect on it.

The `test-system-local` (and `test-integration-local`) target can use
SKOPEO_BINARY at any location. This will be useful in CI where we need to test
skopeo installed by the package at /usr/bin.

Co-authored-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-10-25 17:03:55 -04:00
parent 7ae3e0bc63
commit 85a14032cc
2 changed files with 6 additions and 2 deletions

View File

@@ -202,6 +202,10 @@ test-integration:
# Helper target to set up SKOPEO_BINARY variable for local test targets
# SKOPEO_BINARY only takes effect on `test-integration-local` and
# `test-system-local` targets. It's not propagated into the container used for `test-integration` and
# `test-system`. These targets will (build and) use skopeo binary at
# ./bin/skopeo.
.eval-skopeo-binary: $(if $(SKOPEO_BINARY),,bin/skopeo)
$(eval SKOPEO_BINARY := $(or $(SKOPEO_BINARY),./bin/skopeo))
@echo "Testing with $(SKOPEO_BINARY) ..."
@@ -226,7 +230,7 @@ test-system:
# Primarily intended for CI.
test-system-local: .eval-skopeo-binary
hack/warn-destructive-tests.sh
bats --tap systemtest
hack/test-system.sh
test-unit:
# Just call (make test unit-local) here instead of worrying about environment differences

View File

@@ -37,4 +37,4 @@ EOF
export CONTAINERS_STORAGE_CONF=/etc/containers/storage.conf
fi
SKOPEO_BINARY="$SKOPEO_BINARY" bats --tap systemtest
bats --tap systemtest