Skip to content
Snippets Groups Projects
Commit 6742723f authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[aorai] use global wp-cache for caching results

parent a39c8e88
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 41 deletions
...@@ -117,6 +117,16 @@ CONFIG_STATUS_DIR=. ...@@ -117,6 +117,16 @@ CONFIG_STATUS_DIR=.
AORAI_WP_SHARE= AORAI_WP_SHARE=
endif endif
TEST_DEPENDENCIES:= \
$(Aorai_DIR)/tests/Aorai_test.cmxs \
$(Aorai_DIR)/tests/Aorai_test.cmo \
$(Aorai_DIR)/tests/ya/name_projects.cmxs \
$(Aorai_DIR)/tests/ya/name_projects.cmo
Aorai_DEFAULT_TESTS: $(TEST_DEPENDENCIES)
# 'prove' ptests config: ensure ACSL and C instrumentation coincide
$(Aorai_DIR)/tests/ptests_config: $(Aorai_DIR)/tests/test_config_prove $(Aorai_DIR)/tests/ptests_config: $(Aorai_DIR)/tests/test_config_prove
$(Aorai_DIR)/tests/test_config_prove: \ $(Aorai_DIR)/tests/test_config_prove: \
...@@ -126,7 +136,14 @@ $(Aorai_DIR)/tests/test_config_prove: \ ...@@ -126,7 +136,14 @@ $(Aorai_DIR)/tests/test_config_prove: \
$(SED) -e 's!@AORAI_WP_SHARE@!$(AORAI_WP_SHARE)!' $< > $@ $(SED) -e 's!@AORAI_WP_SHARE@!$(AORAI_WP_SHARE)!' $< > $@
$(CHMOD_RO) $@ $(CHMOD_RO) $@
Aorai_DEFAULT_TESTS: $(Aorai_DIR)/tests/Aorai_test.cmxs $(Aorai_DIR)/tests/Aorai_test.cmo $(Aorai_DIR)/tests/ya/name_projects.cmxs $(Aorai_DIR)/tests/ya/name_projects.cmo AORAI_WP_CACHE?=$(abspath $(Aorai_DIR)/../wp-cache)
.PHONY: aorai-test-prove
aorai-test-prove: $(TEST_DEPENDENCIES) $(Aorai_DIR)/tests/test_config_prove
FRAMAC_WP_CACHE=update \
FRAMAC_WP_CACHEDIR=$(AORAI_WP_CACHE) \
PTESTS_OPTS="-config prove" \
$(MAKE) Aorai_TESTS
# Regenerating the Makefile on need # Regenerating the Makefile on need
......
...@@ -29,16 +29,6 @@ module InternalWpShare = ...@@ -29,16 +29,6 @@ module InternalWpShare =
let file_kind = "wp share directory" let file_kind = "wp share directory"
end) end)
module WpCache =
P.Filepath(
struct
let option_name = "-aorai-test-wp-cache"
let help = "use custom session dir for storing cache"
let arg_name = "dir"
let existence = Filepath.Must_exist
let file_kind = "wp session directory"
end)
module ProveAuxSpec = module ProveAuxSpec =
P.False( P.False(
struct struct
...@@ -112,7 +102,7 @@ let extend () = ...@@ -112,7 +102,7 @@ let extend () =
State_selection.union State_selection.union
(State_selection.with_codependencies state) selection) (State_selection.with_codependencies state) selection)
State_selection.empty State_selection.empty
[ InternalWpShare.self; ProveAuxSpec.self; WpCache.self ] [ InternalWpShare.self; ProveAuxSpec.self ]
in in
Project.copy ~selection my_project; Project.copy ~selection my_project;
Project.set_current my_project; Project.set_current my_project;
...@@ -130,9 +120,6 @@ let extend () = ...@@ -130,9 +120,6 @@ let extend () =
Wp.Wp_parameters.Split.on(); Wp.Wp_parameters.Split.on();
Wp.Wp_parameters.SplitMax.set 32; Wp.Wp_parameters.SplitMax.set 32;
Wp.Wp_parameters.Verbose.set 0; Wp.Wp_parameters.Verbose.set 0;
if WpCache.is_set () then
Wp.Wp_parameters.Session.set (WpCache.get());
Wp.Wp_parameters.Cache.set "update";
Globals.Functions.iter check_auto_func; Globals.Functions.iter check_auto_func;
end else begin end else begin
File.pretty_ast (); File.pretty_ast ();
......
...@@ -3,4 +3,4 @@ PLUGIN: aorai eva,from,scope report wp,rtegen ...@@ -3,4 +3,4 @@ PLUGIN: aorai eva,from,scope report wp,rtegen
COMMENT: Path to the library from the test file COMMENT: Path to the library from the test file
LIBS: @PTEST_SUITE_DIR@/../Aorai_test LIBS: @PTEST_SUITE_DIR@/../Aorai_test
MACRO: PROVE_OPTIONS @AORAI_WP_SHARE@ -aorai-test-wp-cache @PTEST_SUITE_DIR@/../wp-cache -aorai-test-prove-aux-spec MACRO: PROVE_OPTIONS @AORAI_WP_SHARE@ -aorai-test-prove-aux-spec
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.0178,
"steps": 164 }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.0095,
"steps": 46 }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.1532,
"steps": 68 }
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.005,
"steps": 46 }
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.0042,
"steps": 22 }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.017,
"steps": 161 }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.0081,
"steps": 51 }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.4.1", "verdict": "failed" }
{ "prover": "Alt-Ergo:2.2.0", "verdict": "valid", "time": 0.0237,
"steps": 257 }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment