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.
diff --git a/src/cmd/asm/internal/asm/endtoend_test.go b/src/cmd/asm/internal/asm/endtoend_test.go
index 944a7e6..ed44c4d 100644
--- a/src/cmd/asm/internal/asm/endtoend_test.go
+++ b/src/cmd/asm/internal/asm/endtoend_test.go
@@ -491,16 +491,35 @@
}
}
-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 TestRISCVErrors(t *testing.T) {
- testErrors(t, "riscv64", "riscv64error")
+func TestRISCV64EndToEnd(t *testing.T) {
+ testRISCV64AllProfiles(t, func(t *testing.T) {
+ testEndToEnd(t, "riscv64", "riscv64")
+ })
}
-func TestRISCVValidation(t *testing.T) {
- testErrors(t, "riscv64", "riscv64validation")
+func TestRISCV64Errors(t *testing.T) {
+ testRISCV64AllProfiles(t, func(t *testing.T) {
+ testErrors(t, "riscv64", "riscv64error")
+ })
+}
+
+func TestRISCV64Validation(t *testing.T) {
+ testRISCV64AllProfiles(t, func(t *testing.T) {
+ testErrors(t, "riscv64", "riscv64validation")
+ })
}
func TestS390XEndToEnd(t *testing.T) {
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +2 |
LGTM
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |