Skip to content

Commit

Permalink
os: skip TestExecutableDeleted earlier when 'go build' is not supported
Browse files Browse the repository at this point in the history
The test unconditionally calls testenv.GoToolPath, which will skip the
test anyway. Moving the skip earlier gets this test out of goroutine
dumps if the test process fails or times out, making it easier to
diagnose failures in the remaining tests.

Change-Id: Ibd39546708a83b6f15616b2c4ae7af420e2401f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/475455
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
  • Loading branch information
Bryan C. Mills authored and gopherbot committed Mar 10, 2023
1 parent d12fe60 commit 53c91f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/executable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func init() {
}

func TestExecutableDeleted(t *testing.T) {
testenv.MustHaveExec(t)
testenv.MustHaveGoBuild(t)
switch runtime.GOOS {
case "windows", "plan9":
t.Skipf("%v does not support deleting running binary", runtime.GOOS)
Expand Down

0 comments on commit 53c91f9

Please sign in to comment.