From 7dc8265c54bf80820a6192615f1389f68a44196a Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Mon, 16 Oct 2017 14:07:55 +0200 Subject: [PATCH] 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 --- doc/manuals/fedabipkgdiff.rst | 6 ++++++ tools/fedabipkgdiff | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/manuals/fedabipkgdiff.rst b/doc/manuals/fedabipkgdiff.rst index c5852668..0ea03c6a 100644 --- a/doc/manuals/fedabipkgdiff.rst +++ b/doc/manuals/fedabipkgdiff.rst @@ -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 ` file + located at *path-to-suppressions*. + + * ``--no-default-suppression`` Do not load the :ref:`default suppression specification files diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff index b8c04f1c..9db5015e 100755 --- a/tools/fedabipkgdiff +++ b/tools/fedabipkgdiff @@ -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,