Skip to content

Commit

Permalink
backport of commit 8a86c20
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajolet-hashicorp committed Jul 18, 2023
1 parent f8665ee commit 1ef15d9
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {} \;

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1ef15d9

Please sign in to comment.