ocamltest: rename action_name into name in the Actions module.
parent
47c887584d
commit
529b9132d8
|
@ -23,7 +23,7 @@ type t = {
|
|||
mutable hook : code option
|
||||
}
|
||||
|
||||
let action_name a = a.name
|
||||
let name a = a.name
|
||||
|
||||
let make n c = { name = n; body = c; hook = None }
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ type code = out_channel -> Environments.t -> Result.t * Environments.t
|
|||
|
||||
type t
|
||||
|
||||
val action_name : t -> string
|
||||
val name : t -> string
|
||||
|
||||
val update : t -> code -> t
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ let test_file test_filename =
|
|||
let used_tests = tests_in_trees test_trees in
|
||||
let used_actions = actions_in_tests used_tests in
|
||||
let action_names =
|
||||
let f act names = String.Set.add (Actions.action_name act) names in
|
||||
let f act names = String.Set.add (Actions.name act) names in
|
||||
Actions.ActionSet.fold f used_actions String.Set.empty in
|
||||
let test_dirname = Filename.dirname test_filename in
|
||||
let test_basename = Filename.basename test_filename in
|
||||
|
|
|
@ -21,7 +21,7 @@ let show_objects title string_of_object objects =
|
|||
List.iter print_object objects;
|
||||
exit 0
|
||||
|
||||
let string_of_action = Actions.action_name
|
||||
let string_of_action = Actions.name
|
||||
|
||||
let string_of_test test =
|
||||
if test.Tests.test_run_by_default
|
||||
|
|
|
@ -43,7 +43,7 @@ let lookup name =
|
|||
|
||||
let test_of_action action =
|
||||
{
|
||||
test_name = Actions.action_name action;
|
||||
test_name = Actions.name action;
|
||||
test_run_by_default = false;
|
||||
test_actions = [action]
|
||||
}
|
||||
|
@ -55,10 +55,10 @@ let run_actions log testenv actions =
|
|||
| action::remaining_actions ->
|
||||
begin
|
||||
Printf.fprintf log "Running action %d/%d (%s)\n%!"
|
||||
action_number total (Actions.action_name action);
|
||||
action_number total (Actions.name action);
|
||||
let (result, env') = Actions.run log env action in
|
||||
Printf.fprintf log "Action %d/%d (%s) %s\n%!"
|
||||
action_number total (Actions.action_name action)
|
||||
action_number total (Actions.name action)
|
||||
(Result.string_of_result result);
|
||||
if Result.is_pass result
|
||||
then run_actions_aux (action_number+1) env' remaining_actions
|
||||
|
|
Loading…
Reference in New Issue