You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -224,17 +222,17 @@ test-release: ## - Check that all release binaries are created
224
222
# If FIPS=true unit tests need microsoft/go + OpenSSL with FIPS
225
223
.PHONY: test-unit
226
224
test-unit: prepare-test-context ## - Run unit tests only
227
-
set -o pipefail;${GOFIPSEXPERIMENT} go test${GO_TEST_FLAG} -tags=$(GOBUILDTAGS) -v -race -coverprofile=build/coverage-${OS_NAME}.out ./... | tee build/test-unit-${OS_NAME}.out
225
+
set -o pipefail;${GOFIPSEXPERIMENT}CGO_ENABLED=1 go test${GO_TEST_FLAG} -tags=$(GOBUILDTAGS) -v -race -coverprofile=build/coverage-${OS_NAME}.out ./... | tee build/test-unit-${OS_NAME}.out
228
226
229
227
# FIPS unit tests are meant to use go v1.24 to check FIPS compliance.
230
228
# This check is very strict, and should be thought of as a static-code analysis tool.
231
229
.PHONY: test-unit-fips
232
230
test-unit-fips: prepare-test-context ## - Run unit tests with go 1.24's fips140=only for testing
233
-
set -o pipefail; GOFIPS140=latest GODEBUG=fips140=only go test${GO_TEST_FLAG} -tags=$(GOBUILDTAGS) -v -race -coverprofile=build/coverage-${OS_NAME}.out ./... | tee build/test-unit-fips-${OS_NAME}.out
231
+
set -o pipefail; GOFIPS140=latest GODEBUG=fips140=only CGO_ENABLED=1 go test${GO_TEST_FLAG} -tags=$(GOBUILDTAGS) -v -race -coverprofile=build/coverage-${OS_NAME}.out ./... | tee build/test-unit-fips-${OS_NAME}.out
234
232
235
233
.PHONY: benchmark
236
234
benchmark: prepare-test-context install-benchstat ## - Run benchmark tests only
237
-
set -o pipefail; go test -bench=$(BENCHMARK_FILTER) -tags=$(GOBUILDTAGS) -run=$(BENCHMARK_FILTER)$(BENCHMARK_ARGS)$(BENCHMARK_PACKAGE)| tee "build/$(BENCH_BASE)"
235
+
set -o pipefail;CGO_ENABLED=1 go test -bench=$(BENCHMARK_FILTER) -tags=$(GOBUILDTAGS) -run=$(BENCHMARK_FILTER)$(BENCHMARK_ARGS)$(BENCHMARK_PACKAGE)| tee "build/$(BENCH_BASE)"
238
236
239
237
.PHONY: install-benchstat
240
238
install-benchstat: ## - Install the benchstat package
build-releaser: ## - Build a Docker image to run make package including all build tools
322
319
ifeq ($(shell uname -p),arm)
323
320
$(eval SUFFIX := ${CROSSBUILD_ARM_SUFFIX})
321
+
else ifeq ($(shell uname -p),aarch64)
322
+
$(eval SUFFIX := ${CROSSBUILD_ARM_SUFFIX})
324
323
else
325
324
$(eval SUFFIX := ${CROSSBUILD_SUFFIX})
326
325
endif
@@ -332,16 +331,16 @@ endif
332
331
333
332
.PHONY: docker-release
334
333
docker-release: build-releaser ## - Builds a release for all platforms in a dockerised environment
335
-
docker run --rm -u $(shell id -u):$(shell id -g) --env=GOCACHE=/go/cache --volume $(PWD):/go/src/github.com/elastic/fleet-server $(BUILDER_IMAGE) release
334
+
docker run --rm -u $(shell id -u):$(shell id -g) --env=GOCACHE=/go/cache --env='PLATFORMS=${PLATFORMS}' --volume $(PWD):/go/src/github.com/elastic/fleet-server $(BUILDER_IMAGE) release
336
335
337
336
.PHONY: docker-cover-e2e-binaries
338
337
docker-cover-e2e-binaries: build-releaser
339
338
ifeq "${FIPS}" "true"
340
339
## non-linux is currently unsupported for FIPS
341
-
docker run --rm -u $(shell id -u):$(shell id -g) --env=GOCACHE=/go/cache --volume $(PWD):/go/src/github.com/elastic/fleet-server -e SNAPSHOT=true -e DEV=$(DEV) -e FIPS=$(FIPS) $(BUILDER_IMAGE) cover-linux/$(shell go env GOARCH)
340
+
docker run --rm -u $(shell id -u):$(shell id -g) --env=GOCACHE=/go/cache --env='PLATFORMS=${PLATFORMS}' --volume $(PWD):/go/src/github.com/elastic/fleet-server -e SNAPSHOT=true -e DEV=$(DEV) -e FIPS=$(FIPS) $(BUILDER_IMAGE) cover-linux/$(shell go env GOARCH)
342
341
else
343
342
## Build for local architecture and for linux/$ARCH for docker images.
344
-
docker run --rm -u $(shell id -u):$(shell id -g) --env=GOCACHE=/go/cache --volume $(PWD):/go/src/github.com/elastic/fleet-server -e SNAPSHOT=true -e DEV=$(DEV) -e FIPS=$(FIPS) $(BUILDER_IMAGE) cover-linux/$(shell go env GOARCH) cover-$(shell go env GOOS)/$(shell go env GOARCH)
343
+
docker run --rm -u $(shell id -u):$(shell id -g) --env=GOCACHE=/go/cache --env='PLATFORMS=${PLATFORMS}' --volume $(PWD):/go/src/github.com/elastic/fleet-server -e SNAPSHOT=true -e DEV=$(DEV) -e FIPS=$(FIPS) $(BUILDER_IMAGE) cover-linux/$(shell go env GOARCH) cover-$(shell go env GOOS)/$(shell go env GOARCH)
345
344
endif
346
345
347
346
.PHONY: release
@@ -411,6 +410,7 @@ test-int-set: ## - Run integration tests without setup
0 commit comments