Skip to content

Commit

Permalink
Add tests suite in Makefile (alpha version, in progress)
Browse files Browse the repository at this point in the history
  • Loading branch information
epatrizio committed Mar 19, 2022
1 parent f53e2c9 commit a99421c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
VM=./mini-zam/vm/minizam
VM_DEBUG=./mini-zam/vm/minizam-debug
EXE=c2mz
RED=\033[0;31m
GREEN=\033[0;32m
NC=\033[0m # No Color

all:
ocamlc -c utils.ml;
Expand Down Expand Up @@ -36,5 +39,13 @@ cvm: compile vm

cvm_debug: compile vm_debug

test:
$(eval RES := $(shell S=$(S) make cvm))
@if [ $(RES) = ${R} ]; then echo "$(GREEN)$(S) PASSED$(NC)"; else echo "$(RED)$(S) FAILED $(RES)<>$(R)$(NC)"; fi

# KO > todo
tests_suite: clean_bc
$(MAKE) test R=5 S=t0.txt

vm_demo:
$(VM) tests/build/demo-bytecode.txt

0 comments on commit a99421c

Please sign in to comment.