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

[aorai] restore compilation of tests

parent 1374c878
No related branches found
No related tags found
No related merge requests found
...@@ -20,11 +20,13 @@ module TestNumber = ...@@ -20,11 +20,13 @@ module TestNumber =
end) end)
module InternalWpShare = module InternalWpShare =
P.Empty_string( P.Filepath(
struct struct
let option_name = "-aorai-test-wp-share" let option_name = "-aorai-test-wp-share"
let help = "use custom wp share dir (when in internal plugin mode)" let help = "use custom wp share dir (when in internal plugin mode)"
let arg_name = "dir" let arg_name = "dir"
let existence = Filepath.Must_exist
let file_kind = "wp share directory"
end) end)
module ProveAuxSpec = module ProveAuxSpec =
...@@ -50,17 +52,13 @@ let extend () = ...@@ -50,17 +52,13 @@ let extend () =
let run = !Db.Toplevel.run in let run = !Db.Toplevel.run in
fun f -> fun f ->
let my_project = Project.create "Reparsing" in let my_project = Project.create "Reparsing" in
let wp_compute_kf = let wp_compute_kf kf = Wp.VC.command (Wp.VC.generate_kf kf) in
Dynamic.get ~plugin:"Wp" "wp_compute_kf"
Datatype.(
func3 (option Kernel_function.ty) (list string) (list string) unit)
in
let check_auto_func kf = let check_auto_func kf =
let name = Kernel_function.get_name kf in let name = Kernel_function.get_name kf in
if Kernel_function.is_definition kf && if Kernel_function.is_definition kf &&
(is_suffix "_pre_func" name || is_suffix "_post_func" name) (is_suffix "_pre_func" name || is_suffix "_post_func" name)
then then
wp_compute_kf (Some kf) [] [] wp_compute_kf kf
in in
run f; run f;
let tmpfile = let tmpfile =
...@@ -89,10 +87,9 @@ let extend () = ...@@ -89,10 +87,9 @@ let extend () =
Constfold.off (); Constfold.off ();
Ast.compute(); Ast.compute();
if ProveAuxSpec.get () then begin if ProveAuxSpec.get () then begin
let wp_share = InternalWpShare.get() in if InternalWpShare.is_set() then
if wp_share <> "" then Wp.Wp_parameters.Share.set (InternalWpShare.get());
Dynamic.Parameter.String.set "-wp-share" wp_share; Wp.Wp_parameters.Verbose.set 0;
Dynamic.Parameter.Int.set "-wp-verbose" 0;
Globals.Functions.iter check_auto_func; Globals.Functions.iter check_auto_func;
end; end;
File.pretty_ast (); File.pretty_ast ();
...@@ -101,5 +98,3 @@ let extend () = ...@@ -101,5 +98,3 @@ let extend () =
Db.Toplevel.run := myrun Db.Toplevel.run := myrun
let () = extend () let () = extend ()
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