Skip to content

Commit f3ce4c8

Browse files
committed
Improve parameter passing to hack/test-integration.sh
Rely on "$@" to allow passing options with spaces, like SKOPEO_LDFLAGS. Then pass SKOPEO_LDFLAGS. Also fix the documentation of TESTFLAGS. Signed-off-by: Miloslav Trmač <[email protected]>
1 parent 7238719 commit f3ce4c8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ ifeq ($(GOOS), linux)
5353
endif
5454
endif
5555

56-
# If $TESTFLAGS is set, it is passed as extra arguments to 'go test'.
56+
# If $TESTFLAGS is set, it is passed as extra arguments to 'go test' on integration tests.
5757
# You can select certain tests to run, with `-run <regex>` for example:
5858
#
59-
# make test-unit TESTFLAGS='-run ^TestManifestDigest$'
6059
# make test-integration TESTFLAGS='-run copySuite.TestCopy.*'
6160
export TESTFLAGS ?= -timeout=15m
6261

@@ -205,7 +204,7 @@ test-integration:
205204
# Intended for CI, assumed to be running in quay.io/libpod/skopeo_cidev container.
206205
test-integration-local: bin/skopeo
207206
hack/warn-destructive-tests.sh
208-
hack/test-integration.sh
207+
hack/test-integration.sh $(SKOPEO_LDFLAGS) $(TESTFLAGS)
209208

210209
# complicated set of options needed to run podman-in-podman
211210
test-system:

hack/test-integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ set -e
33

44
make PREFIX=/usr install
55

6-
echo "cd ./integration;" go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"}
6+
echo "cd ./integration;" go test "$@" ${BUILDTAGS:+-tags "$BUILDTAGS"}
77
cd ./integration
8-
go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"}
8+
go test "$@" ${BUILDTAGS:+-tags "$BUILDTAGS"}

0 commit comments

Comments
 (0)