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
cmd/go: add file with list of all counters we collect
Maintain a list of counters we collect and test that it hasn't
changed. If it has, fail a test and have the user update the list. The
update process will print a reminder to update the list of collected
counters.
Also run go mod vendor to pull in
golang.org/x/telemetry/counter/countertest.
For #58894
Change-Id: I661a9c3d67cb33f42a5519f4639af7aa05c3821d
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/564555
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Copy file name to clipboardExpand all lines: src/cmd/go/script_test.go
+62-2
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ import (
13
13
"bufio"
14
14
"bytes"
15
15
"context"
16
+
_ "embed"
16
17
"flag"
17
18
"internal/testenv"
18
19
"internal/txtar"
@@ -21,6 +22,7 @@ import (
21
22
"path/filepath"
22
23
"runtime"
23
24
"strings"
25
+
"sync"
24
26
"testing"
25
27
"time"
26
28
@@ -29,6 +31,8 @@ import (
29
31
"cmd/go/internal/script"
30
32
"cmd/go/internal/script/scripttest"
31
33
"cmd/go/internal/vcweb/vcstest"
34
+
35
+
"golang.org/x/telemetry/counter/countertest"
32
36
)
33
37
34
38
vartestSum=flag.String("testsum", "", `may be tidy, listm, or listall. If set, TestScript generates a go.sum file at the beginning of each test and updates test files if they pass.`)
0 commit comments