File: Makefile.am

package info (click to toggle)
libabigail 2.9-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,021,756 kB
  • sloc: xml: 572,663; cpp: 110,945; sh: 11,868; ansic: 4,329; makefile: 3,486; python: 1,684; ada: 62
file content (278 lines) | stat: -rw-r--r-- 8,449 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
## SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
SUBDIRS = data

AM_CXXFLAGS = $(VISIBILITY_FLAGS)

FEDABIPKGDIFF_TEST =
if ENABLE_FEDABIPKGDIFF
if ENABLE_RUNNING_TESTS_WITH_PY3
FEDABIPKGDIFF_TEST += runtestfedabipkgdiffpy3.sh
else
FEDABIPKGDIFF_TEST += runtestfedabipkgdiff.py
endif
endif

ABIDB_TESTS =
if ENABLE_ABIDB
ABIDB_TESTS += runtestabidb1.sh runtestabidb2.sh
endif



RUN_TEST_SLOW_SELF_COMPARE=runtestslowselfcompare.sh

# rather expensive tests (keep in this order), > 1s runtime
TESTS=				\
$(RUN_TEST_SLOW_SELF_COMPARE)   \
runtestaltdwarf			\
runtestdiffsuppr		\
runtesttypesstability		\
runtestdiffpkg			\
runtestannotate			\
runtestdifffilter		\
runtestreaddwarf	        \
runtestcanonicalizetypes.sh     \
$(ABIDB_TESTS)

if CTF_READER
TESTS += runtestreadctf
endif

if BTF_READER
TESTS += runtestreadbtf
endif

# rather cheap tests
TESTS+=				\
runtestabicompat		\
runtestabidiff			\
runtestabidiffexit		\
runtestcorediff			\
runtestcxxcompat		\
runtestdiffdwarf		\
runtestdiffdwarfabixml		\
runtestelfhelpers		\
runtestini			\
runtestkmiwhitelist		\
runtestlookupsyms		\
runtestreadwrite		\
runtestsymtab			\
runtestsymtabreader		\
runtesttoolsutils		\
runtestsvg			\
$(FEDABIPKGDIFF_TEST)


if ENABLE_RUNNING_TESTS_WITH_PY3
TESTS += runtestdefaultsupprspy3.sh
else
TESTS += runtestdefaultsupprs.py
endif

EXTRA_DIST = \
runtestcanonicalizetypes.sh.in \
runtestfedabipkgdiff.py.in \
runtestslowselfcompare.sh.in \
mockfedabipkgdiff.in \
test-valgrind-suppressions.supp

if ENABLE_RUNNING_TESTS_WITH_PY3
EXTRA_DIST += \
runtestfedabipkgdiffpy3.sh.in 	\
runtestdefaultsupprspy3.sh.in
endif

if ENABLE_ABIDB
EXTRA_DIST += runtestabidb1.sh.in runtestabidb2.sh.in
endif

CLEANFILES = \
runtestcanonicalizetypes.output.txt \
runtestcanonicalizetypes.output.final.txt

noinst_PROGRAMS= $(TESTS) testirwalker testdiff2 printdifftree
noinst_SCRIPTS = mockfedabipkgdiff
noinst_LTLIBRARIES = libtestutils.la libtestreadcommon.la libcatch.la

libtestutils_la_SOURCES=	\
test-utils.h 			\
test-utils.cc

libtestutils_la_CXXFLAGS=		\
-DABIGAIL_SRC_DIR=\"${abs_top_srcdir}\"  	\
-DABIGAIL_BUILD_DIR=\"${abs_top_builddir}\"

libtestreadcommon_la_SOURCES=	\
test-read-common.h 		\
test-read-common.cc

libtestreadcommon_la_CXXFLAGS=			\
-DABIGAIL_SRC_DIR=\"${abs_top_srcdir}\"  	\
-DABIGAIL_BUILD_DIR=\"${abs_top_builddir}\"

libcatch_la_SOURCES = lib/catch.cc lib/catch.hpp

runtestreadwrite_SOURCES=test-read-write.cc
runtestreadwrite_LDADD=libtestutils.la $(top_builddir)/src/libabigail.la

runtestreaddwarf_SOURCES=test-read-dwarf.cc
runtestreaddwarf_LDADD=libtestreadcommon.la libtestutils.la	\
		       $(top_builddir)/src/libabigail.la
runtestreaddwarf_LDFLAGS=-pthread

if CTF_READER
runtestreadctf_SOURCES=test-read-ctf.cc
runtestreadctf_LDADD=libtestreadcommon.la libtestutils.la	\
		     $(top_builddir)/src/libabigail.la
runtestreadctf_LDFLAGS=-pthread
endif

if BTF_READER
runtestreadbtf_SOURCES=test-read-btf.cc
runtestreadbtf_LDADD=libtestreadcommon.la libtestutils.la	\
		     $(top_builddir)/src/libabigail.la
runtestreadbtf_LDFLAGS=-pthread
endif

runtestannotate_SOURCES=test-annotate.cc
runtestannotate_LDADD=libtestutils.la $(top_builddir)/src/libabigail.la

runtestlookupsyms_SOURCES=test-lookup-syms.cc
runtestlookupsyms_LDADD=libtestutils.la $(top_builddir)/src/libabigail.la

runtestaltdwarf_SOURCES=test-alt-dwarf-file.cc
runtestaltdwarf_LDADD=libtestutils.la $(top_builddir)/src/libabigail.la

runtestcorediff_SOURCES=test-core-diff.cc
runtestcorediff_LDADD=libtestutils.la $(top_builddir)/src/libabigail.la

runtestabidiff_SOURCES = test-abidiff.cc
runtestabidiff_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestabidiffexit_SOURCES = test-abidiff-exit.cc
runtestabidiffexit_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestdiffdwarf_SOURCES = test-diff-dwarf.cc
runtestdiffdwarf_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestdifffilter_SOURCES = test-diff-filter.cc
runtestdifffilter_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestdiffsuppr_SOURCES = test-diff-suppr.cc
runtestdiffsuppr_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestdiffdwarfabixml_SOURCES = test-diff-dwarf-abixml.cc
runtestdiffdwarfabixml_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestabicompat_SOURCES = test-abicompat.cc
runtestabicompat_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestdiffpkg_SOURCES = test-diff-pkg.cc
runtestdiffpkg_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtesttypesstability_SOURCES = test-types-stability.cc
runtesttypesstability_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestini_SOURCES = test-ini.cc
runtestini_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtesttoolsutils_SOURCES = test-tools-utils.cc
runtesttoolsutils_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la

runtestkmiwhitelist_SOURCES = test-kmi-whitelist.cc
runtestkmiwhitelist_LDADD = libtestutils.la libcatch.la $(top_builddir)/src/libabigail.la

runtestelfhelpers_SOURCES = test-elf-helpers.cc
runtestelfhelpers_LDADD = libcatch.la $(top_builddir)/src/libabigail.la

runtestcxxcompat_SOURCES = test-cxx-compat.cc
runtestcxxcompat_LDADD = libcatch.la $(top_builddir)/src/libabigail.la

runtestsymtab_SOURCES = test-symtab.cc
runtestsymtab_LDADD = libtestutils.la libcatch.la $(top_builddir)/src/libabigail.la

runtestsymtabreader_SOURCES = test-symtab-reader.cc
runtestsymtabreader_LDADD = libcatch.la $(top_builddir)/src/libabigail.la

runtestsvg_SOURCES=test-svg.cc
runtestsvg_LDADD=$(top_builddir)/src/libabigail.la

testirwalker_SOURCES=test-ir-walker.cc
testirwalker_LDADD=$(top_builddir)/src/libabigail.la

testdiff2_SOURCES=test-diff2.cc
testdiff2_LDADD=$(top_builddir)/src/libabigail.la

printdifftree_SOURCES = print-diff-tree.cc
printdifftree_LDADD = $(top_builddir)/src/libabigail.la

runtestslowselfcompare_sh_SOURCES =
runtestslowselfcompare.sh$(EXEEXT):

runtestcanonicalizetypes_sh_SOURCES =
runtestcanonicalizetypes.sh$(EXEEXT):

runtestfedabipkgdiff_py_SOURCES =
runtestfedabipkgdiff.py$(EXEEXT):

runtestdefaultsupprs_py_SOURCES =
runtestdefaultsupprs.py$(EXEEXT):

runtestfedabipkgdiffpy3_sh_SOURCES =
runtestfedabipkgdiffpy3.sh$(EXEEXT):

runtestdefaultsupprspy3_sh_SOURCES =
runtestdefaultsupprspy3.sh$(EXEEXT):

runtestabidb1_sh_SOURCES =
runtestabidb1.sh$(EXEEXT):

runtestabidb2_sh_SOURCES =
runtestabidb2.sh$(EXEEXT):


AM_CPPFLAGS=-I${abs_top_srcdir}/include -I${abs_top_srcdir}/src \
-I${abs_top_builddir}/include -I${abs_top_srcdir}/tools -fPIC

clean-local: clean-local-check
.PHONY: clean-local-check

clean-local-check:
	-rm -rf ${builddir}/output *.svg *.gv

@VALGRIND_CHECK_RULES@
VALGRIND_SUPPRESSIONS_FILES = ${srcdir}/test-valgrind-suppressions.supp

# These are flags passed to Valgrind so that it follows children
# processes of the test programs.  This is because many test programs
# actually fork libabigail command line tools, and we want to valgrind
# those libabigail command line tools as well.
#
# The problem though is that there are many other command line
# programs that are forked too.  For instance, /bin/sh is forked
# because tests are using the system() function to execute commands.
# So we must tell Valgrind to avoid following a bunch of command line
# programs that we don't care about and that take a lot of time to
# valgrind.
RECURSIVE_VALGRIND_FLAGS = \
--num-callers=30 \
--trace-children=yes \
--trace-children-skip=/bin/diff,/bin/rm,/bin/mkdir,/bin/cd,*cpio,/bin/dpkg,/bin/rpm,/bin/test,/bin/tar,/bin/sed,/bin/ls,/bin/g++,/*collect*,/bin/ld,/usr/bin/sed,/usr/bin/diff,/usr/bin/ls

# Use the target below to run tests under Valgrind's memcheck tool by
# telling it to follow children process, so that it can also check
# libabigail tools that are forked by the tests.  This usually takes a
# while.  So, to launch just one test in this configuration, if you
# are in the top-most source directory you can do:
#
#  make -C <build-directory>/tests check-valgrind-memcheck-recursive TESTS=runtestdiffsuppr

check-valgrind-memcheck-recursive:
	$(MAKE) check-valgrind-memcheck VALGRIND_FLAGS="${RECURSIVE_VALGRIND_FLAGS}"

check-valgrind-helgrind-recursive:
	$(MAKE) check-valgrind-helgrind VALGRIND_FLAGS="${RECURSIVE_VALGRIND_FLAGS}"

check-self-compare:
	$(MAKE) check TESTS=runtestslowselfcompare.sh ENABLE_SLOW_TEST=yes AM_TESTSUITE_SUMMARY_HEADER='  for runtestslowselfcompare.sh'