Skip to content

Commit 1666b13

Browse files
authored
Merge pull request #2654 from lsm5/ci-agnostic
fixes to have test-*-local Makefile targets work
2 parents a958e86 + 19f1202 commit 1666b13

File tree

5 files changed

+13
-72
lines changed

5 files changed

+13
-72
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,11 @@ test-integration:
201201
$(MAKE) test-integration-local
202202

203203

204-
# Intended for CI, assumed to be running in quay.io/libpod/skopeo_cidev container.
204+
# Primarily intended for CI.
205205
test-integration-local: bin/skopeo
206206
hack/warn-destructive-tests.sh
207-
hack/test-integration.sh $(SKOPEO_LDFLAGS) $(TESTFLAGS)
207+
$(MAKE) PREFIX=/usr install
208+
cd ./integration && $(GO) test $(SKOPEO_LDFLAGS) $(TESTFLAGS) $(if $(BUILDTAGS),-tags "$(BUILDTAGS)")
208209

209210
# complicated set of options needed to run podman-in-podman
210211
test-system:
@@ -218,10 +219,11 @@ test-system:
218219
$(CONTAINER_RUNTIME) unshare rm -rf $$DTEMP; # This probably doesn't work with Docker, oh well, better than nothing... \
219220
exit $$rc
220221

221-
# Intended for CI, assumed to already be running in quay.io/libpod/skopeo_cidev container.
222-
test-system-local: bin/skopeo
222+
# Primarily intended for CI.
223+
test-system-local: $(if $(SKOPEO_BINARY),,bin/skopeo)
223224
hack/warn-destructive-tests.sh
224-
hack/test-system.sh SKOPEO_LDFLAGS="$(SKOPEO_LDFLAGS)" BUILDTAGS="$(BUILDTAGS)"
225+
@echo "Testing with $(or $(SKOPEO_BINARY),$(eval SKOPEO_BINARY := "bin/skopeo")$(SKOPEO_BINARY)) ..."
226+
bats --tap systemtest
225227

226228
test-unit:
227229
# Just call (make test unit-local) here instead of worrying about environment differences
@@ -234,7 +236,7 @@ validate:
234236
test-all-local: validate-local validate-docs test-unit-local
235237

236238
.PHONY: validate-local
237-
validate-local:
239+
validate-local: tools
238240
hack/validate-git-marks.sh
239241
hack/validate-gofmt.sh
240242
$(GOBIN)/golangci-lint run --build-tags "${BUILDTAGS}"

hack/test-integration.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

hack/test-system.sh

Lines changed: 0 additions & 44 deletions
This file was deleted.

systemtest/tmt/main.fmf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ adjust:
1010
RELEASE_TESTING: true
1111

1212
summary: System test
13-
test: bash ./test.sh
13+
test: |
14+
rpm -q containers-common skopeo skopeo-tests
15+
# If these tests are to be run anywhere else, TMT can fetch
16+
# them using the URL and git ref, so git commands should work.
17+
make -C $(git rev-parse --show-toplevel) test-system-local
1418
duration: 60m

systemtest/tmt/test.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)