Skip to content
Snippets Groups Projects
Commit ef8ef3ed authored by Pierre Loic Garoche's avatar Pierre Loic Garoche
Browse files

[lustret] bug solved in file path

parent 0d6c2694
No related branches found
No related tags found
No related merge requests found
...@@ -70,13 +70,14 @@ let testgen_source dirname basename extension = ...@@ -70,13 +70,14 @@ let testgen_source dirname basename extension =
(* if List.mem !cpt [238;371;601;799;875;998] then *) (* if List.mem !cpt [238;371;601;799;875;998] then *)
(* Format.eprintf "Mutant %i: %a -> %a" !cpt Printers.pp_expr orig_e Printers.pp_expr new_e *) (* Format.eprintf "Mutant %i: %a -> %a" !cpt Printers.pp_expr orig_e Printers.pp_expr new_e *)
(* ; *) (* ; *)
incr cpt; incr cpt;
let mutant_filename = let mutant_basename = (Filename.basename basename)^ ".mutant.n" ^ (string_of_int !cpt) ^ extension in
match !Options.dest_dir with let mutant_filename =
| "" -> (* Mutants are generated in source directory *) match !Options.dest_dir with
basename^ ".mutant.n" ^ (string_of_int !cpt) ^ extension | "" -> (* Mutants are generated in source directory *)
basename^ ".mutant.n" ^ (string_of_int !cpt) ^ extension
| dir -> (* Mutants are generated in target directory *) | dir -> (* Mutants are generated in target directory *)
dir ^ "/" ^ (Filename.basename basename)^ ".mutant.n" ^ (string_of_int !cpt) ^ extension dir ^ "/" ^ mutant_basename
in in
let mutant_out = ( let mutant_out = (
try try
...@@ -91,7 +92,7 @@ let testgen_source dirname basename extension = ...@@ -91,7 +92,7 @@ let testgen_source dirname basename extension =
Mutation.print_directive mutation Mutation.print_directive mutation
); );
Format.fprintf mutant_fmt "%a@." Printers.pp_prog mutant; Format.fprintf mutant_fmt "%a@." Printers.pp_prog mutant;
mutation, mutation_loc, mutant_filename mutation, mutation_loc, mutant_basename
) )
mutants mutants
in in
...@@ -99,8 +100,11 @@ let testgen_source dirname basename extension = ...@@ -99,8 +100,11 @@ let testgen_source dirname basename extension =
(* Printing traceability *) (* Printing traceability *)
let trace_filename = let trace_filename =
(* Mutant report is generated in source directory *) match !Options.dest_dir with
basename^ ".mutation.json" | "" -> (* Mutant report is generated in source directory *)
basename^ ".mutation.json"
| dir -> (* Mutants are generated in target directory *)
dir ^ "/" ^ (Filename.basename basename)^ ".mutation.json"
in in
pp_trace trace_filename mutation_list; pp_trace trace_filename mutation_list;
(* We stop the process here *) (* We stop the process here *)
......
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