diff options
author | Son Ho | 2022-02-26 19:10:03 +0100 |
---|---|---|
committer | Son Ho | 2022-02-26 19:10:03 +0100 |
commit | 7063ad38f9da58f952bf4a47fbfae01163605000 (patch) | |
tree | dacff7cf5118474bb16fadea78c1e49f5c873d66 | |
parent | ba48bca05e97c8f71713c7ce972f70c521da7bfd (diff) |
Start updating the Makefile for the NLL tests
Diffstat (limited to '')
-rw-r--r-- | Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -2,10 +2,13 @@ all: build-test CHARON_HOME = ../charon CHARON_EXEC = $(CHARON_HOME)/charon -CHARON_TESTS_DIR = $(CHARON_HOME)/tests/cfim -CHARON_OPTIONS = --dest ../tests/cfim --no-code-duplication DEST_DIR = tests +# We use those variables, whose definition depends on the rule we apply +CHARON_TESTS_DIR = +CHARON_OPTIONS = +CHARON_TESTS_SRC = + # The user can specify additional translation options for Aeneas: OPTIONS ?= @@ -26,7 +29,8 @@ build: # Test the project .PHONY: test -test: build translate-no_nested_borrows translate-hashmap translate-paper +test: build translate-no_nested_borrows translate-hashmap translate-paper \ + translate-nll-betree_nll # Add specific options to some tests translate-no_nested_borrows translate-paper: \ @@ -35,13 +39,21 @@ translate-no_nested_borrows translate-paper: SUBDIR:=misc translate-hashmap: TRANS_OPTIONS:=$(TRANS_OPTIONS) -template-clauses -no-state translate-hashmap: SUBDIR:=hashmap -# Generic rule to extract the CFIM from a rust file +translate-nll-betree_nll: TRANS_OPTIONS=-test-units -no-split-files -no-state -no-decreases-clauses +translate-nll-betree_nll: SUBDIR:=misc + +# Generic rules to extract the CFIM from a rust file +# The "standard" and the nll (non-linear lifetime) tests are in separate +# directories in Charon .PHONY: gen-cfim-% +gen-cfim-%: CHARON_OPTIONS = --dest ../tests/cfim --no-code-duplication +gen-cfim-%: CHARON_TESTS_SRC = ../tests/src gen-cfim-%: build - cd $(CHARON_HOME)/charon && cargo run ../tests/src/$*.rs $(CHARON_OPTIONS) + cd $(CHARON_HOME)/charon && cargo run $(CHARON_TESTS_SRC)/$*.rs $(CHARON_OPTIONS) # Generic rule to test the translation on a CFIM file .PHONY: translate-% +translate-%: CHARON_TESTS_DIR = $(CHARON_HOME)/tests/cfim translate-%: gen-cfim-% dune exec -- src/main.exe $(CHARON_TESTS_DIR)/$*.cfim -dest $(DEST_DIR)/$(SUBDIR) $(TRANS_OPTIONS) |