libabigail/tests/data/test-abidiff-exit
Dodji Seketeli ee2b54ddd9 Make abidiff and abidw support several --headers-dir{1,2} options
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>
2020-09-18 10:27:18 +02:00
..
test-headers-dirs Make abidiff and abidw support several --headers-dir{1,2} options 2020-09-18 10:27:18 +02:00
test1-voffset-change-report0.txt abidiff: Clean up new lines between sections. 2020-03-30 16:26:31 +02:00
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 Tag add/remove/change lines unconditionally with [A], [D], [C]. 2020-03-18 14:45:26 +01:00
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 Add tests for declaration-only enums. 2020-07-08 16:59:56 +02:00
test-decl-enum-report-3.txt Add tests for declaration-only enums. 2020-07-08 16:59:56 +02:00
test-decl-enum-report.txt Add tests for declaration-only enums. 2020-07-08 16:59:56 +02:00
test-decl-enum-v0.c Add tests for declaration-only enums. 2020-07-08 16:59:56 +02:00
test-decl-enum-v0.o Add tests for declaration-only enums. 2020-07-08 16:59:56 +02:00
test-decl-enum-v1.c Add tests for declaration-only enums. 2020-07-08 16:59:56 +02:00
test-decl-enum-v1.o Add tests for declaration-only enums. 2020-07-08 16:59:56 +02:00
test-decl-struct-report.txt abidiff: Omit declaration-only type size 0 diffs. 2020-04-27 13:12:48 +02:00
test-decl-struct-v0.c Add tests for declaration-only struct diffs. 2020-04-27 12:48:58 +02:00
test-decl-struct-v0.o Add tests for declaration-only struct diffs. 2020-04-27 12:48:58 +02:00
test-decl-struct-v1.c Add tests for declaration-only struct diffs. 2020-04-27 12:48:58 +02:00
test-decl-struct-v1.o Add tests for declaration-only struct diffs. 2020-04-27 12:48:58 +02:00
test-fun-param-report.txt Bug 25986 - Wrong name of function type used in change report 2020-05-14 09:54:52 +02:00
test-fun-param-v0.abi Bug 25986 - Wrong name of function type used in change report 2020-05-14 09:54:52 +02:00
test-fun-param-v0.c Bug 25986 - Wrong name of function type used in change report 2020-05-14 09:54:52 +02:00
test-fun-param-v0.o Bug 25986 - Wrong name of function type used in change report 2020-05-14 09:54:52 +02:00
test-fun-param-v1.abi Bug 25986 - Wrong name of function type used in change report 2020-05-14 09:54:52 +02:00
test-fun-param-v1.c Bug 25986 - Wrong name of function type used in change report 2020-05-14 09:54:52 +02:00
test-fun-param-v1.o Bug 25986 - Wrong name of function type used in change report 2020-05-14 09:54:52 +02:00
test-leaf-cxx-members-report.txt abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-cxx-members-v0.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-cxx-members-v0.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-cxx-members-v1.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-cxx-members-v1.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-fun-type-report.txt Rename test-abidiff-exit/test-leaf[0-3] files. 2020-04-07 14:48:58 +02:00
test-leaf-fun-type-v0.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-fun-type-v0.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-fun-type-v1.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-fun-type-v1.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-more-report.txt abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-leaf-more-v0.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-more-v0.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-more-v1.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-more-v1.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-peeling-report.txt abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-peeling-v0.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-peeling-v0.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-peeling-v1.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-peeling-v1.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-redundant-report.txt abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-redundant-v0.c abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-redundant-v0.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-redundant-v1.c abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-redundant-v1.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-stats-report.txt Rename test-abidiff-exit/test-leaf[0-3] files. 2020-04-07 14:48:58 +02:00
test-leaf-stats-v0.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-stats-v0.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-stats-v1.cc abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-leaf-stats-v1.o abidiff: Document and refresh tests. 2020-04-14 13:23:44 +02:00
test-loc-v0.bi
test-loc-v1.bi
test-loc-with-locs-report.txt abidiff: Clean up new lines between sections. 2020-03-30 16:26:31 +02:00
test-loc-without-locs-report.txt abidiff: Clean up new lines between sections. 2020-03-30 16:26:31 +02:00
test-member-size-report0.txt dwarf-reader: support several anonymous data members in a given class 2020-05-18 13:42:50 +02:00
test-member-size-report1.txt dwarf-reader: support several anonymous data members in a given class 2020-05-18 13:42:50 +02:00
test-member-size-v0.cc abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-member-size-v0.o abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-member-size-v1.cc abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-member-size-v1.o abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-net-change-report0.txt Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change-report1.txt Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change-report2.txt Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change-report3.txt Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change-v0.c Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change-v0.o Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change-v1.c Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change-v1.o Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-net-change.abignore Fix corpus_diff::has_net_changes for --leaf-changes-only mode 2020-07-21 08:53:19 +02:00
test-no-stray-comma-report.txt abg-reporter-priv.cc: Fix anonymous member size change reports. 2020-04-14 12:39:59 +02:00
test-no-stray-comma-v0.o Fix stray comma in leaf-changes-only mode. 2020-02-19 14:00:23 +01:00
test-no-stray-comma-v1.o Fix stray comma in leaf-changes-only mode. 2020-02-19 14:00:23 +01:00