From 1ef15d95046346f8d8536a8d3446ee3dcd669603 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 17 Jul 2023 13:10:48 +0000 Subject: [PATCH] backport of commit 8a86c20c41153f90659807df8c2594756b59f287 --- Makefile | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index ad6cfd3a28a..01d62f0053c 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,6 @@ GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) GOPATH=$(shell go env GOPATH) -EXECUTABLE_FILES=$(shell find . -type f -executable | egrep -v '^\./(website/[vendor|tmp]|vendor/|\.git|bin/|scripts/|pkg/)' | egrep -v '.*(\.sh|\.bats|\.git)' | egrep -v './provisioner/(ansible|inspec)/test-fixtures/exit1') - # Get the git commit GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true) GIT_COMMIT=$(shell git rev-parse --short HEAD) @@ -133,15 +131,6 @@ fmt-check: fmt ## Check go code formatting exit 1; \ fi -mode-check: ## Check that only certain files are executable - @echo "==> Checking that only certain files are executable..." - @if [ ! -z "$(EXECUTABLE_FILES)" ]; then \ - echo "These files should not be executable or they must be white listed in the Makefile:"; \ - echo "$(EXECUTABLE_FILES)" | xargs -n1; \ - exit 1; \ - else \ - echo "Check passed."; \ - fi fmt-docs: @find ./website/pages/docs -name "*.md" -exec pandoc --wrap auto --columns 79 --atx-headers -s -f "markdown_github+yaml_metadata_block" -t "markdown_github+yaml_metadata_block" {} -o {} \; @@ -166,7 +155,7 @@ generate-check: generate ## Check go code generation is on par exit 1; \ fi -test: mode-check vet ## Run unit tests +test: vet ## Run unit tests @go test -count $(COUNT) $(TEST) $(TESTARGS) -timeout=3m # acctest runs provisioners acceptance tests @@ -178,7 +167,7 @@ testacc: # install-build-deps generate ## Run acceptance tests @echo "WARN: Acceptance tests will take a long time to run and may cost money. Ctrl-C if you want to cancel." PACKER_ACC=1 go test -count $(COUNT) -v $(TEST) $(TESTARGS) -timeout=120m -testrace: mode-check vet ## Test with race detection enabled +testrace: vet ## Test with race detection enabled @go test -count $(COUNT) -race $(TEST) $(TESTARGS) -timeout=3m -p=8 # Runs code coverage and open a html page with report