mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-14 05:54:50 +00:00
ee2b54ddd9
When handling a binary with abidiff or abidw it can be useful to provide several different header files directories, for the cases where the header files of the binary are scathered in several different directories. It thus becomes possible to invoke abidiff like this: abidiff --headers-dir1 first-header-dir1 \ --headers-dir1 second-header-dir1 \ --headers-dir2 first-header-dir2 \ --headers-dir2 second-header-dir2 \ binary1 binary2 This patch adds support for that. It also modifies the tests/test-abidiff-exit.cc test harness to make it take header directories. With that modification done, a new test is added in that harness to exercise this new feature. This should close the feature request over at https://sourceware.org/bugzilla/show_bug.cgi?id=26565. * doc/manuals/abidiff.rst: Update documentation for the --headers-dir{1,2} options. * doc/manuals/abidw.rst: Likewise for the --header-dir option. * include/abg-tools-utils.h (gen_suppr_spec_from_headers): Add new overload that takes a vector of headers root dirs. * src/abg-tools-utils.cc (gen_suppr_spec_from_headers_root_dir): Define new function. (gen_suppr_spec_from_headers): Define a new overload that takes a vector of head_root_dir strings; it uses the new gen_suppr_spec_from_headers function. Use the new overload in the previous one that takes just one head_root_dir string. * tools/abidiff.cc (options::headers_dirs{1,2}): Rename option::headers_dir{1,2} into this one and make it be a vector of strings rather than just a string. (parse_command_line): Support several --headers-dir{1,2} on the command line. (set_diff_context_from_opts, set_suppressions): Adjust. * tools/abidw.cc (options::headers_dirs): Renamed options::headers_dir into this and make it be a vector of strings rather than just a string. (parse_command_line): Support several --headers-dir on the command line. (set_suppressions): Adjust. * tests/data/test-abidiff-exit/test-headers-dirs/headers-a/header-a-v{0,1}.h: Header files of new binary test input. * tests/data/test-abidiff-exit/test-headers-dirs/headers-b/header-b-v{0,1}.h: Likewise. * tests/data/test-abidiff-exit/test-headers-dirs/test-headers-dir-v{0,1}.c: Source code of new binary test input. * tests/data/test-abidiff-exit/test-headers-dirs/test-headers-dir-report-{1,2}.txt: Reference output of new binary test input. * tests/data/test-abidiff-exit/test-headers-dirs/test-headers-dir-v{0,1}.o: New binary test input. * tests/data/Makefile.am: Add the new files above to source distribution. * tests/test-abidiff-exit.cc (InOutSpec::in_elfv{0,1}_path): Add new data members. (in_out_specs): Adjust the content of this array as its type changed. Also, add two new entries to run the test over the new binary test inputs above. (do_prefix_strings): Define new static function. (main): Use it the new do_prefix_strings here. Make abidiff use the --header-dir{1,2} option whenever header directories are specified in an entry of the in_out_specs array. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
test-headers-dirs | ||
test1-voffset-change-report0.txt | ||
test1-voffset-change-report1.txt | ||
test1-voffset-change-v0.cc | ||
test1-voffset-change-v0.o | ||
test1-voffset-change-v1.cc | ||
test1-voffset-change-v1.o | ||
test1-voffset-change.abignore | ||
test2-filtered-removed-fns-report0.txt | ||
test2-filtered-removed-fns-report1.txt | ||
test2-filtered-removed-fns-v0.c | ||
test2-filtered-removed-fns-v0.o | ||
test2-filtered-removed-fns-v1.c | ||
test2-filtered-removed-fns-v1.o | ||
test2-filtered-removed-fns.abignore | ||
test-decl-enum-report-2.txt | ||
test-decl-enum-report-3.txt | ||
test-decl-enum-report.txt | ||
test-decl-enum-v0.c | ||
test-decl-enum-v0.o | ||
test-decl-enum-v1.c | ||
test-decl-enum-v1.o | ||
test-decl-struct-report.txt | ||
test-decl-struct-v0.c | ||
test-decl-struct-v0.o | ||
test-decl-struct-v1.c | ||
test-decl-struct-v1.o | ||
test-fun-param-report.txt | ||
test-fun-param-v0.abi | ||
test-fun-param-v0.c | ||
test-fun-param-v0.o | ||
test-fun-param-v1.abi | ||
test-fun-param-v1.c | ||
test-fun-param-v1.o | ||
test-leaf-cxx-members-report.txt | ||
test-leaf-cxx-members-v0.cc | ||
test-leaf-cxx-members-v0.o | ||
test-leaf-cxx-members-v1.cc | ||
test-leaf-cxx-members-v1.o | ||
test-leaf-fun-type-report.txt | ||
test-leaf-fun-type-v0.cc | ||
test-leaf-fun-type-v0.o | ||
test-leaf-fun-type-v1.cc | ||
test-leaf-fun-type-v1.o | ||
test-leaf-more-report.txt | ||
test-leaf-more-v0.cc | ||
test-leaf-more-v0.o | ||
test-leaf-more-v1.cc | ||
test-leaf-more-v1.o | ||
test-leaf-peeling-report.txt | ||
test-leaf-peeling-v0.cc | ||
test-leaf-peeling-v0.o | ||
test-leaf-peeling-v1.cc | ||
test-leaf-peeling-v1.o | ||
test-leaf-redundant-report.txt | ||
test-leaf-redundant-v0.c | ||
test-leaf-redundant-v0.o | ||
test-leaf-redundant-v1.c | ||
test-leaf-redundant-v1.o | ||
test-leaf-stats-report.txt | ||
test-leaf-stats-v0.cc | ||
test-leaf-stats-v0.o | ||
test-leaf-stats-v1.cc | ||
test-leaf-stats-v1.o | ||
test-loc-v0.bi | ||
test-loc-v1.bi | ||
test-loc-with-locs-report.txt | ||
test-loc-without-locs-report.txt | ||
test-member-size-report0.txt | ||
test-member-size-report1.txt | ||
test-member-size-v0.cc | ||
test-member-size-v0.o | ||
test-member-size-v1.cc | ||
test-member-size-v1.o | ||
test-net-change-report0.txt | ||
test-net-change-report1.txt | ||
test-net-change-report2.txt | ||
test-net-change-report3.txt | ||
test-net-change-v0.c | ||
test-net-change-v0.o | ||
test-net-change-v1.c | ||
test-net-change-v1.o | ||
test-net-change.abignore | ||
test-no-stray-comma-report.txt | ||
test-no-stray-comma-v0.o | ||
test-no-stray-comma-v1.o |