diff options
| author | Joel Sing <joel@sing.id.au> | 2025-12-21 14:48:18 +1100 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-12-23 10:45:48 -0800 |
| commit | 2485a0bc2cf87837d5e610eed584d8d7ab5831d0 (patch) | |
| tree | b2a9c5de5bc020dcabf45dbf74042b6c2071ab2d /src/cmd | |
| parent | 8254d66eab23bf334d619d888dc98630c1c5c5fd (diff) | |
| download | go-2485a0bc2cf87837d5e610eed584d8d7ab5831d0.tar.xz | |
cmd/asm/internal/asm: run riscv64 end-to-end tests for each profile
Currently, the end-to-end tests are only run for the profile set
via GORISCV64. Run each of the end-to-end tests for each profile,
increasing test coverage. Also rename tests to be RISCV64 specific,
rather than RISCV.
Change-Id: I15a70939064122c79ec5f2edcda1fa2a47c8cc95
Reviewed-on: https://go-review.googlesource.com/c/go/+/731921
Auto-Submit: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/asm/internal/asm/endtoend_test.go | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/src/cmd/asm/internal/asm/endtoend_test.go b/src/cmd/asm/internal/asm/endtoend_test.go index 0610a2d192..28dce50d60 100644 --- a/src/cmd/asm/internal/asm/endtoend_test.go +++ b/src/cmd/asm/internal/asm/endtoend_test.go @@ -491,16 +491,35 @@ func TestPPC64EndToEnd(t *testing.T) { } } -func TestRISCVEndToEnd(t *testing.T) { - testEndToEnd(t, "riscv64", "riscv64") +func testRISCV64AllProfiles(t *testing.T, testFn func(t *testing.T)) { + t.Helper() + + defer func(orig int) { buildcfg.GORISCV64 = orig }(buildcfg.GORISCV64) + + for _, goriscv64 := range []int{20, 22, 23} { + t.Run(fmt.Sprintf("rva%vu64", goriscv64), func(t *testing.T) { + buildcfg.GORISCV64 = goriscv64 + testFn(t) + }) + } +} + +func TestRISCV64EndToEnd(t *testing.T) { + testRISCV64AllProfiles(t, func(t *testing.T) { + testEndToEnd(t, "riscv64", "riscv64") + }) } -func TestRISCVErrors(t *testing.T) { - testErrors(t, "riscv64", "riscv64error") +func TestRISCV64Errors(t *testing.T) { + testRISCV64AllProfiles(t, func(t *testing.T) { + testErrors(t, "riscv64", "riscv64error") + }) } -func TestRISCVValidation(t *testing.T) { - testErrors(t, "riscv64", "riscv64validation") +func TestRISCV64Validation(t *testing.T) { + testRISCV64AllProfiles(t, func(t *testing.T) { + testErrors(t, "riscv64", "riscv64validation") + }) } func TestS390XEndToEnd(t *testing.T) { |
