Revision ef8ef3ed
Added by Pierre-Loïc Garoche almost 6 years ago
src/main_lustre_testgen.ml | ||
---|---|---|
70 | 70 |
(* if List.mem !cpt [238;371;601;799;875;998] then *) |
71 | 71 |
(* Format.eprintf "Mutant %i: %a -> %a" !cpt Printers.pp_expr orig_e Printers.pp_expr new_e *) |
72 | 72 |
(* ; *) |
73 |
incr cpt; |
|
74 |
let mutant_filename = |
|
75 |
match !Options.dest_dir with |
|
76 |
| "" -> (* Mutants are generated in source directory *) |
|
77 |
basename^ ".mutant.n" ^ (string_of_int !cpt) ^ extension |
|
73 |
incr cpt; |
|
74 |
let mutant_basename = (Filename.basename basename)^ ".mutant.n" ^ (string_of_int !cpt) ^ extension in |
|
75 |
let mutant_filename = |
|
76 |
match !Options.dest_dir with |
|
77 |
| "" -> (* Mutants are generated in source directory *) |
|
78 |
basename^ ".mutant.n" ^ (string_of_int !cpt) ^ extension |
|
78 | 79 |
| dir -> (* Mutants are generated in target directory *) |
79 |
dir ^ "/" ^ (Filename.basename basename)^ ".mutant.n" ^ (string_of_int !cpt) ^ extension
|
|
80 |
dir ^ "/" ^ mutant_basename
|
|
80 | 81 |
in |
81 | 82 |
let mutant_out = ( |
82 | 83 |
try |
... | ... | |
91 | 92 |
Mutation.print_directive mutation |
92 | 93 |
); |
93 | 94 |
Format.fprintf mutant_fmt "%a@." Printers.pp_prog mutant; |
94 |
mutation, mutation_loc, mutant_filename
|
|
95 |
mutation, mutation_loc, mutant_basename
|
|
95 | 96 |
) |
96 | 97 |
mutants |
97 | 98 |
in |
... | ... | |
99 | 100 |
|
100 | 101 |
(* Printing traceability *) |
101 | 102 |
let trace_filename = |
102 |
(* Mutant report is generated in source directory *) |
|
103 |
basename^ ".mutation.json" |
|
103 |
match !Options.dest_dir with |
|
104 |
| "" -> (* Mutant report is generated in source directory *) |
|
105 |
basename^ ".mutation.json" |
|
106 |
| dir -> (* Mutants are generated in target directory *) |
|
107 |
dir ^ "/" ^ (Filename.basename basename)^ ".mutation.json" |
|
104 | 108 |
in |
105 | 109 |
pp_trace trace_filename mutation_list; |
106 | 110 |
(* We stop the process here *) |
Also available in: Unified diff
[lustret] bug solved in file path