Skip to content

Commit adf220a

Browse files
matloobgopherbot
authored andcommitted
cmd/go/testdata/script: skip part of test on unsupported platforms
The telemetry script test checks for the existence of telemetry data as a baseline before checking that the act of setting telemtetry to off while in local mode doesn't produce telemetry data. Of course, when we're running on platforms where telemetry is not supported, telemetry data won't be produced on disk either way. Only check for the existence of telemetry data on supported platforms. For #69269 Change-Id: I3a06bbc3d3ca0cf0203b84883f632ecfd9445aae Reviewed-on: https://go-review.googlesource.com/c/go/+/611876 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Michael Matloob <[email protected]>
1 parent cc912bd commit adf220a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cmd/go/testdata/script/telemetry.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ stderr '^go: GOTELEMETRYDIR cannot be modified$'
5252

5353
# Test issue #69269: 'go telemetry off' should not increment counters.
5454
# Establish that previous commands did write telemetry files.
55-
exists $userconfig/go/telemetry/local
55+
# Only check for the existence of telemetry data on supported platforms.
56+
[!GOOS:openbsd] [!GOOS:solaris] [!GOOS:android] [!GOOS:illumos] [!GOOS:js] [!GOOS:wasip1] [!GOOS:plan9] [!GOARCH:mips] [!GOARCH:mipsle] exists $userconfig/go/telemetry/local
5657
# Now check for go telemetry off behavior.
5758
rm $userconfig/go/telemetry/local
5859
go telemetry off
@@ -66,4 +67,4 @@ go telemetry -C=$WORK off
6667
! exists $userconfig/go/telemetry/local
6768
go telemetry local
6869
go help telemetry
69-
exists $userconfig/go/telemetry/local
70+
[!GOOS:openbsd] [!GOOS:solaris] [!GOOS:android] [!GOOS:illumos] [!GOOS:js] [!GOOS:wasip1] [!GOOS:plan9] [!GOARCH:mips] [!GOARCH:mipsle] exists $userconfig/go/telemetry/local

0 commit comments

Comments
 (0)