kubernetes/hack/make-rules
Patrick Ohly a7da865aa8 test: filter "go test" output with gotestsum instead of grep
Filtering the output with grep leads to hard to read log output, e.g. from
pull-kubernetes-unit:

    +++ [0613 15:32:48] Running tests without code coverage and with -race
    {"Time":"2024-06-13T15:33:47.845457374Z","Action":"output","Package":"k8s.io/kubernetes/cluster/gce/cos","Test":"TestCreateMasterAuditPolicy","Output":"        /tmp/configure-helper-test47992121/kube-env: line 1: `}'\n"}
    {"Time":"2024-06-13T15:33:49.053732803Z","Action":"output","Package":"k8s.io/kubernetes/cluster/gce/cos","Output":"ok  \tk8s.io/kubernetes/cluster/gce/cos\t2.906s\n"}

We can do better than that. When feeding the output of the "go test" command(s)
into gotestsum *while it runs*, we can use --format=standard-quiet (= normal go
test output) or --format=standard-verbose (= `go test -v`) when FULL_LOG is
requested to get nicer output.

This works when testing everything at once. This was said to be not possible
when doing coverage profiling. But recent Go no longer has that limitation, so
the xargs trick gets removed. All that we need to do for coverage profiling is
to add some additional parameters and the conversion to HTML.
2024-08-19 16:14:05 +02:00
..
build.sh hacks: build main target without go in the PATH 2024-04-05 17:36:57 +03:00
clean.sh Simpler and less noisy make-clean 2023-12-08 09:20:44 -08:00
cross.sh fix shellcheck in hack/make-rules/... 2019-02-26 00:56:36 -05:00
make-help.sh avoid masking return values in hack/make-rules/make-help.sh 2022-10-19 23:46:18 -07:00
test-cmd.sh Restore honoring --version build ID overrides 2024-08-13 21:52:58 -04:00
test-e2e-node.sh e2e node: support running the test binary under a debugger 2024-04-16 11:46:28 +02:00
test-integration.sh Fix make test-integration for workspaces 2024-02-29 22:06:57 -08:00
test.sh test: filter "go test" output with gotestsum instead of grep 2024-08-19 16:14:05 +02:00
update.sh Generate go.work files 2024-02-29 00:22:06 -08:00
verify.sh Verify: add static analysis to verify new feature gates are added as versioned feature specs. 2024-08-01 13:52:32 -07:00
vet.sh staging: fix "go vet" issues 2023-03-03 07:51:04 +01:00