Skip to content

Commit

Permalink
runtest: all to control the number of files checked in parallel
Browse files Browse the repository at this point in the history
For that purpose, a new CLI argument (-jobs) has been added to
the `runtest` command.
  • Loading branch information
strub committed May 14, 2024
1 parent 11948bd commit cf84b9e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/ec.ml
Expand Up @@ -296,6 +296,11 @@ let main () =
(Format.sprintf "--report=%s")
input.runo_report
)
@ Option.to_list (
Option.map
(Format.sprintf "--jobs=%d")
input.runo_jobs
)
@ List.map (Format.sprintf "--bin-args=%s") ecargs
@ [input.runo_input]
@ input.runo_scenarios
Expand Down
6 changes: 4 additions & 2 deletions src/ecOptions.ml
Expand Up @@ -35,6 +35,7 @@ and run_option = {
runo_scenarios : string list;
runo_report : string option;
runo_provers : prv_options;
runo_jobs : int option;
}

and prv_options = {
Expand Down Expand Up @@ -350,6 +351,7 @@ let specs = {
`Group "loader";
`Group "provers";
`Spec ("report", `String, "dump result to <report>");
`Spec ("jobs", `Int, "number of parallel jobs to run");
]);

("why3config", "Configure why3", []);
Expand All @@ -369,7 +371,6 @@ let specs = {
`Spec ("server" , `String, "Connect to an external Why3 server");
]);


("loader", "Options related to loader", [
`Spec ("I" , `String, "Add <dir> to the list of include directories");
`Spec ("R" , `String, "Recursively add <dir> to the list of include directories");
Expand Down Expand Up @@ -506,7 +507,8 @@ let runtest_options_of_values ini values (input, scenarios) =
{ runo_input = input;
runo_scenarios = scenarios;
runo_report = get_string "report" values;
runo_provers = prv_options_of_values ini values; }
runo_provers = prv_options_of_values ini values;
runo_jobs = get_int "jobs" values; }

(* -------------------------------------------------------------------- *)
let parse getini argv =
Expand Down
1 change: 1 addition & 0 deletions src/ecOptions.mli
Expand Up @@ -31,6 +31,7 @@ and run_option = {
runo_scenarios : string list;
runo_report : string option;
runo_provers : prv_options;
runo_jobs : int option;
}

and prv_options = {
Expand Down

0 comments on commit cf84b9e

Please sign in to comment.