aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/testdir
AgeCommit message (Collapse)Author
2024-01-24cmd/go: add GORISCV64 environment variableMark Ryan
The variable represents the RISC-V user-mode application profile for which to compile. Valid values are rva20u64 (the default) and rva22u64. Setting GORISCV64=rva20u64 defines the riscv64.rva20u64 build tag, sets the internal variable buildcfg.GORISCV64 to 20 and defines the macro GORISCV64_rva20u64 for use in assembly language code. Setting GORISCV64=rva22u64 defines the riscv64.rva20u64 and riscv64.rva22u64 build tags, sets the internal variable buildcfg.GORISCV64 to 22 and defines the macro GORISCV64_rva22u64 for use in assembly language code. This patch only provides a mechanism for the compiler and hand-coded assembly language functions to take advantage of the RISC-V extensions mandated by the application profiles. Further patches will be required to get the compiler/assembler and assembly language functions to actually generate and use these extensions. Fixes #61476 Change-Id: I9195ae6ee71703cd2112160e89157ab63b8391af Reviewed-on: https://go-review.googlesource.com/c/go/+/541135 Reviewed-by: M Zhuo <mengzhuo1203@gmail.com> Reviewed-by: Joel Sing <joel@sing.id.au> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Wang Yaduo <wangyaduo@linux.alibaba.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: M Zhuo <mengzhuo1203@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-11-20all: add floating point option for ARM targetsLudi Rehak
This change introduces new options to set the floating point mode on ARM targets. The GOARM version number can optionally be followed by ',hardfloat' or ',softfloat' to select whether to use hardware instructions or software emulation for floating point computations, respectively. For example, GOARM=7,softfloat. Previously, software floating point support was limited to GOARM=5. With these options, software floating point is now extended to all ARM versions, including GOARM=6 and 7. This change also extends hardware floating point to GOARM=5. GOARM=5 defaults to softfloat and GOARM=6 and 7 default to hardfloat. For #61588 Change-Id: I23dc86fbd0733b262004a2ed001e1032cf371e94 Reviewed-on: https://go-review.googlesource.com/c/go/+/514907 Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
2023-10-17cmd/internal/testdir: accept build go1.x build tagCuong Manh Le
While at it, also using "slices" package to simplify code. For #63489 Change-Id: I72b325f6ad379b996c108145885fa71706f6659f Reviewed-on: https://go-review.googlesource.com/c/go/+/536055 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-08-24cmd/internal/testdir: parse past gofmt'd //go:build linesBryan C. Mills
Also gofmt a test file to make sure the parser works. Fixes #62267. Change-Id: I9b9f12b06bae7df626231000879b5ed7df3cd9ba Reviewed-on: https://go-review.googlesource.com/c/go/+/522635 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com>
2023-06-16cmd/internal/testdir: skip Test if GOROOT/test does not existBryan C. Mills
cmd/distpack removes GOROOT/test from its distribution. For #24904. Change-Id: I6d1a8c608a1a1fe3fddfe0cd5279202ea9c2b3ce Reviewed-on: https://go-review.googlesource.com/c/go/+/504058 Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-06-16reflect: fix ArenaNew to match documentationMichael Anthony Knyszek
Currently ArenaNew expects the type passed in to be a *T and it returns a *T. This does not match the function's documentation. Since this is an experiment, change ArenaNew to match the documentation. This more closely aligns ArenaNew with arena.New. (Takes a type T, returns a *T value.) Note that this is a breaking change. However, as far as pkg.go.dev can tell, there's exactly one package using it in the open source world. Also, add smoke test for the exported API, which is just a wrapper around the internal API. Clearly there's enough room for error here that it should be tested, but we don't need thorough tests at this layer because that already exists in the runtime. We just need to make sure it basically works. Fixes #60528. Change-Id: I673cc4609378380ef80648b0c2eb2928e73f49c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/501860 Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-06-14all: fix spelling errorsAlexander Yastrebov
Fix spelling errors discovered using https://github.com/codespell-project/codespell. Errors in data files and vendored packages are ignored. Change-Id: I83c7818222f2eea69afbd270c15b7897678131dc GitHub-Last-Rev: 3491615b1b82832cc0064f535786546e89aa6184 GitHub-Pull-Request: golang/go#60758 Reviewed-on: https://go-review.googlesource.com/c/go/+/502576 Auto-Submit: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
2023-05-26cmd/internal/testdir: stop manually adding GOROOT/bin to PATHDmitri Shuralyov
The go command already places $GOROOT/bin at the beginning of $PATH in the test's environment as of Go 1.19¹, so there's no need for the test to do it anymore. Start enjoying yet another benefit of using 'go test'. ¹ See go.dev/issue/57050. For #56844. Change-Id: If7732cd8b8979eabf185485d3c73858a4e546d69 Reviewed-on: https://go-review.googlesource.com/c/go/+/498271 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-05-24Revert "cmd/compile: enable printing of error URLs by default"Robert Griesemer
This reverts commit e7a9ca0a53db4b4f357b5d3caaef65e44ce08a90. Reason for revert: Decided to delay to Go 1.22. Change-Id: I4635cb4c1372b54cac573041be8a43e294de5183 Reviewed-on: https://go-review.googlesource.com/c/go/+/497975 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
2023-05-24cmd/compile: enable printing of error URLs by defaultRobert Griesemer
Change-Id: Ib4094c70b8aa5e818f9f017c59d464d4c178169d Reviewed-on: https://go-review.googlesource.com/c/go/+/497716 Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-05-12internal/testdir: move to cmd/internal/testdirDmitri Shuralyov
The effect and motivation is for the test to be selected when doing 'go test cmd' and not when doing 'go test std' since it's primarily about testing the Go compiler and linker. Other than that, it's run by all.bash and 'go test std cmd' as before. For #56844. Fixes #60059. Change-Id: I2d499af013f9d9b8761fdf4573f8d27d80c1fccf Reviewed-on: https://go-review.googlesource.com/c/go/+/493876 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>