]> sourceware.org Git - libabigail.git/commit
Make abidiff and abicompat return meaningful exit codes
authorDodji Seketeli <dodji@redhat.com>
Fri, 10 Apr 2015 13:42:35 +0000 (15:42 +0200)
committerDodji Seketeli <dodji@redhat.com>
Fri, 10 Apr 2015 14:26:36 +0000 (16:26 +0200)
commitfc55e7f34385e78d6f875add3ea75a9dd72f8453
treed4d24b6cf61444220dfd768e036f707ad0760122
parenta102a2f032ee93d294ee725183251d810e99ddcc
Make abidiff and abicompat return meaningful exit codes

As per https://sourceware.org/bugzilla/show_bug.cgi?id=18146, abidiff
the exit code of abidiff and abicompat is now a bit field that can be
inspected to know if the ABI change reported is incompatible for sure,
or if it needs user review of the output to decide.

This patch also updates the documentation.

* doc/manuals/abicompat.rst: Update documentation for abicompat
exit codes.
* doc/manuals/abidiff.rst: Likewise for abidiff exit codes.
* include/abg-tools-utils.h (enum abidiff_status): Declare new
enum.
(operator{|,&,|=}): Declare new operators for the new enum
abidiff_status.
(abidiff_status_has_error, abidiff_status_has_abi_change)
(abidiff_status_has_incompatible_abi_change): Declare new
functions.
* src/abg-tools-utils.cc (operator{|,&,|=}): Define these new
operators.
(abidiff_status_has_error, abidiff_status_has_abi_change)
(abidiff_status_has_incompatible_abi_change): Define new
functions.
* tests/test-diff-filter.cc (main): Adjust for the new exit code
of abidiff.
* tests/test-diff-suppr.cc (main): Likewise.
* tests/test-abicompat.cc (main): Likewise.
* tools/abicompat.cc (enum abicompat_status): Remove.
(operator{|,&,|=}): Remove these operators for enum
abicompat_status.
(perform_compat_check_in_normal_mode)
(perform_compat_check_in_weak_mode): Return abidiff_status instead
of abicompat_status.  Adjust therefore.
(main): Adjust to return abidiff_status now, instead of a just
zero for all non-error cases.
* tools/abidiff.cc (main): Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
doc/manuals/abicompat.rst
doc/manuals/abidiff.rst
include/abg-tools-utils.h
src/abg-tools-utils.cc
tests/test-abicompat.cc
tests/test-diff-filter.cc
tests/test-diff-suppr.cc
tools/abicompat.cc
tools/abidiff.cc
This page took 0.032368 seconds and 5 git commands to generate.