aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorElliott Sales de Andrade <[email protected]>2022-05-07 19:47:59 -0400
committerAyke <[email protected]>2022-05-08 03:32:04 +0200
commite3fe6d8f37d1cb73949b21e8acb4c61a11f53357 (patch)
treeff3fb9fdced4fd6577e738e16bef563145f65964 /interp
parent5c23f6fb6c64c4de46a3cf2374490a2c3b7401f3 (diff)
downloadtinygo-e3fe6d8f37d1cb73949b21e8acb4c61a11f53357.tar.gz
tinygo-e3fe6d8f37d1cb73949b21e8acb4c61a11f53357.zip
Skip slice-copy test for LLVM < 14
Fixes #2836
Diffstat (limited to 'interp')
-rw-r--r--interp/interp_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/interp/interp_test.go b/interp/interp_test.go
index ae2635afb..a1bea65ef 100644
--- a/interp/interp_test.go
+++ b/interp/interp_test.go
@@ -3,6 +3,7 @@ package interp
import (
"io/ioutil"
"os"
+ "strconv"
"strings"
"testing"
@@ -10,6 +11,12 @@ import (
)
func TestInterp(t *testing.T) {
+ llvmVersion, err := strconv.Atoi(strings.Split(llvm.Version, ".")[0])
+ if err != nil {
+ // Note: this should never happen and if it does, it will always happen
+ // for a particular build because llvm.Version is a constant.
+ panic(err)
+ }
for _, name := range []string{
"basic",
"phi",
@@ -19,7 +26,10 @@ func TestInterp(t *testing.T) {
"revert",
"alloc",
} {
- name := name // make tc local to this closure
+ name := name // make local to this closure
+ if name == "slice-copy" && llvmVersion < 14 {
+ continue
+ }
t.Run(name, func(t *testing.T) {
t.Parallel()
runTest(t, "testdata/"+name)