diff options
| author | Ulf Hermann <[email protected]> | 2017-03-01 16:57:34 +0100 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-04-28 13:32:51 +0000 |
| commit | 2136e330bef96512d45b8a85b245b9ea95cf5106 (patch) | |
| tree | 1067994fd72604ba14698ab1238dcff516a7e920 /tests | |
| parent | 1acc27c76f9721d9647d4bbeaac98eb6dd7b2f05 (diff) | |
Generalize library names
On windows library names end with ".dll" and the prefix "lib" us usually
omitted. Take this into account and also drop the $(EXEEXT) workaround.
We don't need to use noinst_PROGRAMS as there is also noinst_DATA.
Change-Id: I7e4ba2432811d5ad85051ea0c9d5674eabf79b3c
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 8 | ||||
| -rw-r--r-- | tests/Makefile.am | 22 | ||||
| -rwxr-xr-x | tests/run-deleted.sh | 8 |
3 files changed, 26 insertions, 12 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 9d203419..d5bda6d2 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +2017-04-28 Ulf Hermann <[email protected]> + + * Makefile.am: Use the predefined names for libelf, libdw, libasm, + rather than hardcoding to the elf conventions and add the right + extension to deleted-lib.<libext>. + * run-deleted.sh: Use the correct file name extension for + deleted-lib.<libext>. + 2017-04-27 Ulf Hermann <[email protected]> * Makefile.am: Use fpie_CFLAGS and fpic_CFLAGS. diff --git a/tests/Makefile.am b/tests/Makefile.am index f9b556dc..9a57a6d8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -50,13 +50,15 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \ test-elf_cntl_gelf_getshdr dwflsyms dwfllines \ dwfl-report-elf-align varlocs backtrace backtrace-child \ backtrace-data backtrace-dwarf debuglink debugaltlink \ - buildid deleted deleted-lib.so aggregate_size peel_type \ - vdsosyms \ + buildid deleted aggregate_size peel_type vdsosyms \ getsrc_die strptr newdata elfstrtab dwfl-proc-attach \ elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \ elfgetzdata elfputzdata zstrptr emptyfile vendorelf \ fillfile +check_DATA = deleted-lib$(LIBEXT) +CLEANFILES += deleted-lib$(LIBEXT) + asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ asm-tst6 asm-tst7 asm-tst8 asm-tst9 @@ -338,6 +340,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile-bpf-dis1.expect.bz2 testfile-bpf-dis1.o.bz2 \ testfile-m68k-core.bz2 testfile-m68k.bz2 testfile-m68k-s.bz2 +EXTRA_DIST += deleted-lib.c + if USE_VALGRIND valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1' endif @@ -389,9 +393,9 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl libelf = ../libelf/libelf.a -lz libasm = ../libasm/libasm.a else -libdw = ../libdw/libdw.so -libelf = ../libelf/libelf.so -libasm = ../libasm/libasm.so +libdw = ../libdw/$(libdw_BARE) +libelf = ../libelf/$(libelf_BARE) +libasm = ../libasm/$(libasm_BARE) endif libebl = ../libebl/libebl.a libeu = ../lib/libeu.a @@ -477,10 +481,7 @@ backtrace_dwarf_LDADD = $(libdw) $(libelf) $(libgnu) debuglink_LDADD = $(libdw) $(libelf) $(libgnu) debugaltlink_LDADD = $(libdw) $(libelf) $(libgnu) buildid_LDADD = $(libdw) $(libelf) $(libgnu) -deleted_LDADD = ./deleted-lib.so $(libgnu) -deleted_lib_so_LDFLAGS = -shared -rdynamic -deleted_lib_so_CFLAGS = $(fpic_CFLAGS) -fasynchronous-unwind-tables -deleted_lib_so_LDADD = $(libgnu) +deleted_LDADD = ./deleted-lib$(LIBEXT) $(libgnu) aggregate_size_LDADD = $(libdw) $(libelf) $(libgnu) peel_type_LDADD = $(libdw) $(libelf) $(libgnu) vdsosyms_LDADD = $(libdw) $(libelf) $(libgnu) @@ -509,6 +510,9 @@ system_elf_libelf_test_CPPFLAGS += -I$(top_srcdir)/libgnu -I$(top_builddir)/libg endif system_elf_libelf_test_LDADD = $(libelf) $(libgnu) +deleted-lib$(LIBEXT): deleted-lib.c $(libgnu) + $(AM_V_CCLD)$(COMPILE) $(fpic_CFLAGS) -fasynchronous-unwind-tables -shared -rdynamic -o $@ $^ + if GCOV check: check-am coverage .PHONY: coverage diff --git a/tests/run-deleted.sh b/tests/run-deleted.sh index 0f647621..38b9e916 100755 --- a/tests/run-deleted.sh +++ b/tests/run-deleted.sh @@ -17,8 +17,10 @@ . $srcdir/backtrace-subr.sh -tempfiles deleted deleted-lib.so -cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so . +LIBEXT=`grep "#define LIBEXT" ${abs_top_builddir}/config.h | awk '{print $3}' | sed -e 's/"//g'` + +tempfiles deleted deleted-lib$LIBEXT +cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib$LIBEXT . # We don't want to run the deleted process under valgrind then # stack will see the valgrind process backtrace. @@ -27,7 +29,7 @@ unset VALGRIND_CMD pid=$(testrun ${abs_builddir}/deleted) sleep 1 -rm -f deleted deleted-lib.so +rm -f deleted deleted-lib$LIBEXT tempfiles bt bt.err set VALGRIND_CMD="$OLD_VALGRIND_CMD" |
