]> Cypherpunks repositories - gostls13.git/commit
cmd/dist: log CPU model when testing
authorMichael Pratt <mpratt@google.com>
Mon, 13 Dec 2021 22:32:07 +0000 (17:32 -0500)
committerMichael Pratt <mpratt@google.com>
Tue, 8 Mar 2022 21:35:32 +0000 (21:35 +0000)
commit67f1a436b9c4055e02d9d031c6c2e9d6c9456bf0
treecc4cec6b55c28ffb1cb18c24a17c61256989232b
parentbd77d6e24048e5a8b7b07d2d0b7cf552d21905f5
cmd/dist: log CPU model when testing

Knowing whether test failures are correlated with specific CPU models on
has proven useful on several issues. Log it for prior to testing so it
is always available.

internal/sysinfo provides the CPU model, but it is not available in the
bootstrap toolchain, so we can't access this in cmd/dist. Instead use a
separate binary which cmd/dist will only build once testing begins.

The addition of new data to the beginning of cmd/dist output will break
x/build/cmd/coordinator's banner parsing, leaving extra lines in the log
output, though information will not be lost.
https://golang.org/cl/372538 fixes up the coordinator and should be
submitted and deployed before this CL is submitted.

This is a redo of CL 371474. It switches back to the original approach
of using a separate binary, as the bootstap toolchain won't allow
cmd/dist to import internal packages.

For #46272.
For #49209.
For #50146.

Change-Id: I906bbda987902a2120c5183290a4e89a2440de58
Reviewed-on: https://go-review.googlesource.com/c/go/+/378589
Reviewed-by: Austin Clements <austin@google.com>
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/dist/test.go
src/cmd/internal/metadata/main.go [new file with mode: 0644]