]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: replace --buildmode with -buildmode in tests
authorAlex Brainman <alex.brainman@gmail.com>
Sun, 25 Apr 2021 08:26:30 +0000 (18:26 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 27 Apr 2021 08:39:25 +0000 (08:39 +0000)
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 <alex.brainman@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/signal_windows_test.go

index d0f61fb6c29f6af9f9ad9409b1c15dbfa84e440c..1b7cb9d4c453aeb930fbe11a5403205a1b643ace 100644 (file)
@@ -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)