diff options
Diffstat (limited to 'src/testing/flag_test.go')
| -rw-r--r-- | src/testing/flag_test.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/testing/flag_test.go b/src/testing/flag_test.go index 6f76c237c4..6a7754425d 100644 --- a/src/testing/flag_test.go +++ b/src/testing/flag_test.go @@ -28,11 +28,7 @@ func TestFlag(t *testing.T) { flag := flag t.Run(flag, func(t *testing.T) { t.Parallel() - exe, err := os.Executable() - if err != nil { - exe = os.Args[0] - } - cmd := exec.Command(exe, "-test.run=^TestFlag$", "-test_flag_arg="+flag) + cmd := exec.Command(testenv.Executable(t), "-test.run=^TestFlag$", "-test_flag_arg="+flag) if flag != "" { cmd.Args = append(cmd.Args, flag) } |
