|
1 | | -.PHONY: all all-common clean ebpf generate test test-deps protobuf docker-image agent legal \ |
2 | | - integration-test-binaries codespell lint linter-version debug debug-agent ebpf-profiler \ |
3 | | - format-ebpf rust-components rust-targets rust-tests vanity-import-check vanity-import-fix |
| 1 | +.PHONY: all all-common clean ebpf generate test test-deps \ |
| 2 | + test-junit protobuf docker-image agent legal integration-test-binaries \ |
| 3 | + codespell lint linter-version debug debug-agent ebpf-profiler format-ebpf \ |
| 4 | + rust-components rust-targets rust-tests vanity-import-check vanity-import-fix |
4 | 5 |
|
5 | 6 | SHELL := /usr/bin/env bash |
6 | 7 |
|
@@ -49,6 +50,8 @@ GO_FLAGS := -buildvcs=false -ldflags="$(LDFLAGS)" |
49 | 50 |
|
50 | 51 | MAKEFLAGS += -j$(shell nproc) |
51 | 52 |
|
| 53 | +JUNIT_OUT_DIR ?= /tmp/testresults |
| 54 | + |
52 | 55 | all: ebpf-profiler |
53 | 56 |
|
54 | 57 | debug: GO_TAGS := $(GO_TAGS),debugtracer |
@@ -106,6 +109,11 @@ test: generate ebpf test-deps |
106 | 109 | # tools/coredump tests build ebpf C-code using CGO to test it against coredumps |
107 | 110 | CGO_ENABLED=1 go test $(GO_FLAGS) -tags $(GO_TAGS) ./... |
108 | 111 |
|
| 112 | +test-junit: generate ebpf test-deps |
| 113 | + mkdir -p $(JUNIT_OUT_DIR) |
| 114 | + go install gotest.tools/gotestsum@latest |
| 115 | + CGO_ENABLED=1 gotestsum --junitfile $(JUNIT_OUT_DIR)/junit.xml -- $(GO_FLAGS) -tags $(GO_TAGS) ./... |
| 116 | + |
109 | 117 | # This target isn't called from CI, it doesn't work for cross compile (ie TARGET_ARCH=arm64 on |
110 | 118 | # amd64) and the CI kernel tests run them already. Useful for local testing. |
111 | 119 | sudo-golabels-test: integration-test-binaries |
|
0 commit comments