summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_runner/run_test.ml29
1 files changed, 26 insertions, 3 deletions
diff --git a/tests/test_runner/run_test.ml b/tests/test_runner/run_test.ml
index 379abe04..52ff7276 100644
--- a/tests/test_runner/run_test.ml
+++ b/tests/test_runner/run_test.ml
@@ -3,9 +3,32 @@ let concat_path = List.fold_left Filename.concat ""
let () =
match Array.to_list Sys.argv with
(* Ad-hoc argument passing for now. *)
- | _exe_path :: aeneas_path :: tests_dir :: test_name :: subdir :: backend
- :: options ->
- let input_file = concat_path [ tests_dir; "llbc"; test_name ] ^ ".llbc" in
+ | _exe_path :: aeneas_path :: tests_dir :: test_name :: backend :: options ->
+ (* Reproduces the file layout that was set by the Makefile. FIXME: cleanup *)
+ let subdir =
+ match (backend, test_name) with
+ | "lean", "demo" -> "Demo"
+ | "lean", _ -> "."
+ | _, ("arrays" | "demo" | "hashmap" | "traits") -> test_name
+ | _, "betree_main" -> "betree"
+ | _, "betree_main-special" -> "betree_back_stateful"
+ | _, "hashmap_main" -> "hashmap_on_disk"
+ | "hol4", _ -> "misc-" ^ test_name
+ | ( _,
+ ( "bitwise" | "constants" | "external" | "loops"
+ | "no_nested_borrows" | "paper" | "polonius_list" ) ) ->
+ "misc"
+ | _ -> test_name
+ in
+
+ let test_file_name =
+ match test_name with
+ | "betree_main-special" -> "betree_main"
+ | _ -> test_name
+ in
+ let input_file =
+ concat_path [ tests_dir; "llbc"; test_file_name ] ^ ".llbc"
+ in
let dest_dir = concat_path [ "tests"; backend; subdir ] in
let args =
[| aeneas_path; input_file; "-dest"; dest_dir; "-backend"; backend |]