diff --git a/src/qtest_bin.mll b/src/qtest_bin.mll index 57ba4e6..a1ec29a 100644 --- a/src/qtest_bin.mll +++ b/src/qtest_bin.mll @@ -230,10 +230,12 @@ let extract_from pathin = Lexing.( close_in chanin ) +let _keep_warn_error = ref false (** Generate the test suite from files list on currently selected output *) let generate paths = if not !quiet then eps "Extraction : "; List.iter extract_from paths; + if not !_keep_warn_error then out "[@@@ocaml.warnerror \"-a\"]\n"; out "let ___tests = ref []\nlet ___add test = ___tests := test::!___tests\n"; out hard_coded_preamble; out (Buffer.contents global_preamble); @@ -277,6 +279,9 @@ Add code to the tests preamble; typically this will be an instruction of the for Add the contents of the given file to the tests preamble\n\ "; +"--keep-warn-error", Arg.Set _keep_warn_error, +" keep/disable warn-error in the generated code"; + "--run-only", Arg.String (fun s->Core._run_only := Some s), " \ Only generate tests pertaining to this function, as indicated by the test header\