]> sourceware.org Git - libabigail.git/commitdiff
Add a --suppressions option to fedabipkgdiff
authorDodji Seketeli <dodji@redhat.com>
Mon, 16 Oct 2017 12:07:55 +0000 (14:07 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 16 Oct 2017 12:45:32 +0000 (14:45 +0200)
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>
doc/manuals/fedabipkgdiff.rst
tools/fedabipkgdiff

index c5852668cd3d5dcb2a2fd878b7a34c5465470ed5..0ea03c6a4620ccae774b795262b7516c1285edbf 100644 (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
index b8c04f1c7f95c014244a9f4a14e1765ab3e6a6db..9db5015e5b47019143d1a5778e43644c6c342c13 100755 (executable)
@@ -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,
This page took 0.035825 seconds and 5 git commands to generate.