Add a --suppressions option to fedabipkgdiff

This patch adds a --suppressions option to fedabipkgdiff so that a
suppression specification can be applied to the comparisons performed.

	* tools/fedabipkgdiff (abipkgdiff): If a suppression file was
	provided, pass it to the underlying abipkgdiff tool.
	(build_commandline_args_parser): Parse the new --suppressions
	option.
	* docs/manuals/fedabipkgdiff.rst: Add documentation for the new
	--suppressions option.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2017-10-16 14:07:55 +02:00
parent d000f75c45
commit 7dc8265c54
2 changed files with 19 additions and 0 deletions

View File

@ -116,6 +116,12 @@ Options
provided, the tool compares the ABI of all ELF binaries found in
the packages.
* ``--suppressions`` <*path-to-suppresions*>
Use a :ref:`suppression specification <suppr_spec_label>` file
located at *path-to-suppressions*.
* ``--no-default-suppression``
Do not load the :ref:`default suppression specification files

View File

@ -999,6 +999,11 @@ def abipkgdiff(cmp_half1, cmp_half2):
"""
abipkgdiff_tool = build_path_to_abipkgdiff()
suppressions = ''
if global_config.suppr:
suppressions = '--suppressions {0}'.format(global_config.suppr)
if global_config.no_devel_pkg:
devel_pkg1 = ''
devel_pkg2 = ''
@ -1045,6 +1050,7 @@ def abipkgdiff(cmp_half1, cmp_half2):
cmd = [
abipkgdiff_tool,
suppressions,
'--show-identical-binaries' if global_config.show_identical_binaries else '',
'--no-default-suppression' if global_config.no_default_suppr else '',
'--dso-only' if global_config.dso_only else '',
@ -1381,6 +1387,13 @@ def build_commandline_args_parser():
default='',
help="The path to the 'abipkgtool' command to use. "
"By default use the one found in $PATH.")
parser.add_argument(
'--suppressions',
required=False,
metavar='SUPPR',
dest='suppr',
default='',
help='The suppression specification file to use during comparison')
parser.add_argument(
'--no-default-suppression',
required=False,