2d63da6a12beff865505766274a17bb48304c208
[platform/upstream/elfutils.git] / tests / Makefile.am
1 ## Process this file with automake to create Makefile.in
2 ##
3 ## Copyright (C) 1996-2018 Red Hat, Inc.
4 ## This file is part of elfutils.
5 ##
6 ## This file is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 3 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## elfutils is distributed in the hope that it will be useful, but
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 ##
19 include $(top_srcdir)/config/eu.am
20 BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
21
22 AM_LDFLAGS =
23
24 if !STANDALONE
25 AM_CPPFLAGS += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
26             -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
27             -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
28             -I$(top_srcdir)/lib -I..
29 AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
30 endif
31
32 if TESTS_RPATH
33 AM_LDFLAGS += -Wl,-rpath,$(BUILD_RPATH)
34 tests_rpath = yes
35 else
36 tests_rpath = no
37 endif
38
39 check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
40                   showptable update1 update2 update3 update4 test-nlist \
41                   show-die-info get-files get-lines get-pubnames \
42                   get-aranges allfcts line2addr addrscopes funcscopes \
43                   show-abbrev hash newscn ecp dwflmodtest \
44                   find-prologues funcretval allregs rdwrmmap \
45                   dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
46                   dwfl-addr-sect dwfl-bug-report early-offscn \
47                   dwfl-bug-getmodules dwarf-getmacros dwarf-ranges addrcfi \
48                   test-flag-nobits dwarf-getstring rerequest_tag \
49                   alldts typeiter typeiter2 low_high_pc \
50                   test-elf_cntl_gelf_getshdr dwflsyms dwfllines \
51                   dwfl-report-elf-align varlocs backtrace backtrace-child \
52                   backtrace-data backtrace-dwarf debuglink debugaltlink \
53                   buildid deleted deleted-lib.so aggregate_size peel_type \
54                   vdsosyms \
55                   getsrc_die strptr newdata elfstrtab dwfl-proc-attach \
56                   elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \
57                   elfgetzdata elfputzdata zstrptr emptyfile vendorelf \
58                   fillfile dwarf_default_lower_bound dwarf-die-addr-die \
59                   get-units-invalid get-units-split attr-integrate-skel \
60                   all-dwarf-ranges unit-info
61
62 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
63             asm-tst6 asm-tst7 asm-tst8 asm-tst9
64
65 if BIARCH
66 check_PROGRAMS += backtrace-child-biarch
67 endif
68
69 # Substitute $(COMPILE).
70 backtrace-child-biarch$(EXEEXT): backtrace-child.c
71         $(AM_V_CC)$(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
72                      $(AM_CPPFLAGS) $(CPPFLAGS) \
73                      $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \
74                      $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
75                      -o $@ $<
76
77 TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
78         update1 update2 update3 update4 \
79         run-show-die-info.sh run-get-files.sh run-get-lines.sh \
80         run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
81         run-show-abbrev.sh run-line2addr.sh hash \
82         newscn run-strip-test.sh run-strip-test2.sh \
83         run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
84         run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
85         run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
86         run-strip-nothing.sh run-strip-g.sh \
87         run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
88         run-strip-nobitsalign.sh run-strip-remove-keep.sh \
89         run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-test3.sh \
90         run-unstrip-test4.sh run-unstrip-M.sh run-elfstrmerge-test.sh \
91         run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
92         run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
93         run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
94         run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
95         run-find-prologues.sh run-allregs.sh run-addrcfi.sh \
96         run-nm-self.sh run-readelf-self.sh run-readelf-info-plus.sh \
97         run-readelf-const-values.sh \
98         run-varlocs-self.sh run-exprlocs-self.sh \
99         run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
100         run-readelf-test4.sh run-readelf-twofiles.sh \
101         run-readelf-macro.sh run-readelf-loc.sh run-readelf-ranges.sh \
102         run-readelf-aranges.sh run-readelf-line.sh run-readelf-z.sh \
103         run-native-test.sh run-bug1-test.sh \
104         run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
105         dwfl-bug-addr-overflow run-addrname-test.sh \
106         dwfl-bug-fd-leak dwfl-bug-report \
107         run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
108         run-disasm-x86.sh run-disasm-x86-64.sh \
109         run-early-offscn.sh run-dwarf-getmacros.sh run-dwarf-ranges.sh \
110         run-test-flag-nobits.sh run-prelink-addr-test.sh \
111         run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \
112         run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
113         run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
114         run-test-archive64.sh run-readelf-vmcoreinfo.sh \
115         run-readelf-mixed-corenote.sh run-dwfllines.sh \
116         run-readelf-variant.sh \
117         run-dwfl-report-elf-align.sh run-addr2line-test.sh \
118         run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
119         run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \
120         run-varlocs.sh run-exprlocs.sh run-funcretval.sh \
121         run-backtrace-native.sh run-backtrace-data.sh run-backtrace-dwarf.sh \
122         run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
123         run-backtrace-native-core-biarch.sh run-backtrace-core-x86_64.sh \
124         run-backtrace-fp-core-x86_64.sh \
125         run-backtrace-fp-core-aarch64.sh \
126         run-backtrace-fp-core-ppc64le.sh \
127         run-backtrace-core-x32.sh \
128         run-backtrace-core-i386.sh run-backtrace-fp-core-i386.sh \
129         run-backtrace-core-ppc.sh \
130         run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
131         run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \
132         run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \
133         run-stack-demangled-test.sh run-readelf-zx.sh run-readelf-zp.sh \
134         run-readelf-addr.sh run-readelf-str.sh \
135         run-readelf-types.sh \
136         run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \
137         run-linkmap-cut.sh run-aggregate-size.sh run-peel-type.sh \
138         vdsosyms run-readelf-A.sh \
139         run-getsrc-die.sh run-strptr.sh newdata elfstrtab dwfl-proc-attach \
140         elfshphehdr run-lfs-symbols.sh run-dwelfgnucompressed.sh \
141         run-elfgetchdr.sh \
142         run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \
143         run-compress-test.sh \
144         run-readelf-zdebug.sh run-readelf-zdebug-rel.sh \
145         emptyfile vendorelf fillfile dwarf_default_lower_bound \
146         run-dwarf-die-addr-die.sh \
147         run-get-units-invalid.sh run-get-units-split.sh \
148         run-attr-integrate-skel.sh \
149         run-all-dwarf-ranges.sh run-unit-info.sh
150
151 if !BIARCH
152 export ELFUTILS_DISABLE_BIARCH = 1
153 endif
154
155 if !DEMANGLE
156 export ELFUTILS_DISABLE_DEMANGLE = 1
157 endif
158
159 if !STANDALONE
160 check_PROGRAMS += msg_tst system-elf-libelf-test
161 TESTS += msg_tst system-elf-libelf-test
162 endif
163
164 if LZMA
165 TESTS += run-readelf-s.sh run-dwflsyms.sh
166 endif
167
168 if HAVE_LIBASM
169 check_PROGRAMS += $(asm_TESTS)
170 TESTS += $(asm_TESTS) run-disasm-bpf.sh
171 endif
172
173 EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
174              run-show-die-info.sh run-get-files.sh run-get-lines.sh \
175              run-get-pubnames.sh run-get-aranges.sh \
176              run-show-abbrev.sh run-strip-test.sh \
177              run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
178              testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
179              testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
180              testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
181              testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
182              testfile_class_func.bz2 testfile_nested_funcs.bz2 \
183              run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
184              run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
185              run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
186              run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
187              run-strip-nothing.sh run-strip-remove-keep.sh run-strip-g.sh \
188              run-strip-strmerge.sh run-strip-nobitsalign.sh \
189              testfile-nobitsalign.bz2 testfile-nobitsalign.strip.bz2 \
190              run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
191              hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
192              hello_m68k.ko.bz2 hello_riscv64.ko.bz2 \
193              run-unstrip-test.sh run-unstrip-test2.sh \
194              testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \
195              testfile-info-link.stripped.bz2 run-unstrip-test3.sh \
196              run-unstrip-test4.sh testfile-strtab.bz2 \
197              testfile-strtab.stripped.bz2 testfile-strtab.debuginfo.bz2 \
198              run-unstrip-M.sh run-elfstrmerge-test.sh \
199              run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
200              run-ranlib-test3.sh run-ranlib-test4.sh \
201              run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
202              run-nm-self.sh run-readelf-self.sh run-readelf-info-plus.sh \
203              run-readelf-const-values.sh testfile-const-values.debug.bz2 \
204              run-addrcfi.sh \
205              run-varlocs-self.sh run-exprlocs-self.sh \
206              run-find-prologues.sh run-allregs.sh run-native-test.sh \
207              run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
208              run-dwfl-addr-sect.sh run-early-offscn.sh \
209              run-dwarf-getmacros.sh \
210              run-dwarf-ranges.sh debug-ranges-no-lowpc.o.bz2 \
211              testfileranges4.debug.bz2 testfileranges5.debug.bz2 \
212              testfilesplitranges5.debug.bz2 \
213              testfile-ranges-hello5.dwo.bz2 testfile-ranges-world5.dwo.bz2 \
214              run-test-flag-nobits.sh \
215              run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \
216              testfile15.bz2 testfile15.debug.bz2 \
217              testfile16.bz2 testfile16.debug.bz2 \
218              testfile17.bz2 testfile17.debug.bz2 \
219              testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
220              testfile20.bz2 testfile20.index.bz2 \
221              testfile21.bz2 testfile21.index.bz2 \
222              testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
223              testfile26.bz2 testfile27.bz2 \
224              coverage.sh test-subr.sh test-wrapper.sh \
225              run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
226              run-readelf-test4.sh run-readelf-twofiles.sh \
227              run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
228              run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
229              testfile29.bz2 testfile29.rdwr.bz2 \
230              testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \
231              testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \
232              testfile36.bz2 testfile36.debug.bz2 \
233              testfile37.bz2 testfile37.debug.bz2 \
234              testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \
235              testfile41.bz2 testfile42.bz2 testfile42_noshdrs.bz2 \
236              testfile43.bz2 \
237              testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \
238              testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \
239              testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \
240              testfile49.bz2 testfile50.bz2 testfile51.bz2 \
241              testfile-macros-0xff.bz2 \
242              run-readelf-macro.sh testfilemacro.bz2 \
243              run-readelf-loc.sh testfileloc.bz2 \
244              splitdwarf4-not-split4.dwo.bz2 \
245              testfile-splitdwarf4-not-split4.debug.bz2 \
246              run-readelf-ranges.sh \
247              run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \
248              testfile-ppc64-min-instr.bz2 \
249              testfile-dwarf-45.source \
250              testfile-dwarf-4.bz2 testfile-dwarf-5.bz2 \
251              run-readelf-z.sh \
252              run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \
253              testfile_multi.dwz.bz2 testfile_multi_main.bz2 \
254              testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \
255              run-readelf-addr.sh run-readelf-str.sh \
256              run-readelf-types.sh \
257              run-allfcts-multi.sh \
258              test-offset-loop.bz2 test-offset-loop.alt.bz2 \
259              run-prelink-addr-test.sh \
260              testfile52-32.so.bz2 testfile52-32.so.debug.bz2 \
261              testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
262              testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
263              testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
264              testfile53-32.bz2 testfile53-32.debug.bz2 \
265              testfile53-32.prelink.bz2 testfile53-64.bz2 \
266              testfile53-64.debug.bz2 testfile53-64.prelink.bz2 \
267              testfile54-32.so.bz2 testfile54-32.so.debug.bz2 \
268              testfile54-32.prelink.so.bz2 testfile54-32.noshdrs.so.bz2 \
269              testfile54-64.so.bz2 testfile54-64.so.debug.bz2 \
270              testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2 \
271              testfile55-32.bz2 testfile55-32.debug.bz2 \
272              testfile55-32.prelink.bz2 testfile55-64.bz2 \
273              testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \
274              testfile56.bz2 testfile57.bz2 testfile58.bz2 \
275              run-typeiter.sh testfile59.bz2 \
276              run-readelf-d.sh testlib_dynseg.so.bz2 \
277              testfile-s390x-hash-both.bz2 \
278              run-readelf-gdb_index.sh testfilegdbindex5.bz2 \
279              testfilegdbindex7.bz2 \
280              run-readelf-s.sh testfilebazdbg.bz2 testfilebazdyn.bz2 \
281              testfilebazmin.bz2 testfilebazdbg.debug.bz2 testfilebazmdb.bz2 \
282              testfilebaztab.bz2 testfilebasmin.bz2 testfilebaxmin.bz2 \
283              testfilebazdbg_pl.bz2 testfilebazmin_pl.bz2 \
284              testfilebazdbg_plr.bz2 testfilebazmin_plr.bz2 \
285              testfilebazdbgppc64.bz2 testfilebazdbgppc64.debug.bz2 \
286              testfilebazdbgppc64_pl.bz2 testfilebazdbgppc64_plr.bz2 \
287              testfilebazdynppc64.bz2 testfilebazmdbppc64.bz2 \
288              testfilebazminppc64.bz2 testfilebazminppc64_pl.bz2 \
289              testfilebazminppc64_plr.bz2 testfilebaztabppc64.bz2 \
290              run-readelf-variant.sh testfile-ada-variant.bz2 \
291              run-dwflsyms.sh \
292              run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \
293              run-low_high_pc.sh testfile_low_high_pc.bz2 \
294              run-macro-test.sh testfile-macinfo.bz2 testfile-macros.bz2 \
295              run-elf_cntl_gelf_getshdr.sh \
296              run-test-archive64.sh testarchive64.a.bz2 \
297              testfile60.bz2 testfile61.bz2 \
298              run-readelf-vmcoreinfo.sh testfile62.bz2 \
299              run-readelf-mixed-corenote.sh testfile63.bz2 testfile64.bz2 \
300              testfile65.bz2 testfile67.bz2 testfile68.bz2 \
301              testfile69.core.bz2 testfile69.so.bz2 \
302              testfile70.core.bz2 testfile70.exec.bz2 testfile71.bz2 \
303              run-dwfllines.sh run-dwfl-report-elf-align.sh \
304              testfile-dwfl-report-elf-align-shlib.so.bz2 \
305              testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \
306              test-core.exec.bz2 run-addr2line-test.sh \
307              run-addr2line-i-test.sh testfile-inlines.bz2 \
308              run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \
309              run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \
310              testfileppc32.bz2 testfileppc64.bz2 \
311              testfiles390.bz2 testfiles390x.bz2 \
312              testfilearm.bz2 testfileaarch64.bz2 \
313              run-varlocs.sh run-exprlocs.sh testfile-stridex.bz2 \
314              testfile_const_type.c testfile_const_type.bz2 \
315              testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \
316              testfile_parameter_ref.c testfile_parameter_ref.bz2 \
317              testfile_entry_value.c testfile_entry_value.bz2 \
318              testfile_implicit_value.c testfile_implicit_value.bz2 \
319              testfile_aarch64_core.bz2 testfile_i686_core.bz2 \
320              addrx_constx-4.dwo.bz2 addrx_constx-5.dwo.bz2 \
321              testfile-addrx_constx-4.bz2 testfile-addrx_constx-5.bz2 \
322              run-funcretval.sh funcretval_test.c funcretval_test_aarch64.bz2 \
323              run-backtrace-data.sh run-backtrace-dwarf.sh cleanup-13.c \
324              run-backtrace-native.sh run-backtrace-native-biarch.sh \
325              run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \
326              run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
327              run-backtrace-fp-core-x86_64.sh \
328              run-backtrace-core-x32.sh \
329              run-backtrace-fp-core-aarch64.sh \
330              backtrace.aarch64.fp.core.bz2 backtrace.aarch64.fp.exec.bz2 \
331              backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \
332              run-backtrace-fp-core-i386.sh \
333              backtrace.i386.fp.core.bz2 backtrace.i386.fp.exec.bz2 \
334              run-backtrace-fp-core-ppc64le.sh \
335              backtrace.ppc64le.fp.core.bz2 backtrace.ppc64le.fp.exec.bz2 \
336              backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \
337              backtrace.x86_64.fp.core.bz2 backtrace.x86_64.fp.exec.bz2 \
338              backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \
339              run-backtrace-core-ppc.sh testfile66.bz2 testfile66.core.bz2 \
340              backtrace.s390x.core.bz2 backtrace.s390x.exec.bz2 \
341              backtrace.s390.core.bz2 backtrace.s390.exec.bz2 \
342              run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
343              run-backtrace-core-aarch64.sh \
344              backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \
345              run-backtrace-core-sparc.sh \
346              backtrace.sparc.core.bz2 backtrace.sparc.exec.bz2 \
347              run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \
348              testfile-backtrace-demangle.cc \
349              testfile-backtrace-demangle.core.bz2 \
350              run-stack-d-test.sh run-stack-i-test.sh \
351              run-stack-demangled-test.sh \
352              testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \
353              run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \
354              run-readelf-zdebug-rel.sh testfile-debug-rel.o.bz2 \
355              testfile-debug-rel-g.o.bz2 testfile-debug-rel-z.o.bz2 \
356              run-readelf-zx.sh run-readelf-zp.sh \
357              run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \
358              linkmap-cut.bz2 linkmap-cut.core.bz2 \
359              run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \
360              testfile-sizes3.o.bz2 testfile-sizes4.o.bz2 testfile-sizes4.s \
361              run-peel-type.sh \
362              run-readelf-A.sh testfileppc32attrs.o.bz2 \
363              testfilesparc64attrs.o.bz2 testfileppc64attrs.o.bz2 \
364              testfile-debug-types.bz2 \
365              run-getsrc-die.sh run-strptr.sh \
366              testfile-x32-core.bz2 testfile-x32.bz2 \
367              backtrace.x32.core.bz2 backtrace.x32.exec.bz2 \
368              testfile-x32-s.bz2 testfile-x32-d.bz2 testfile-x32-debug.bz2 \
369              run-lfs-symbols.sh lfs-symbols testfile-nolfs.bz2 \
370              testfile-zgnu32.bz2 testfile-zgnu64.bz2 \
371              testfile-zgnu32be.bz2 testfile-zgnu64be.bz2 \
372              run-dwelfgnucompressed.sh \
373              testfile-zgabi32.bz2 testfile-zgabi64.bz2 \
374              testfile-zgabi32be.bz2 testfile-zgabi64be.bz2 \
375              run-elfgetchdr.sh run-elfgetzdata.sh run-elfputzdata.sh \
376              run-zstrptr.sh run-compress-test.sh \
377              run-disasm-bpf.sh \
378              testfile-bpf-dis1.expect.bz2 testfile-bpf-dis1.o.bz2 \
379              testfile-m68k-core.bz2 testfile-m68k.bz2 testfile-m68k-s.bz2 \
380              run-dwarf-die-addr-die.sh \
381              run-get-units-invalid.sh run-get-units-split.sh \
382              testfile-hello4.dwo.bz2 testfile-hello5.dwo.bz2 \
383              testfile-splitdwarf-4.bz2 testfile-splitdwarf-5.bz2 \
384              testfile-world5.dwo.bz2 testfile-world4.dwo.bz2 \
385              run-attr-integrate-skel.sh \
386              run-all-dwarf-ranges.sh testfilesplitranges4.debug.bz2 \
387              testfile-ranges-hello.dwo.bz2 testfile-ranges-world.dwo.bz2 \
388              run-unit-info.sh
389
390 if USE_VALGRIND
391 valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1'
392 endif
393
394
395 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
396                               bindir=$(DESTDIR)$(bindir); \
397                               LC_ALL=C; LANG=C; \
398                               VALGRIND_CMD=$(valgrind_cmd); \
399                               abs_srcdir=$(abs_srcdir); \
400                               abs_builddir=$(abs_builddir); \
401                               abs_top_builddir=$(abs_top_builddir); \
402                               export abs_srcdir; export abs_builddir; \
403                               export abs_top_builddir; \
404                               export libdir; export bindir; \
405                               export LC_ALL; export LANG; export VALGRIND_CMD; \
406                               NM=$(NM); export NM;
407 installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
408                          installed $(tests_rpath) \
409                          '$(program_transform_name)'
410 if STANDALONE
411 TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
412 LOG_COMPILER = $(installed_LOG_COMPILER)
413 else !STANDALONE
414 TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
415                     abs_srcdir=$(abs_srcdir);  abs_builddir=$(abs_builddir); \
416                     abs_top_builddir=$(abs_top_builddir); \
417                     export abs_srcdir; export abs_builddir; \
418                     export abs_top_builddir; \
419                     export LC_ALL; export LANG; export VALGRIND_CMD; \
420                     NM=$(NM); export NM;
421 LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
422                $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm
423
424 installcheck-local:
425         $(MAKE) $(AM_MAKEFLAGS) \
426                 TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
427                 LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
428 endif !STANDALONE
429
430 if STANDALONE
431 libdw = -ldw
432 libelf = -lelf
433 libasm = -lasm
434 libebl = -lebl
435 else !STANDALONE
436 if BUILD_STATIC
437 libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
438 libelf = ../libelf/libelf.a -lz
439 libasm = ../libasm/libasm.a
440 else
441 libdw = ../libdw/libdw.so
442 libelf = ../libelf/libelf.so
443 libasm = ../libasm/libasm.so
444 endif
445 libebl = ../libebl/libebl.a
446 libeu = ../lib/libeu.a
447 endif !STANDALONE
448
449 arextract_LDADD = $(libelf)
450 arsymtest_LDADD = $(libelf)
451 newfile_LDADD = $(libelf)
452 saridx_LDADD = $(libelf)
453 scnnames_LDADD = $(libelf)
454 sectiondump_LDADD = $(libelf)
455 showptable_LDADD = $(libelf)
456 hash_LDADD = $(libelf)
457 test_nlist_LDADD = $(libelf)
458 msg_tst_LDADD = $(libelf)
459 newscn_LDADD = $(libelf)
460 early_offscn_LDADD = $(libelf)
461 ecp_LDADD = $(libelf)
462 update1_LDADD = $(libelf)
463 update2_LDADD = $(libelf)
464 update3_LDADD = $(libdw) $(libelf)
465 update4_LDADD = $(libdw) $(libelf)
466 show_die_info_LDADD = $(libdw) $(libelf)
467 get_pubnames_LDADD = $(libdw) $(libelf)
468 show_abbrev_LDADD = $(libdw) $(libelf)
469 get_lines_LDADD = $(libdw) $(libelf)
470 get_files_LDADD = $(libdw) $(libelf)
471 get_aranges_LDADD = $(libdw) $(libelf)
472 allfcts_LDADD = $(libdw) $(libelf)
473 line2addr_LDADD = $(libdw) $(argp_LDADD)
474 addrscopes_LDADD = $(libdw) $(argp_LDADD)
475 funcscopes_LDADD = $(libdw) $(argp_LDADD)
476 funcretval_LDADD = $(libdw) $(argp_LDADD)
477 allregs_LDADD = $(libdw) $(argp_LDADD)
478 find_prologues_LDADD = $(libdw) $(argp_LDADD)
479 #show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
480 asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
481 asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
482 asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
483 asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
484 asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
485 asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
486 asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
487 asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
488 asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
489 dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
490 rdwrmmap_LDADD = $(libelf)
491 dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl
492 arls_LDADD = $(libelf)
493 dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl
494 dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl
495 dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl
496 dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
497 dwarf_getmacros_LDADD = $(libdw)
498 dwarf_ranges_LDADD = $(libdw)
499 dwarf_getstring_LDADD = $(libdw)
500 addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
501 test_flag_nobits_LDADD = $(libelf)
502 rerequest_tag_LDADD = $(libdw)
503 alldts_LDADD = $(libdw) $(libelf)
504 typeiter_LDADD = $(libdw) $(libelf)
505 typeiter2_LDADD = $(libdw) $(libelf)
506 low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD)
507 test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
508 dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD)
509 dwfllines_LDADD = $(libdw) $(libelf) $(argp_LDADD)
510 dwfl_report_elf_align_LDADD = $(libdw)
511 varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD)
512 backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD)
513 # backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables:
514 backtrace_child_CFLAGS = $(fpie_CFLAGS)
515 backtrace_child_LDFLAGS = -pie -pthread
516 backtrace_child_biarch_SOURCES = backtrace-child.c
517 backtrace_data_LDADD = $(libdw) $(libelf)
518 backtrace_dwarf_CFLAGS = -Wno-unused-parameter
519 backtrace_dwarf_LDADD = $(libdw) $(libelf)
520 debuglink_LDADD = $(libdw) $(libelf)
521 debugaltlink_LDADD = $(libdw) $(libelf)
522 buildid_LDADD = $(libdw) $(libelf)
523 deleted_LDADD = ./deleted-lib.so
524 deleted_lib_so_LDFLAGS = -shared
525 deleted_lib_so_CFLAGS = $(fpic_CFLAGS) -fasynchronous-unwind-tables
526 aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD)
527 peel_type_LDADD = $(libdw) $(libelf) $(argp_LDADD)
528 vdsosyms_LDADD = $(libdw) $(libelf)
529 getsrc_die_LDADD = $(libdw) $(libelf)
530 strptr_LDADD = $(libelf)
531 newdata_LDADD = $(libelf)
532 elfstrtab_LDADD = $(libelf)
533 dwfl_proc_attach_LDADD = $(libdw)
534 dwfl_proc_attach_LDFLAGS = -pthread $(AM_LDFLAGS)
535 elfshphehdr_LDADD =$(libelf)
536 elfstrmerge_LDADD = $(libdw) $(libelf)
537 dwelfgnucompressed_LDADD = $(libelf) $(libdw)
538 elfgetchdr_LDADD = $(libelf) $(libdw)
539 elfgetzdata_LDADD = $(libelf)
540 elfputzdata_LDADD = $(libelf)
541 zstrptr_LDADD = $(libelf)
542 emptyfile_LDADD = $(libelf)
543 vendorelf_LDADD = $(libelf)
544 fillfile_LDADD = $(libelf)
545 dwarf_default_lower_bound_LDADD = $(libdw)
546 dwarf_die_addr_die_LDADD = $(libdw)
547 get_units_invalid_LDADD = $(libdw)
548 get_units_split_LDADD = $(libdw)
549 attr_integrate_skel_LDADD = $(libdw)
550 all_dwarf_ranges_LDADD = $(libdw)
551 unit_info_LDADD = $(libdw)
552
553 # We want to test the libelf header against the system elf.h header.
554 # Don't include any -I CPPFLAGS.
555 system_elf_libelf_test_CPPFLAGS =
556 system_elf_libelf_test_LDADD = $(libelf)
557
558 # A lock file used to make sure only one test dumps core at a time
559 CLEANFILES += core-dump-backtrace.lock
560
561 if GCOV
562 check: check-am coverage
563 .PHONY: coverage
564 coverage:
565         -$(srcdir)/coverage.sh
566 endif