From 28f3b456fddad1b962bf09229630970ccf1e6a85 Mon Sep 17 00:00:00 2001 From: Docker Date: Thu, 19 Oct 2023 22:25:12 +0100 Subject: [PATCH] fix: add test names --- dev/compile.ml | 1 - execs/run_test.ml | 13 ++++++++----- rt/94b.opt | 8 -------- rt/{ => pmars-0.9.4}/pmars | Bin 4 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 rt/94b.opt rename rt/{ => pmars-0.9.4}/pmars (100%) diff --git a/dev/compile.ml b/dev/compile.ml index cb7e05a..d8414db 100644 --- a/dev/compile.ml +++ b/dev/compile.ml @@ -155,7 +155,6 @@ let rec compile_expr (e : tag eexpr) (env : env) : instruction list = let prelude = " ;redcode-94b - " let epilogue = [INSTR (IDAT, RN, RNone, RNone)] diff --git a/execs/run_test.ml b/execs/run_test.ml index 73a44fb..545fede 100644 --- a/execs/run_test.ml +++ b/execs/run_test.ml @@ -37,16 +37,19 @@ let () = Compiler (fun s o -> fprintf o "%s" (compile_prog (parse_exp (sexp_from_string s))) ) in let bbc_tests = + let name : string = "compare" in let oracle : oracle = Expected in let runtime : runtime = Runtime compileout in let action : action = Compare in - tests_from_dir ~compiler ~oracle ~runtime ~ action "bbctests" in + tests_from_dir ~name ~compiler ~oracle ~runtime ~ action "bbctests" in let verify_tests = + let command = + unixcommand (fun s -> CCUnix.call "rt/pmars-0.9.4/pmars -A -@ rt/pmars-0.9.4/config/94b.opt %s" s) in + let name : string = "execute" in let oracle : oracle = Expected in - let runtime : runtime = - Runtime (unixcommand (fun s -> CCUnix.call "rt/pmars -A -@ rt/94b.opt %s" s)) in + let runtime : runtime = Runtime command in let action : action = Execute in - tests_from_dir ~compiler ~oracle ~runtime ~action "bbctests" in + tests_from_dir ~name ~compiler ~oracle ~runtime ~action "bbctests" in - run "Tests corewars-compiler" (ocaml_tests @ verify_tests) + run "Tests corewars-compiler" (ocaml_tests @ bbc_tests @ verify_tests) diff --git a/rt/94b.opt b/rt/94b.opt deleted file mode 100644 index aed87dc..0000000 --- a/rt/94b.opt +++ /dev/null @@ -1,8 +0,0 @@ -;redcode-94b -;SAL's Beginners' Hill Specs -;use pmars -@ 94b.opt file1 [files...] - --s 8000 ;coresize --p 8000 ;max. processes --c 80000 ;cycles --l 100 ;warrior length diff --git a/rt/pmars b/rt/pmars-0.9.4/pmars similarity index 100% rename from rt/pmars rename to rt/pmars-0.9.4/pmars