File tree 1 file changed +17
-1
lines changed 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ func checkCounters(t *testing.T, telemetryDir string) {
411
411
})
412
412
counters := readCounters (t , telemetryDir )
413
413
if _ , ok := scriptGoInvoked .Load (testing .TB (t )); ok {
414
- if len (counters ) == 0 {
414
+ if ! disabledOnPlatform && len (counters ) == 0 {
415
415
t .Fatal ("go was invoked but no counters were incremented" )
416
416
}
417
417
}
@@ -422,3 +422,19 @@ func checkCounters(t *testing.T, telemetryDir string) {
422
422
}
423
423
}
424
424
}
425
+
426
+ // Copied from https://go.googlesource.com/telemetry/+/5f08a0cbff3f/internal/telemetry/mode.go#122
427
+ // TODO(go.dev/issues/66205): replace this with the public API once it becomes available.
428
+ //
429
+ // disabledOnPlatform indicates whether telemetry is disabled
430
+ // due to bugs in the current platform.
431
+ const disabledOnPlatform = false ||
432
+ // The following platforms could potentially be supported in the future:
433
+ runtime .GOOS == "openbsd" || // #60614
434
+ runtime .GOOS == "solaris" || // #60968 #60970
435
+ runtime .GOOS == "android" || // #60967
436
+ runtime .GOOS == "illumos" || // #65544
437
+ // These platforms fundamentally can't be supported:
438
+ runtime .GOOS == "js" || // #60971
439
+ runtime .GOOS == "wasip1" || // #60971
440
+ runtime .GOOS == "plan9" // https://github.com/golang/go/issues/57540#issuecomment-1470766639
You can’t perform that action at this time.
0 commit comments