Skip to content

Commit

Permalink
Disable CGO when running unit-tests
Browse files Browse the repository at this point in the history
When running unit-tests, go tries to compile using CGO, despite not needing it.
This can lead to errors on systems not having gcc installed, or named wrongly.

Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
  • Loading branch information
jschintag committed Dec 3, 2024
1 parent c2d9ba6 commit 37e3cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $(GO):

# Run unit tests
test: $(GO)
$(GO) test ./pkg/... -coverprofile cover.out
CGO_ENABLED=0 $(GO) test ./pkg/... -coverprofile cover.out

# Run e2e tests
functest: $(GO)
Expand Down

0 comments on commit 37e3cac

Please sign in to comment.