From 76a42d74356e3c5bee0851c99665b21bf29f0c27 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 29 Aug 2024 18:23:25 -0700 Subject: internal/testenv: add missing t.Helper calls ...and move a few so they won't be called when not needed. Change-Id: I024b9552ed5ed839cde4fbae4815ec6ba8b67265 Reviewed-on: https://go-review.googlesource.com/c/go/+/609300 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- src/internal/testenv/exec.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/internal/testenv/exec.go') diff --git a/src/internal/testenv/exec.go b/src/internal/testenv/exec.go index 0e6a5f9a1a..9f21b323ab 100644 --- a/src/internal/testenv/exec.go +++ b/src/internal/testenv/exec.go @@ -32,6 +32,7 @@ import ( // for the resulting error. func MustHaveExec(t testing.TB) { if err := tryExec(); err != nil { + t.Helper() t.Skipf("skipping test: cannot exec subprocess on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) } } @@ -103,6 +104,7 @@ func MustHaveExecPath(t testing.TB, path string) { err, _ = execPaths.LoadOrStore(path, err) } if err != nil { + t.Helper() t.Skipf("skipping test: %s: %s", path, err) } } -- cgit v1.3