diff options
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/crash_test.go | 4 | ||||
| -rw-r--r-- | src/runtime/debug/example_monitor_test.go | 2 | ||||
| -rw-r--r-- | src/runtime/syscall_windows_test.go | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 00e84a3879..0265c28be1 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -901,7 +901,7 @@ func TestRuntimePanic(t *testing.T) { } func TestTracebackRuntimeFunction(t *testing.T) { - cmd := testenv.CleanCmdEnv(exec.Command(testenv.Executable(t), "-test.run=TestTracebackRuntimeFunction")) + cmd := testenv.CleanCmdEnv(exec.Command(testenv.Executable(t), "-test.run=^TestTracebackRuntimeFunction$")) cmd.Env = append(cmd.Env, "GO_TEST_RUNTIME_NPE_READMEMSTATS=1") out, err := cmd.CombinedOutput() t.Logf("%s", out) @@ -913,7 +913,7 @@ func TestTracebackRuntimeFunction(t *testing.T) { } func TestTracebackRuntimeMethod(t *testing.T) { - cmd := testenv.CleanCmdEnv(exec.Command(testenv.Executable(t), "-test.run=TestTracebackRuntimeMethod")) + cmd := testenv.CleanCmdEnv(exec.Command(testenv.Executable(t), "-test.run=^TestTracebackRuntimeMethod$")) cmd.Env = append(cmd.Env, "GO_TEST_RUNTIME_NPE_FUNCMETHOD=1") out, err := cmd.CombinedOutput() t.Logf("%s", out) diff --git a/src/runtime/debug/example_monitor_test.go b/src/runtime/debug/example_monitor_test.go index b077e7adb3..3b8f4dccd9 100644 --- a/src/runtime/debug/example_monitor_test.go +++ b/src/runtime/debug/example_monitor_test.go @@ -83,7 +83,7 @@ func monitor() { if err != nil { log.Fatal(err) } - cmd := exec.Command(exe, "-test.run=ExampleSetCrashOutput_monitor") + cmd := exec.Command(exe, "-test.run=^ExampleSetCrashOutput_monitor$") cmd.Env = append(os.Environ(), monitorVar+"=1") cmd.Stderr = os.Stderr cmd.Stdout = os.Stderr diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go index 7a7269d125..6709267403 100644 --- a/src/runtime/syscall_windows_test.go +++ b/src/runtime/syscall_windows_test.go @@ -657,7 +657,7 @@ func TestWERDialogue(t *testing.T) { if err != nil { t.Fatal(err) } - cmd := testenv.CleanCmdEnv(testenv.Command(t, exe, "-test.run=TestWERDialogue")) + cmd := testenv.CleanCmdEnv(testenv.Command(t, exe, "-test.run=^TestWERDialogue$")) cmd.Env = append(cmd.Env, "TEST_WER_DIALOGUE=1", "GOTRACEBACK=wer") // Child process should not open WER dialogue, but return immediately instead. // The exit code can't be reliably tested here because Windows can change it. @@ -1043,7 +1043,7 @@ func TestNumCPU(t *testing.T) { _GetProcessAffinityMask := kernel32.MustFindProc("GetProcessAffinityMask") _SetProcessAffinityMask := kernel32.MustFindProc("SetProcessAffinityMask") - cmd := exec.Command(testenv.Executable(t), "-test.run=TestNumCPU") + cmd := exec.Command(testenv.Executable(t), "-test.run=^TestNumCPU$") cmd.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=1") var buf strings.Builder cmd.Stdout = &buf |
