Makefile: allow passing arguments to the test container

Allow passing additional arguments for the entrypoint.sh script to
the test container. This is useful to limit the test run to
a single package with `--test-pkg=<X>` for example.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2021-04-06 13:36:52 -04:00 committed by John Mulligan
parent fc9bd71eb3
commit 312e4cf6b5
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ test:
.PHONY: test-docker test-container test-multi-container
test-docker: test-container
test-container: $(BUILDFILE) $(RESULTS_DIR)
$(CONTAINER_CMD) run $(CONTAINER_OPTS) --rm -v $(CURDIR):/go/src/github.com/ceph/go-ceph$(VOLUME_FLAGS) $(RESULTS_VOLUME) $(CI_IMAGE_TAG)
$(CONTAINER_CMD) run $(CONTAINER_OPTS) --rm -v $(CURDIR):/go/src/github.com/ceph/go-ceph$(VOLUME_FLAGS) $(RESULTS_VOLUME) $(CI_IMAGE_TAG) $(ENTRYPOINT_ARGS)
test-multi-container: $(BUILDFILE) $(RESULTS_DIR)
$(CONTAINER_CMD) kill test_ceph_a test_ceph_b 2>/dev/null || true
$(CONTAINER_CMD) volume remove test_ceph_a_data test_ceph_b_data 2>/dev/null || true
@ -59,7 +59,7 @@ test-multi-container: $(BUILDFILE) $(RESULTS_DIR)
--net test_ceph_net -v test_ceph_a_data:/ceph_a -v test_ceph_b_data:/ceph_b \
-v $(CURDIR):/go/src/github.com/ceph/go-ceph$(VOLUME_FLAGS) $(RESULTS_VOLUME) \
$(CI_IMAGE_TAG) --wait-for=/ceph_a/.ready:/ceph_b/.ready --ceph-conf=/ceph_a/ceph.conf \
--mirror=/ceph_b/ceph.conf
--mirror=/ceph_b/ceph.conf $(ENTRYPOINT_ARGS)
$(CONTAINER_CMD) kill test_ceph_a test_ceph_b
ifdef RESULTS_DIR