mirror of https://github.com/docker/cli.git
Allow control over dirs passed to e2e and unit tests
Allows e.g.: $ make -f docker.Makefile TESTDIRS=./cli/command/trust/... test-unit Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
023559b98c
commit
e1a7b56308
2
Makefile
2
Makefile
|
@ -12,7 +12,7 @@ clean: ## remove build artifacts
|
|||
|
||||
.PHONY: test-unit
|
||||
test-unit: ## run unit tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit
|
||||
gotestsum $(TESTFLAGS) -- $(shell go list ./... | grep -vE '/vendor/|/e2e/')
|
||||
gotestsum $(TESTFLAGS) -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')}
|
||||
|
||||
.PHONY: test
|
||||
test: test-unit ## run tests
|
||||
|
|
|
@ -21,7 +21,7 @@ ifeq ($(DOCKER_CLI_GO_BUILD_CACHE),y)
|
|||
DOCKER_CLI_MOUNTS += -v "$(CACHE_VOLUME_NAME):/root/.cache/go-build"
|
||||
endif
|
||||
VERSION = $(shell cat VERSION)
|
||||
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM -e TESTFLAGS
|
||||
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIRS
|
||||
|
||||
# build docker image (dockerfiles/Dockerfile.build)
|
||||
.PHONY: build_docker_image
|
||||
|
|
|
@ -70,7 +70,7 @@ function runtests {
|
|||
GOPATH="$GOPATH" \
|
||||
PATH="$PWD/build/:/usr/bin:/usr/local/bin:/usr/local/go/bin" \
|
||||
DOCKER_CLI_E2E_PLUGINS_EXTRA_DIRS="$PWD/build/plugins-linux-amd64" \
|
||||
"$(command -v gotestsum)" -- ./e2e/... ${TESTFLAGS-}
|
||||
"$(command -v gotestsum)" -- ${TESTDIRS:-./e2e/...} ${TESTFLAGS-}
|
||||
}
|
||||
|
||||
export unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
|
||||
|
|
Loading…
Reference in New Issue