summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSon Ho2022-02-04 23:18:32 +0100
committerSon Ho2022-02-04 23:18:32 +0100
commit63dbf03303afa9c433595a25d0bab78d9d29561b (patch)
tree21548b8b5656ccd1ec3b478c3aed55f6fa9db44c /Makefile
parentf4264098f3e3e1b843316227c79eeb0804a5518a (diff)
Update the Makefile
Diffstat (limited to '')
-rw-r--r--Makefile22
1 files changed, 12 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index e47a170d..3ab65a08 100644
--- a/Makefile
+++ b/Makefile
@@ -4,30 +4,32 @@ CHARON_HOME=../charon/charon
CHARON_TESTS_DIR=$(CHARON_HOME)/tests
RS_TEST_FILE=tests/no_nested_borrows.rs
CFIM_TEST_FILE=$(CHARON_TESTS_DIR)/no_nested_borrows.cfim
+DEST_DIR=tests/
+
+# Build the project
+.PHONY: build
+build:
+ dune build src/main.exe
# Build the project and run the executable
.PHONY: build-run
-build-run:
- dune build src/main.exe && dune exec src/main.exe
+build-run: build
+ dune exec -- src/main.exe $(CFIM_TEST_FILE) -dest $(DEST_DIR) > tests/trace_current.txt
# Build the project and run the executable, then check that the behaviour
# of the interpreter didn't change by comparing the newly generated trace
# with a reference.
.PHONY: build-run-check-trace
-build-run-check-trace: generate-cfim
- dune build src/main.exe && \
- dune exec src/main.exe $(CFIM_TEST_FILE) > tests/trace_current.txt && \
+build-run-check-trace: generate-cfim build-run
cmp tests/trace_reference.txt tests/trace_current.txt && \
- cp fstar/Primitives.fst $(CHARON_TESTS_DIR)
+ cp fstar/Primitives.fst $(DEST_DIR)
# Build the project and update the trace
.PHONY: regen-trace
-regen-trace: generate-cfim
- dune build src/main.exe && \
- dune exec src/main.exe $(CFIM_TEST_FILE) > tests/trace_current.txt && \
+regen-trace: generate-cfim build-run
rm -f tests/trace_reference.txt && \
cp tests/trace_current.txt tests/trace_reference.txt && \
- cp fstar/Primitives.fst $(CHARON_TESTS_DIR)
+ cp fstar/Primitives.fst $(DEST_DIR)
.PHONY: generate-cfim
generate-cfim: