2626
2727COV_RE = re .compile (r'^ *(\d+) (.):.*$' )
2828
29- def build_and_run (gprsw , covlevel , mains , extra_coverage_args , scos = None ,
30- gpr_obj_dir = None , gpr_exe_dir = None , ignored_source_files = [] ,
31- separate_coverage = None , extra_args = [], extra_run_args = None ,
32- extra_instr_args = None , extra_gprbuild_args = [] ,
33- extra_gprbuild_cargs = [], extra_gprbuild_largs = [],
34- absolute_paths = False , dump_trigger = "auto" ,
35- dump_channel = "auto" , check_gprbuild_output = False ,
36- trace_mode = None , runtime_project = None ,
37- gprsw_for_coverage = None , scos_for_run = True ,
38- register_failure = True , program_env = None ,
29+ def build_and_run (gprsw , covlevel , mains , extra_coverage_args , quiet = True ,
30+ scos = None , gpr_obj_dir = None , gpr_exe_dir = None ,
31+ ignored_source_files = [], separate_coverage = None ,
32+ extra_args = [], extra_run_args = None , extra_instr_args = None ,
33+ extra_gprbuild_args = [], extra_gprbuild_cargs = [],
34+ extra_gprbuild_largs = [], absolute_paths = False ,
35+ dump_trigger = "auto" , dump_channel = "auto" ,
36+ check_gprbuild_output = False , trace_mode = None ,
37+ runtime_project = None , gprsw_for_coverage = None ,
38+ scos_for_run = True , register_failure = True , program_env = None ,
3939 tolerate_instrument_messages = None , exec_args = None ,
4040 auto_languages = True , manual_prj_name = None ):
4141 """
@@ -56,6 +56,7 @@ def build_and_run(gprsw, covlevel, mains, extra_coverage_args, scos=None,
5656 "gnatcov coverage" command-line returned. This is just for convenience:
5757 one can pass an empty list here and manually append extra arguments to
5858 the result.
59+ :param bool quiet: Whether to pass "--quiet" to "gnatcov.
5960 :param None|list[str] scos: Optional list of SCOs files (ALI or SID) must
6061 be passed to gnatcov. These files must have no extension (for instance:
6162 'obj/foo' instead of 'obj/foo.ali'. If absent, we pass "-P" to "gnatcov
@@ -170,6 +171,8 @@ def gprbuild_wrapper(root_project):
170171 for pattern in ignored_source_files ])
171172 if separate_coverage :
172173 cov_or_instr_args .extend (['-S' , separate_coverage ])
174+ if quiet :
175+ cov_or_instr_args .append ("--quiet" )
173176
174177 # Compute arguments to specify units of interest.
175178 if trace_mode == 'bin' :
@@ -213,14 +216,20 @@ def gprbuild_wrapper(root_project):
213216
214217 # Instrument the project and build the result
215218 extra_instr_args = cov_or_instr_args + list (extra_instr_args or [])
216- xcov_instrument (gprsw , covlevel , extra_args = extra_instr_args ,
217- gpr_obj_dir = gpr_obj_dir , dump_trigger = dump_trigger ,
218- dump_channel = dump_channel ,
219- runtime_project = runtime_project ,
220- out = 'instrument.log' ,
221- register_failure = register_failure ,
222- tolerate_messages = tolerate_instrument_messages ,
223- auto_languages = auto_languages )
219+ xcov_instrument (
220+ gprsw ,
221+ covlevel ,
222+ quiet = False ,
223+ extra_args = extra_instr_args ,
224+ gpr_obj_dir = gpr_obj_dir ,
225+ dump_trigger = dump_trigger ,
226+ dump_channel = dump_channel ,
227+ runtime_project = runtime_project ,
228+ out = 'instrument.log' ,
229+ register_failure = register_failure ,
230+ tolerate_messages = tolerate_instrument_messages ,
231+ auto_languages = auto_languages ,
232+ )
224233 gprbuild_wrapper (gprsw .root_project )
225234
226235 # Retrieve the dump_channel that "gnatcov instrument" actually used,
0 commit comments