From e3fe6d8f37d1cb73949b21e8acb4c61a11f53357 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 7 May 2022 19:47:59 -0400 Subject: Skip slice-copy test for LLVM < 14 Fixes #2836 --- interp/interp_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'interp') 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) -- cgit v1.2.3