Skip to content

Commit

Permalink
Makefile: allow passing arguments to the test container
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
phlogistonjohn committed Apr 19, 2021
1 parent fc9bd71 commit 312e4cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 312e4cf

Please sign in to comment.