diff options
| author | Paul E. Murphy <murp@ibm.com> | 2023-06-14 15:20:11 -0500 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2023-06-16 18:26:01 +0000 |
| commit | 23c5e48c4af55da0765413ef4c56360927f0961c (patch) | |
| tree | 1d70ecbbb646bc492a79c1331d807b7f58ba5808 | |
| parent | cf7ae4f1364efa0e9b93bedf127ba1ccc7664fcb (diff) | |
| download | go-23c5e48c4af55da0765413ef4c56360927f0961c.tar.xz | |
cmd/cgo/internal/testshared: strip newline from gccgo -dumpversion
Otherwise, gccgo tests may be quietly skipped.
For #60798
Change-Id: Iaad6b53c95ad4d407b917d8f62978979b82a4e81
Reviewed-on: https://go-review.googlesource.com/c/go/+/503495
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
| -rw-r--r-- | src/cmd/cgo/internal/testshared/shared_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/cgo/internal/testshared/shared_test.go b/src/cmd/cgo/internal/testshared/shared_test.go index dc880dd2c7..84c92fca80 100644 --- a/src/cmd/cgo/internal/testshared/shared_test.go +++ b/src/cmd/cgo/internal/testshared/shared_test.go @@ -748,7 +748,7 @@ func requireGccgo(t *testing.T) { if dot > 0 { output = output[:dot] } - major, err := strconv.Atoi(string(output)) + major, err := strconv.Atoi(strings.TrimSpace(string(output))) if err != nil { t.Skipf("can't parse gccgo version number %s", output) } |
