File: Makefile.am

package info (click to toggle)
cfengine3 3.6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 20,256 kB
  • ctags: 9,613
  • sloc: ansic: 116,129; sh: 12,366; yacc: 1,088; makefile: 1,006; lex: 391; perl: 197; xml: 21; sed: 4
file content (381 lines) | stat: -rw-r--r-- 11,927 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# Just recursively include in dist tarball all data we need for unit tests
EXTRA_DIST = data

AM_CPPFLAGS = $(CORE_CPPFLAGS) \
	$(ENTERPRISE_CFLAGS) \
	-I$(srcdir)/../../libcfnet \
	-I$(srcdir)/../../libenv \
	-I$(srcdir)/../../libpromises \
	-I$(srcdir)/../../libutils \
	-I$(srcdir)/../../cf-monitord \
	-I$(srcdir)/../../cf-serverd \
	-I$(srcdir)/../../cf-agent \
	-I$(srcdir)/../../cf-execd \
	-I$(srcdir)/../../cf-key \
	-DTESTDATADIR='"$(srcdir)/data"'

LDADD = ../../libpromises/libpromises.la libtest.la

# automake does not support "maude_LIBS" variables. We can only alter
# the generic LIBS one. In case the functions are mocked in the test
# implementation, then we are pretty sure that they will be overriden by
# our local implementation. So we include *everything*...
LIBS = $(CORE_LIBS)
AM_LDFLAGS = $(CORE_LDFLAGS)


check_LTLIBRARIES = libtest.la
libtest_la_SOURCES = cmockery.c cmockery.h schema.h test.c test.h \
	../../libutils/alloc.c \
	../../libpromises/patches.c \
	../../libpromises/constants.c \
        ../../libpromises/known_dirs.c \
        ../../libutils/map.c \
        ../../libutils/array_map.c \
        ../../libutils/hash.c \
        ../../libutils/hash_map.c

libtest_la_LIBADD = ../../libcompat/libcompat.la

check_LTLIBRARIES += libstr.la
libstr_la_SOURCES = ../../libutils/string_lib.c ../../libutils/regex.c \
	../../libutils/encode.c ../../libutils/writer.c \
	../../libutils/sequence.c
libstr_la_LIBADD = libtest.la


check_LTLIBRARIES += libdb.la
libdb_la_SOURCES = ../../libpromises/dbm_api.c \
	../../libpromises/mutex.c \
	../../libpromises/dbm_quick.c \
	../../libpromises/dbm_tokyocab.c \
	../../libpromises/dbm_lmdb.c \
	../../libpromises/dbm_migration.c \
	../../libpromises/dbm_migration_lastseen.c \
	../../libpromises/dbm_migration_bundles.c \
	../../libutils/logging.c \
	../../libutils/atexit.c
if HPUX
libdb_la_SOURCES += ../../libpromises/cf3globals.c
endif
libdb_la_LIBADD = libstr.la ../../libutils/libutils.la
#libdb_la_CPPFLAGS = $(LMDB_CPPFLAGS) $(TOKYOCABINET_CPPFLAGS) $(QDBM_CPPFLAGS)
# Make sure that source files are compiled to separate object files libdb_la-file.o
libdb_la_CFLAGS = $(AM_CFLAGS)

check_PROGRAMS = \
	arg_split_test \
	assoc_test \
	atexit_test \
	csv_writer_test \
	item_test \
	rlist_test \
	domainname_test \
	set_test \
	set_domainname_test \
	str_test \
	json_test \
	csv_parser_test \
	evalfunction_test \
	eval_context_test \
	regex_test \
	alloc_test \
	string_writer_test \
	file_writer_test \
	xml_writer_test \
	sequence_test \
	lastseen_test \
	lastseen_migration_test \
	changes_migration_test \
	db_test \
	db_concurrent_test \
	dbm_migration_bundles_test \
	misc_lib_test \
	item_lib_test \
	crypto_symmetric_test \
	persistent_lock_test  \
	thread_test \
	package_versions_compare_test \
	files_lib_test \
	file_lib_test \
	map_test \
	parsemode_test \
	parser_test \
	policy_test \
	sort_test \
	file_name_test \
	logging_test \
	logging_timestamp_test \
	granules_test \
	scope_test \
	conversion_test \
	files_interfaces_test \
	refcount_test \
	list_test \
	cf_key_functions_test \
	connection_management_test \
	expand_test \
	string_expressions_test \
	var_expressions_test \
	process_terminate_unix_test \
	exec-config-test \
	generic_agent_test \
	syntax_test \
	sysinfo_test \
	ipaddress_test \
	hashes_test \
	rb-tree-test \
	variable_test \
	protocol_test \
	mon_load_test \
	mon_processes_test \
	mustache_test \
	class_test \
	version_test \
	hash_test \
	key_test \
	cf_upgrade_test \
	queue_test \
	matching_test \
	ring_buffer_test \
	strlist_test \
	addr_lib_test \
	libcompat_test

if HAVE_AVAHI_CLIENT
if HAVE_AVAHI_COMMON
check_PROGRAMS += \
    findhub_test \
    avahi_config_test
endif
endif

check_SCRIPTS = dynamic_dependency_test.sh
EXTRA_DIST   += dynamic_dependency_test.sh

TESTS = $(check_PROGRAMS) $(check_SCRIPTS)

#
# OS X uses real system calls instead of our stubs unless this option is used
#
TESTS_ENVIRONMENT = DYLD_FORCE_FLAT_NAMESPACE=yes

atexit_test_SOURCES = atexit_test.c
atexit_test_LDADD = libtest.la libdb.la

csv_writer_test_SOURCES = csv_writer_test.c ../../libutils/csv_writer.c
csv_writer_test_LDADD = libtest.la libstr.la

conversion_test_SOURCES = conversion_test.c ../../libpromises/conversion.c

if !BUILTIN_EXTENSIONS
    check_PROGRAMS += enterprise_extension_test

    enterprise_extension_test_SOURCES = enterprise_extension_test.c

    check_LTLIBRARIES += cfengine-enterprise.la
    cfengine_enterprise_la_SOURCES = enterprise_extension_test_lib.c
    cfengine_enterprise_la_LDFLAGS = $(AM_LDFLAGS) \
	-avoid-version -module -shared -export-dynamic -rpath /
    EXTRA_enterprise_extension_test_DEPENDENCIES = cfengine-enterprise.la
endif

set_domainname_test_SOURCES = set_domainname_test.c
set_domainname_test_LDADD = libstr.la ../../libpromises/libpromises.la

str_test_SOURCES = str_test.c
str_test_LDADD = libstr.la

xml_writer_test_SOURCES = xml_writer_test.c ../../libutils/xml_writer.c
xml_writer_test_LDADD = libtest.la libstr.la

list_test_SOURCES = list_test.c 

refcount_test_SOURCES = refcount_test.c ../../libutils/refcount.c

csv_parser_test_SOURCES = csv_parser_test.c ../../libutils/csv_parser.c
csv_parser_test_LDADD = libtest.la ../../libutils/libutils.la

regex_test_SOURCES = regex_test.c ../../cf-agent/match_scope.c

cf_key_functions_test_SOURCES = cf_key_functions_test.c ../../cf-key/cf-key-functions.c

ipaddress_test_SOURCES = ipaddress_test.c 

protocol_test_SOURCES = protocol_test.c \
	../../cf-serverd/server_common.c \
	../../cf-serverd/server_tls.c \
	../../cf-serverd/server.c \
	../../cf-serverd/cf-serverd-enterprise-stubs.c \
	../../cf-serverd/server_transform.c \
	../../cf-serverd/cf-serverd-functions.c \
	../../cf-serverd/server_access.c \
	../../cf-serverd/strlist.c
protocol_test_LDADD = ../../libpromises/libpromises.la libtest.la

if HAVE_AVAHI_CLIENT
if HAVE_AVAHI_COMMON

findhub_test_SOURCES = findhub_test.c ../../cf-agent/findhub.c ../../cf-agent/load_avahi.c

avahi_config_test_SOURCES = avahi_config_test.c \
	../../cf-serverd/server_common.c \
	../../cf-serverd/server_tls.c \
	../../cf-serverd/server.c \
	../../cf-serverd/server_transform.c \
	../../cf-serverd/cf-serverd-enterprise-stubs.c \
	../../cf-serverd/server_access.c \
	../../cf-serverd/server_classic.c \
	../../cf-serverd/strlist.c
avahi_config_test_LDADD = ../../libpromises/libpromises.la libtest.la

endif
endif

#file_writer_test_CPPFLAGS = -I$(top_srcdir)/libutils
file_writer_test_SOURCES = file_writer_test.c gcov-stub.c

db_test_SOURCES = db_test.c
db_test_LDADD = libdb.la

db_concurrent_test_SOURCES = db_concurrent_test.c
#db_concurrent_test_CPPFLAGS = $(libdb_la_CPPFLAGS)
db_concurrent_test_LDADD = libdb.la

lastseen_test_SOURCES = lastseen_test.c \
	../../libpromises/item_lib.c  ../../libpromises/lastseen.c ../../libutils/statistics.c
#lastseen_test_CPPFLAGS = $(libdb_la_CPPFLAGS)
lastseen_test_LDADD = libdb.la ../../libpromises/libpromises.la

lastseen_migration_test_SOURCES = lastseen_migration_test.c \
	../../libpromises/lastseen.c ../../libutils/statistics.c ../../libpromises/item_lib.c
#lastseen_migration_test_CPPFLAGS = $(libdb_la_CPPFLAGS)
lastseen_migration_test_LDADD = libdb.la ../../libpromises/libpromises.la

dbm_migration_bundles_test_SOURCES = dbm_migration_bundles_test.c
dbm_migration_bundles_test_LDADD = libdb.la
#dbm_migration_bundles_test_CPPFLAGS = $(libdb_la_CPPFLAGS)

CLEANFILES = *.gcno *.gcda cfengine-enterprise.so

package_versions_compare_test_SOURCES = package_versions_compare_test.c ../../cf-agent/verify_packages.c ../../cf-agent/vercmp.c ../../cf-agent/vercmp_internal.c ../../cf-agent/retcode.c ../../cf-agent/match_scope.c

#package_versions_compare_test_CPPFLAGS = $(AM_CPPFLAGS)
package_versions_compare_test_LDADD = ../../libpromises/libpromises.la libtest.la

file_lib_test_SOURCES = file_lib_test.c \
	../../libutils/file_lib.c \
	../../libutils/logging.c \
	../../libutils/misc_lib.c \
	../../libutils/string_lib.c \
	../../libutils/sequence.c \
	../../libutils/unix_dir.c \
	../../libutils/writer.c
file_lib_test_LDADD = libtest.la
file_lib_test_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_SYMLINK_ATOMICITY

sort_test_SOURCES = sort_test.c
sort_test_LDADD = libtest.la ../../libpromises/libpromises.la

logging_test_SOURCES = logging_test.c ../../libpromises/syslog_client.c
logging_test_LDADD = libtest.la ../../libutils/libutils.la

logging_timestamp_test_SOURCES = logging_timestamp_test.c ../../libutils/logging.h
logging_timestamp_test_LDADD = libtest.la ../../libutils/libutils.la

connection_management_test_SOURCES = connection_management_test.c ../../cf-serverd/server_common.c ../../cf-serverd/server_tls.c
connection_management_test_LDADD = ../../libpromises/libpromises.la libtest.la ../../cf-serverd/libcf-serverd.la

rlist_test_SOURCES = rlist_test.c \
       ../../libpromises/rlist.c ../../libutils/logging.c
rlist_test_LDADD = libtest.la libstr.la ../../libpromises/libpromises.la

if LINUX

check_PROGRAMS += linux_process_test

linux_process_test_SOURCES = linux_process_test.c \
	../../libpromises/process_unix.c \
	../../libpromises/process_linux.c \
	../../libutils/file_lib.c
linux_process_test_LDADD = libtest.la ../../libutils/libutils.la

endif

if AIX

check_PROGRAMS += aix_process_test

aix_process_test_SOURCES = aix_process_test.c \
	../../libpromises/process_unix.c \
	../../libpromises/process_aix.c \
	../../libutils/file_lib.c
aix_process_test_LDADD = libtest.la ../../libutils/libutils.la

endif

if SOLARIS

check_PROGRAMS += solaris_process_test

solaris_process_test_SOURCES = solaris_process_test.c \
	../../libpromises/process_unix.c \
	../../libpromises/process_solaris.c \
	../../libutils/file_lib.c
solaris_process_test_LDADD = libtest.la ../../libutils/libutils.la

endif

process_terminate_unix_test_SOURCES = process_terminate_unix_test.c \
	../../libpromises/process_unix.c
process_terminate_unix_test_LDADD = libtest.la ../../libutils/libutils.la

exec_config_test_SOURCES = exec-config-test.c \
	../../cf-execd/exec-config.c ../../cf-execd/execd-config.c
exec_config_test_LDADD = libtest.la ../../libpromises/libpromises.la

sysinfo_test_LDADD = libtest.la \
	../../libenv/libenv.la \
	../../libpromises/libpromises.la

mon_load_test_SOURCES = mon_load_test.c ../../cf-monitord/mon.h ../../cf-monitord/mon_load.c
mon_load_test_LDADD = ../../libpromises/libpromises.la libtest.la

mon_processes_test_SOURCES = mon_processes_test.c ../../cf-monitord/mon.h ../../cf-monitord/mon_processes.c
mon_processes_test_LDADD = ../../libpromises/libpromises.la libtest.la

# tls_generic_test uses stub functions interposition which does not work (yet)
# under OS X. Another way of stubbing functions from libpromises is needed.
if !XNU
check_PROGRAMS += tls_generic_test
tls_generic_test_SOURCES = tls_generic_test.c
tls_generic_test_LDADD = libtest.la \
	../../libutils/libutils.la \
	../../libpromises/libpromises.la \
	../../libcfnet/libcfnet.la \
	../../cf-serverd/libcf-serverd.la
endif

version_test_SOURCES = version_test.c

hash_test_SOURCES = hash_test.c
hash_test_LDADD = ../../libutils/libutils.la libtest.la

key_test_SOURCES = key_test.c
key_test_LDADD = ../../libpromises/libpromises.la ../../libutils/libutils.la libtest.la

strlist_test_SOURCES = strlist_test.c ../../cf-serverd/strlist.c ../../cf-serverd/strlist.h

libcompat_test_CPPFLAGS = -I$(top_srcdir)/libcompat
libcompat_test_SOURCES = libcompat_test.c

CFUPGRADE=../../cf-upgrade
cf_upgrade_test_SOURCES = cf_upgrade_test.c $(CFUPGRADE)/alloc-mini.c $(CFUPGRADE)/alloc-mini.h $(CFUPGRADE)/command_line.c \
$(CFUPGRADE)/command_line.h $(CFUPGRADE)/configuration.c $(CFUPGRADE)/configuration.h $(CFUPGRADE)/log.c $(CFUPGRADE)/log.h \
$(CFUPGRADE)/process.c $(CFUPGRADE)/process.h $(CFUPGRADE)/update.c $(CFUPGRADE)/update.h
cf_upgrade_test_CFLAGS = -I$(CFUPGRADE)

queue_test_SOURCES = queue_test.c

# Clean up the autogenerated XML files.
MOSTLYCLEANFILES = *.xml xml_tmp_suite