]> sourceware.org Git - libabigail.git/commit
tests: Add symtab test suite
authorMatthias Maennich <maennich@google.com>
Mon, 18 May 2020 11:50:13 +0000 (13:50 +0200)
committerDodji Seketeli <dodji@redhat.com>
Wed, 27 May 2020 09:00:51 +0000 (11:00 +0200)
commit2a79ab78f4105adc43483674732e5320ebf6dc2e
tree6e1a546ce7a1fe9c001f83c7f427d4bc6f6f108b
parente8bf5b803c44d7ec40f9659295a5d9f1e3feefcb
tests: Add symtab test suite

Add (Catch based) test suite to test symbol table reading through the
result persisted in abigail::corpus.

The test cases are created through simple C source files targeting the
desired properties (having an undefined/export function or both). The
Makefile that comes with them recreates the test cases from the sources.

This covers reading sorted_(undefined_)var|fun_symbols as well as the
corresponding symbols maps accessible through the accessors of
abigail::corpus.

* tests/Makefile.am: add new test runtestsymtab
* tests/data/Makefile.am: add new test data for runtestsymtab
* tests/data/test-symtab/Makefile: Add this to build the binaries
below from their source code.
* tests/data/test-symtab/basic/empty.c: New test case source.
* tests/data/test-symtab/basic/link_against_me.c: Likewise.
* tests/data/test-symtab/basic/no_debug_info.c: Likewise.
* tests/data/test-symtab/basic/one_function_one_variable.c: Likewise.
* tests/data/test-symtab/basic/one_function_one_variable_undefined.c: Likewise.
* tests/data/test-symtab/basic/single_function.c: Likewise.
* tests/data/test-symtab/basic/single_undefined_function.c: Likewise.
* tests/data/test-symtab/basic/single_undefined_variable.c: Likewise.
* tests/data/test-symtab/basic/single_variable.c: Likewise.
* tests/data/test-symtab/basic/empty.so: New test data, built from
the Makefile above.
* tests/data/test-symtab/basic/link_against_me.so: Likewise.
* tests/data/test-symtab/basic/no_debug_info.so: Likewise.
* tests/data/test-symtab/basic/one_function_one_variable.so: Likewise.
* tests/data/test-symtab/basic/one_function_one_variable_undefined.so: Likewise.
* tests/data/test-symtab/basic/single_function.so: Likewise.
* tests/data/test-symtab/basic/single_undefined_function.so: Likewise.
* tests/data/test-symtab/basic/single_undefined_variable.so: Likewise.
* tests/data/test-symtab/basic/single_variable.so: Likewise.
* tests/test-symtab.cc: New test driver.

Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
22 files changed:
tests/Makefile.am
tests/data/Makefile.am
tests/data/test-symtab/basic/Makefile [new file with mode: 0644]
tests/data/test-symtab/basic/empty.c [new file with mode: 0644]
tests/data/test-symtab/basic/empty.so [new file with mode: 0755]
tests/data/test-symtab/basic/link_against_me.c [new file with mode: 0644]
tests/data/test-symtab/basic/link_against_me.so [new file with mode: 0755]
tests/data/test-symtab/basic/no_debug_info.c [new file with mode: 0644]
tests/data/test-symtab/basic/no_debug_info.so [new file with mode: 0755]
tests/data/test-symtab/basic/one_function_one_variable.c [new file with mode: 0644]
tests/data/test-symtab/basic/one_function_one_variable.so [new file with mode: 0755]
tests/data/test-symtab/basic/one_function_one_variable_undefined.c [new file with mode: 0644]
tests/data/test-symtab/basic/one_function_one_variable_undefined.so [new file with mode: 0755]
tests/data/test-symtab/basic/single_function.c [new file with mode: 0644]
tests/data/test-symtab/basic/single_function.so [new file with mode: 0755]
tests/data/test-symtab/basic/single_undefined_function.c [new file with mode: 0644]
tests/data/test-symtab/basic/single_undefined_function.so [new file with mode: 0755]
tests/data/test-symtab/basic/single_undefined_variable.c [new file with mode: 0644]
tests/data/test-symtab/basic/single_undefined_variable.so [new file with mode: 0755]
tests/data/test-symtab/basic/single_variable.c [new file with mode: 0644]
tests/data/test-symtab/basic/single_variable.so [new file with mode: 0755]
tests/test-symtab.cc [new file with mode: 0644]
This page took 0.03277 seconds and 5 git commands to generate.