Skip to content

Commit 2578a03

Browse files
committed
Revert global CGO_ENABLED=0 export
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
1 parent f100269 commit 2578a03

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

GNUmakefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ WEBSITE_REPO=github.com/hashicorp/terraform-website
33
PKG_NAME=github
44

55
COVERAGEARGS?=-race -coverprofile=coverage.txt -covermode=atomic
6-
export CGO_ENABLED=0
76

87
# VARIABLE REFERENCE:
98
#
@@ -32,7 +31,7 @@ tools:
3231
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.0
3332

3433
build: lintcheck
35-
go build -ldflags="-s -w" ./...
34+
CGO_ENABLED=0 go build -ldflags="-s -w" ./...
3635

3736
fmt:
3837
@echo "==> Fixing source code formatting..."
@@ -48,8 +47,8 @@ lintcheck:
4847

4948
test:
5049
@branch=$$(git rev-parse --abbrev-ref HEAD); \
51-
printf "==> Running acceptance tests on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿"
52-
go test $(TEST) \
50+
printf "==> Running unit tests on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿"
51+
CGO_ENABLED=0 go test $(TEST) \
5352
-timeout=30s \
5453
-parallel=4 \
5554
-v \
@@ -60,15 +59,15 @@ test:
6059
testacc:
6160
@branch=$$(git rev-parse --abbrev-ref HEAD); \
6261
printf "==> Running acceptance tests on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿"
63-
TF_ACC=1 go test $(TEST) -v -run '^TestAcc' $(RUNARGS) $(TESTARGS) -timeout 120m -count=1
62+
TF_ACC=1 CGO_ENABLED=0 go test $(TEST) -v -run '^TestAcc' $(RUNARGS) $(TESTARGS) -timeout 120m -count=1
6463

6564
test-compile:
6665
@if [ "$(TEST)" = "./..." ]; then \
6766
echo "ERROR: Set TEST to a specific package. For example,"; \
6867
echo " make test-compile TEST=./$(PKG_NAME)"; \
6968
exit 1; \
7069
fi
71-
go test -c $(TEST) $(TESTARGS)
70+
CGO_ENABLED=0 go test -c $(TEST) $(TESTARGS)
7271

7372
website:
7473
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))

0 commit comments

Comments
 (0)