Skip to content

Commit

Permalink
feat: update BBCStepTester
Browse files Browse the repository at this point in the history
  • Loading branch information
Docker committed Oct 20, 2023
1 parent 28f3b45 commit 68be93b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# Picked from https://stackoverflow.com/questions/714100/os-detecting-makefile
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
BIN_FORMAT = elf64
CFLAGS ?= -z notext -g
endif
ifeq ($(UNAME_S),Darwin) # for mac
BIN_FORMAT = macho64
CFLAGS ?= -Wl,-no_pie
endif

F = # nothing by default
src = # nothing by default

Expand Down Expand Up @@ -36,4 +25,5 @@ clean: clean-tests
dune clean

clean-tests:
find bbctests/ -type f -regex '.*\.\(o\|s\|run\|result\)' -delete
rm -f bbctests/*.s bbctests/*.o bbctests/*.run bbctests/*.result bbctests/*~
rm -rf bbctests/*dSYM
14 changes: 7 additions & 7 deletions execs/run_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ let () =

let bbc_tests =
let name : string = "compare" in
let runtime : runtime = compileout in
let oracle : oracle = Expected in
let runtime : runtime = Runtime compileout in
let action : action = Compare in
tests_from_dir ~name ~compiler ~oracle ~runtime ~ action "bbctests" in
let action : action = CompareOutput in
tests_from_dir ~name ~compiler ~runtime ~oracle ~ action "bbctests" in

let verify_tests =
let command =
let runtime =
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 command in
let action : action = Execute in
tests_from_dir ~name ~compiler ~oracle ~runtime ~action "bbctests" in
let action : action = IgnoreOutput in
tests_from_dir ~name ~compiler ~runtime ~oracle ~action "bbctests" in

run "Tests corewars-compiler" (ocaml_tests @ bbc_tests @ verify_tests)

0 comments on commit 68be93b

Please sign in to comment.