From: Alex Brainman Date: Sun, 25 Apr 2021 08:26:30 +0000 (+1000) Subject: runtime: replace --buildmode with -buildmode in tests X-Git-Tag: go1.17beta1~434 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e0815d041c;p=gostls13.git 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 --- diff --git a/src/runtime/signal_windows_test.go b/src/runtime/signal_windows_test.go index d0f61fb6c2..1b7cb9d4c4 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)