Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ docs-test-whitespace:
fi


ifeq (${DISABLE_TEST_TARGETS},)


#
Expand All @@ -463,8 +462,8 @@ test: test-sh test-api test-go
.PHONY: test-go
test-go: ensure-webassets bpf-bytecode roletester rdpclient $(RENDER_TESTS)
test-go: FLAGS ?= '-race'
test-go: PACKAGES := $(shell go list ./... | grep -v integration)
test-go: CHAOS_FOLDERS := $(shell find . -type f -name '*chaos*.go' | xargs dirname | uniq)
test-go: PACKAGES = $(shell go list ./... | grep -v integration)
test-go: CHAOS_FOLDERS = $(shell find . -type f -name '*chaos*.go' | xargs dirname | uniq)
test-go: $(VERSRC)
$(CGOFLAG) go test -cover -json -tags "$(PAM_TAG) $(FIPS_TAG) $(BPF_TAG) $(ROLETESTER_TAG) $(RDPCLIENT_TAG)" $(PACKAGES) $(FLAGS) $(ADDFLAGS) \
| ${RENDER_TESTS}
Expand All @@ -478,7 +477,7 @@ UNIT_ROOT_REGEX := ^TestRoot
.PHONY: test-go-root
test-go-root: ensure-webassets bpf-bytecode roletester rdpclient
test-go-root: FLAGS ?= '-race'
test-go-root: PACKAGES := $(shell go list $(ADDFLAGS) ./... | grep -v integration)
test-go-root: PACKAGES = $(shell go list $(ADDFLAGS) ./... | grep -v integration)
test-go-root: $(VERSRC)
$(CGOFLAG) go test -run "$(UNIT_ROOT_REGEX)" -tags "$(PAM_TAG) $(FIPS_TAG) $(BPF_TAG) $(ROLETESTER_TAG) $(RDPCLIENT_TAG)" $(PACKAGES) $(FLAGS) $(ADDFLAGS)

Expand All @@ -487,7 +486,7 @@ test-go-root: $(VERSRC)
.PHONY: test-api
test-api:
test-api: FLAGS ?= '-race'
test-api: PACKAGES := $(shell cd api && go list ./...)
test-api: PACKAGES = $(shell cd api && go list ./...)
test-api: $(VERSRC)
$(CGOFLAG) go test -tags "$(PAM_TAG) $(FIPS_TAG) $(BPF_TAG) $(ROLETESTER_TAG)" $(PACKAGES) $(FLAGS) $(ADDFLAGS)

Expand All @@ -511,7 +510,7 @@ run-etcd:
#
.PHONY: integration
integration: FLAGS ?= -v -race
integration: PACKAGES := $(shell go list ./... | grep integration)
integration: PACKAGES = $(shell go list ./... | grep integration)
integration: $(RENDER_TESTS)
@echo KUBECONFIG is: $(KUBECONFIG), TEST_KUBE: $(TEST_KUBE)
$(CGOFLAG) go test -timeout 30m -json -tags "$(PAM_TAG) $(FIPS_TAG) $(BPF_TAG) $(ROLETESTER_TAG) $(RDPCLIENT_TAG)" $(PACKAGES) $(FLAGS) \
Expand All @@ -524,11 +523,10 @@ integration: $(RENDER_TESTS)
INTEGRATION_ROOT_REGEX := ^TestRoot
.PHONY: integration-root
integration-root: FLAGS ?= -v -race
integration-root: PACKAGES := $(shell go list ./... | grep integration)
integration-root: PACKAGES = $(shell go list ./... | grep integration)
integration-root: $(RENDER_TESTS)
$(CGOFLAG) go test -json -run "$(INTEGRATION_ROOT_REGEX)" $(PACKAGES) $(FLAGS) \
| $(RENDER_TESTS) -report-by test
endif

#
# Lint the source code.
Expand Down
2 changes: 1 addition & 1 deletion build.assets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ buildbox-arm-fips: buildbox-fips
grpc: devbox
docker run \
$(DOCKERFLAGS) -e CLANG_FORMAT=/usr/bin/clang-format-10 -t $(DEVBOX) \
make -C /go/src/github.com/gravitational/teleport DISABLE_TEST_TARGETS=1 devbox-grpc
make -C /go/src/github.com/gravitational/teleport devbox-grpc
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks unrelated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reverts the change I made in #9432 because I thought that the performance problems were caused by some quirks in the docker vfs bindmounts, so I was only excluding the test targets for the inner part of make grpc; with the change in the makefile, this isn't necessary anymore.

I'll note this in the PR description.


#
# Removes the docker image
Expand Down