Do not abort when there is no binary to compare in a package
authorDodji Seketeli <dodji@seketeli.org>
Thu, 26 Nov 2015 08:50:51 +0000 (09:50 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 26 Nov 2015 10:59:42 +0000 (11:59 +0100)
commit7722e27a89c8bd963c6b7a637c99dbf3bc38d8d2
tree67d2302f42aa7a308d625f981b05b55db1fea2fb
parent814a88cdfcd688467e936a09520c8246f5009148
Do not abort when there is no binary to compare in a package

When given a package which has no binary to compare, abipkgdiff
aborts.  This patch fixes that.

* tests/data/test-diff-pkg/empty-pkg-libvirt-0.9.11.3-1.el7.ppc64.rpm:
New input test package.
* tests/data/test-diff-pkg/empty-pkg-libvirt-1.2.17-13.el7_2.2.ppc64.rpm:
Likewise.
* tests/data/test-diff-pkg/empty-pkg-report-0.txt: New test
reference output.
* data/Makefile.am: Add the new test material above to the build system.
* tests/test-diff-pkg.cc (int_out_specs): Add the new test inputs
to the set of tests.
* tools/abipkgdiff.cc (compare): Do not abort if there is no
binary to compare.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
tests/data/Makefile.am
tests/data/test-diff-pkg/empty-pkg-libvirt-0.9.11.3-1.el7.ppc64.rpm [new file with mode: 0644]
tests/data/test-diff-pkg/empty-pkg-libvirt-1.2.17-13.el7_2.2.ppc64.rpm [new file with mode: 0644]
tests/data/test-diff-pkg/empty-pkg-report-0.txt [new file with mode: 0644]
tests/test-diff-pkg.cc
tools/abipkgdiff.cc