From e0815d041c55dad8ae5642466b08fc2f520a59d4 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Sun, 25 Apr 2021 18:26:30 +1000 Subject: [PATCH] runtime: replace --buildmode with -buildmode in tests While debugging issue #45638, I discovered that some tests were using --buildmode command line parameter instead of -buildmode. The --buildmode parameter is handled properly by the flag package - it is read as -buildmode. But we should correct code anyway. Updates #45638 Change-Id: I75cf95c7d11dcdf4aeccf568b2dea77bd8942352 Reviewed-on: https://go-review.googlesource.com/c/go/+/313351 Trust: Alex Brainman Run-TryBot: Alex Brainman TryBot-Result: Go Bot Reviewed-by: Michael Knyszek --- src/runtime/signal_windows_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/signal_windows_test.go b/src/runtime/signal_windows_test.go index d0f61fb6c29..1b7cb9d4c45 100644 --- a/src/runtime/signal_windows_test.go +++ b/src/runtime/signal_windows_test.go @@ -32,7 +32,7 @@ func TestVectoredHandlerDontCrashOnLibrary(t *testing.T) { // build go dll dll := filepath.Join(dir, "testwinlib.dll") - cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", dll, "--buildmode", "c-shared", "testdata/testwinlib/main.go") + cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", dll, "-buildmode", "c-shared", "testdata/testwinlib/main.go") out, err := testenv.CleanCmdEnv(cmd).CombinedOutput() if err != nil { t.Fatalf("failed to build go library: %s\n%s", err, out) @@ -156,7 +156,7 @@ func TestLibraryCtrlHandler(t *testing.T) { // build go dll dll := filepath.Join(dir, "dummy.dll") - cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", dll, "--buildmode", "c-shared", "testdata/testwinlibsignal/dummy.go") + cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", dll, "-buildmode", "c-shared", "testdata/testwinlibsignal/dummy.go") out, err := testenv.CleanCmdEnv(cmd).CombinedOutput() if err != nil { t.Fatalf("failed to build go library: %s\n%s", err, out)