From f9f5ae59a69e8552df4a94e3300689f934366810 Mon Sep 17 00:00:00 2001 From: Afonso Bordado Date: Wed, 1 Sep 2021 14:42:02 +0100 Subject: [PATCH] cranelift: Merge interpreter tests with runtests (#3252) Almost all the tests in the interpreter are already in the runtests folder so that we can reuse them for the backends. The distinction between interpreter tests and runtests is no longer very clear, since they should both support the same clif code, and produce the same results. We only have two test files: * `add.clif` tests the add and jump instruction, both of which are already covered in other test files, so we remove that file. * `fibonacci.clif` does a recursive call which is currently not supported in the filetest environment, so we keep this test interpreter only for now. --- cranelift/filetests/filetests/interpreter/add.clif | 13 ------------- .../{interpreter => runtests}/fibonacci.clif | 0 2 files changed, 13 deletions(-) delete mode 100644 cranelift/filetests/filetests/interpreter/add.clif rename cranelift/filetests/filetests/{interpreter => runtests}/fibonacci.clif (100%) diff --git a/cranelift/filetests/filetests/interpreter/add.clif b/cranelift/filetests/filetests/interpreter/add.clif deleted file mode 100644 index d95298ad84..0000000000 --- a/cranelift/filetests/filetests/interpreter/add.clif +++ /dev/null @@ -1,13 +0,0 @@ -test interpret - -function %add() -> i32 { -block0: - v0 = iconst.i32 40 - v1 = iconst.i32 2 - v2 = iadd v0, v1 - jump block1(v2) - -block1(v3: i32): - return v3 -} -; run: %add() == 42 diff --git a/cranelift/filetests/filetests/interpreter/fibonacci.clif b/cranelift/filetests/filetests/runtests/fibonacci.clif similarity index 100% rename from cranelift/filetests/filetests/interpreter/fibonacci.clif rename to cranelift/filetests/filetests/runtests/fibonacci.clif