Makefile_tests.am 26.4 KB
Newer Older
David King's avatar
David King committed
1
## Copyright (c) 2009, 2010  Openismus GmbH  <http://www.openismus.com/>
Murray Cumming's avatar
Murray Cumming committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
##
## This file is part of Glom.
##
## Glom is free software: you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published
## by the Free Software Foundation, either version 2 of the License,
## or (at your option) any later version.
##
## Glom is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.

check_PROGRAMS =						\
	glom/libglom/test_connectionpool			\
20
	glom/libglom/test_sharedptr_layoutitem \
21
	glom/libglom/example_document_load \
22
	tests/test_document_load			\
23
	tests/test_document_load_and_change		\
24
	tests/test_document_load_and_save		\
25
	tests/test_document_load_image			\
26
	tests/test_document_load_translations		\
27
	tests/test_document_change			\
28
	tests/test_document_autosave			\
29
	tests/test_field_file_format			\
30
	tests/test_layout_item_field \
31
32
	tests/test_parsing_time			\
	tests/test_signal_reemit			\
33
34
	tests/python/test_load_python_library\
	tests/python/test_python_module \
35
	tests/test_fake_connection \
36
	tests/test_script_check_for_problems \
Murray Cumming's avatar
Murray Cumming committed
37
	tests/test_selfhosting_new_empty \
38
	tests/test_selfhosting_new_empty_change_sysprefs \
39
	tests/test_selfhosting_new_empty_then_add_tables \
40
	tests/test_selfhosting_new_empty_then_users \
41
	tests/test_selfhosting_new_from_example \
42
	tests/test_selfhosting_new_from_example_defaultvalues \
43
	tests/test_selfhosting_new_from_example_float \
44
	tests/test_selfhosting_new_from_example_operator \
45
	tests/test_selfhosting_new_from_example_strangepath \
46
	tests/test_selfhosting_new_from_example_table_name_with_space \
Murray Cumming's avatar
Murray Cumming committed
47
	tests/test_selfhosting_new_then_report \
48
	tests/test_selfhosting_new_then_report_summary \
Murray Cumming's avatar
Murray Cumming committed
49
	tests/test_selfhosting_new_then_image \
50
	tests/test_selfhosting_new_then_lookup \
51
	tests/test_selfhosting_new_then_choices \
52
	tests/test_selfhosting_new_then_backup_restore \
53
	tests/test_selfhosting_new_then_get_privs \
54
	tests/test_selfhosting_new_then_alter_table \
55
	tests/test_selfhosting_new_then_change_columns \
56
	tests/test_selfhosting_non_numeric_primary_keys \
57
	tests/test_selfhosting_sqlinjection \
58
59
	tests/test_conversions \
	tests/test_xml_utils \
60
61
	tests/export/test_selfhosting_new_then_export \
	tests/export/test_selfhosting_new_then_export_with_big_num \
62
	tests/import/test_parsing \
63
64
65
	tests/import/test_signals \
	tests/translations_po/test_document_export_po \
	tests/translations_po/test_document_import_po
Murray Cumming's avatar
Murray Cumming committed
66

67
TESTS =	tests/test_document_load	\
68
	tests/test_document_load_and_change	\
69
	tests/test_document_load_and_save_all.sh \
70
	tests/test_document_load_image \
71
	tests/test_document_load_translations	\
72
	tests/test_document_change	\
Murray Cumming's avatar
Murray Cumming committed
73
	tests/test_document_autosave	\
74
	tests/test_field_file_format \
75
	tests/test_field_file_format_in_locales.sh \
76
	tests/test_layout_item_field \
Murray Cumming's avatar
Murray Cumming committed
77
	tests/test_parsing_time	\
78
	tests/test_signal_reemit \
79
80
	tests/test_dtd_file_validation.sh \
	tests/test_glade_file_validation.sh \
81
	tests/test_xslt_file_validation.sh \
82
83
	tests/python/test_load_python_library \
	tests/python/test_python_module \
84
	tests/test_fake_connection \
85
	tests/test_script_check_for_problems \
Murray Cumming's avatar
Murray Cumming committed
86
	tests/test_selfhosting_new_empty \
87
	tests/test_selfhosting_new_empty_change_sysprefs \
88
	tests/test_selfhosting_new_empty_then_add_tables \
89
	tests/test_selfhosting_new_empty_then_users \
90
	tests/test_selfhosting_new_from_example \
91
	tests/test_selfhosting_new_from_example_defaultvalues \
92
	tests/test_selfhosting_new_from_example_float \
93
	tests/test_selfhosting_new_from_example_operator \
94
	tests/test_selfhosting_new_from_example_in_locales.sh \
95
	tests/test_selfhosting_new_from_example_strangepath \
96
	tests/test_selfhosting_new_from_example_table_name_with_space \
Murray Cumming's avatar
Murray Cumming committed
97
	tests/test_selfhosting_new_then_report \
98
	tests/test_selfhosting_new_then_report_summary \
99
	tests/test_selfhosting_new_then_backup_restore \
Murray Cumming's avatar
Murray Cumming committed
100
	tests/test_selfhosting_new_then_image \
101
	tests/test_selfhosting_new_then_lookup \
102
	tests/test_selfhosting_new_then_choices \
103
	tests/test_selfhosting_new_then_get_privs \
104
	tests/test_selfhosting_new_then_alter_table \
105
	tests/test_selfhosting_new_then_change_columns \
106
	tests/test_selfhosting_non_numeric_primary_keys \
107
	tests/test_selfhosting_sqlinjection \
108
109
	tests/test_conversions \
	tests/test_xml_utils \
110
111
	tests/export/test_selfhosting_new_then_export \
	tests/export/test_selfhosting_new_then_export_with_big_num \
112
	tests/import/test_parsing \
113
114
115
116
	tests/import/test_signals \
	tests/translations_po/test_document_export_po \
	tests/translations_po/test_document_import_po

Murray Cumming's avatar
Murray Cumming committed
117

Murray Cumming's avatar
Murray Cumming committed
118
# We also set this in Makefile.am, with +=,
Murray Cumming's avatar
Murray Cumming committed
119
# but this is the first use, where we must use =
120
dist_noinst_SCRIPTS = tests/test_dtd_file_validation.sh \
121
	tests/test_glade_file_validation.sh \
122
	tests/test_xslt_file_validation.sh \
123
	tests/ui/test_glade_toplevels_instantiation.sh \
124
	tests/test_glom_date_in_locales.sh.in \
125
	tests/test_glom_date_in_locales_lc_time.sh.in \
126
	tests/test_selfhosting_new_from_example_in_locales.sh \
127
128
	tests/test_document_load_and_save_all.sh \
	tests/test_field_file_format_in_locales.sh
Murray Cumming's avatar
Murray Cumming committed
129

130
#TESTS_ENVIRONMENT=which valgrind && valgrind --tool=memcheck --leak-check=full --leak-resolution=high --trace-children=yes --num-callers=30
Murray Cumming's avatar
Murray Cumming committed
131

132
133
134
135
136
# Tell python to use the python modules that we have built,
# instead of just looking in the installed paths,
# so the test can run before installation::
TESTS_ENVIRONMENT = PYTHONPATH=${PYTHONPATH}:$(abs_top_builddir)/glom/python_embed/python_module/.libs

137
tests_ldadd = glom/libglom/libglom-$(GLOM_ABI_VERSION).la $(libglom_all_libs)
Murray Cumming's avatar
Murray Cumming committed
138
139
tests_cppflags = $(glom_includes) $(LIBGLOM_CFLAGS)  $(boost_python_cflags) $(glom_defines) \
	-DGLOM_DOCDIR_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/examples"\" \
140
	-DGLOM_TEST_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/tests"\"
141
tests_cppflags_ui = $(glom_includes) $(GLOM_CFLAGS)  $(boost_python_cflags) $(glom_defines)
Murray Cumming's avatar
Murray Cumming committed
142

Murray Cumming's avatar
Murray Cumming committed
143

Johannes Schmid's avatar
Johannes Schmid committed
144
glom_libglom_test_connectionpool_SOURCES = glom/libglom/test_connectionpool.cc
145
146
147
glom_libglom_test_connectionpool_LDADD = $(tests_ldadd)
glom_libglom_test_connectionpool_CPPFLAGS = $(tests_cppflags)

148
glom_libglom_example_document_load_SOURCES = glom/libglom/example_document_load.cc
149
150
glom_libglom_example_document_load_LDADD = $(tests_ldadd)
glom_libglom_example_document_load_CPPFLAGS = $(tests_cppflags)
151

152
153
154
glom_libglom_test_sharedptr_layoutitem_SOURCES = glom/libglom/test_sharedptr_layoutitem.cc
glom_libglom_test_sharedptr_layoutitem_LDADD = $(tests_ldadd)
glom_libglom_test_sharedptr_layoutitem_CPPFLAGS = $(tests_cppflags)
155

156
tests_test_document_load_SOURCES = tests/test_document_load.cc $(sources_test_utils)
157
tests_test_document_load_LDADD = $(tests_ldadd)
158
tests_test_document_load_CPPFLAGS = $(tests_cppflags) $(glom_test_image_defines)
159

160
tests_test_document_load_and_change_SOURCES = tests/test_document_load_and_change.cc $(sources_test_utils)
161
tests_test_document_load_and_change_LDADD = $(tests_ldadd)
162
tests_test_document_load_and_change_CPPFLAGS = $(tests_cppflags) $(glom_test_image_defines)
163

164
165
166
167
tests_test_document_load_and_save_SOURCES = tests/test_document_load_and_save.cc
tests_test_document_load_and_save_LDADD = $(tests_ldadd)
tests_test_document_load_and_save_CPPFLAGS = $(tests_cppflags)

168
169
170
171
172
sources_test_utils_images = tests/test_utils_images.h \
	tests/test_utils_images.cc

tests_test_document_load_image_SOURCES = tests/test_document_load_image.cc \
	$(sources_test_utils_images)
173
174
175
tests_test_document_load_image_LDADD = $(tests_ldadd) $(GDKMM_LIBS)
tests_test_document_load_image_CPPFLAGS = $(tests_cppflags) $(GDKMM_CFLAGS)

176
177
178
179
tests_test_document_load_translations_SOURCES = tests/test_document_load_translations.cc
tests_test_document_load_translations_LDADD = $(tests_ldadd)
tests_test_document_load_translations_CPPFLAGS = $(tests_cppflags)

180
181
182
183
tests_test_document_change_SOURCES = tests/test_document_change.cc
tests_test_document_change_LDADD = $(tests_ldadd)
tests_test_document_change_CPPFLAGS = $(tests_cppflags)

184
tests_test_document_autosave_SOURCES = tests/test_document_autosave.cc
185
186
187
tests_test_document_autosave_LDADD = $(tests_ldadd)
tests_test_document_autosave_CPPFLAGS = $(tests_cppflags)

188
189
190
191
192
tests_test_field_file_format_SOURCES = tests/test_field_file_format.cc \
	$(sources_test_utils) \
	$(sources_test_utils_images)
tests_test_field_file_format_LDADD = $(tests_ldadd) $(GDKMM_LIBS)
tests_test_field_file_format_CPPFLAGS = $(tests_cppflags)  $(GDKMM_CFLAGS) $(glom_test_image_defines)
193

194
195
196
197
tests_test_layout_item_field_SOURCES = tests/test_layout_item_field.cc
tests_test_layout_item_field_LDADD = $(tests_ldadd)
tests_test_layout_item_field_CPPFLAGS = $(tests_cppflags)

198
tests_test_parsing_time_SOURCES = tests/test_parsing_time.cc
199
200
201
tests_test_parsing_time_LDADD = $(tests_ldadd)
tests_test_parsing_time_CPPFLAGS = $(tests_cppflags)

202
tests_test_signal_reemit_SOURCES = tests/test_signal_reemit.cc
203
204
205
tests_test_signal_reemit_LDADD = $(LIBGLOM_LIBS)
tests_test_signal_reemit_CPPFLAGS = $(tests_cppflags)

206
207
208
209
210
211
212
213
tests_test_conversions_SOURCES = tests/test_conversions.cc
tests_test_conversions_LDADD = $(tests_ldadd)
tests_test_conversions_CPPFLAGS = $(tests_cppflags)

tests_test_xml_utils_SOURCES = tests/test_xml_utils.cc
tests_test_xml_utils_LDADD = $(tests_ldadd)
tests_test_xml_utils_CPPFLAGS = $(tests_cppflags)

214
tests_python_test_load_python_library_SOURCES = tests/python/test_load_python_library.cc
215
tests_python_test_load_python_library_LDADD = $(LIBGLOM_LIBS) $(DL_LIB)
216
tests_python_test_load_python_library_CPPFLAGS = $(tests_cppflags)
217

218
tests_python_test_python_module_SOURCES = tests/python/test_python_module.cc
219
tests_python_test_python_module_LDADD = $(tests_ldadd) $(PYTHON_LIBS)
220
tests_python_test_python_module_CPPFLAGS = $(tests_cppflags)
221
222
223


# Distribute the tests data:
Murray Cumming's avatar
1.19.17    
Murray Cumming committed
224
dist_noinst_DATA = \
225
	tests/export/test_example_music_collection_with_big_num.glom \
Murray Cumming's avatar
1.19.17    
Murray Cumming committed
226
	tests/import/data/albums.csv \
227
	tests/translations_po/data/test.po \
Murray Cumming's avatar
Murray Cumming committed
228
	tests/test_image.jpg \
Murray Cumming's avatar
Murray Cumming committed
229
230
231
	tests/test_image2.jpg \
	tests/test_image.pdf \
	tests/test_image2.pdf \
232
233
	tests/test_example_music_collection_text_pk_fields.glom \
	tests/test_example_music_collection_table_name_with_space.glom
234

235

236
# Let the .cc source code know about this path:
237
glom_test_import_defines = -DGLOM_TESTS_IMPORT_DATA_NOTINSTALLED=\""$(abs_top_srcdir)/tests/import/data/"\"
238
glom_test_image_defines = -DGLOM_TESTS_IMAGE_DATA_NOTINSTALLED=\""$(abs_top_srcdir)/tests/"\"
239

240
241
242
# Let the .cc source code know about this path:
glom_test_translations_po_defines = -DGLOM_TESTS_TRANSLATIONS_PO_DATA_NOTINSTALLED=\""$(abs_top_srcdir)/tests/translations_po/data/"\"

243

244
tests_import_test_parsing_SOURCES =	\
245
246
	glom/import_csv/csv_parser.cc	\
	glom/import_csv/csv_parser.h	\
247
248
	tests/import/utils.cc\
	tests/import/utils.h\
249
	tests/import/test_parsing.cc
250
tests_import_test_parsing_LDADD = $(tests_ldadd)
251
tests_import_test_parsing_CPPFLAGS = $(tests_cppflags) $(glom_test_import_defines)
252

253
tests_import_test_signals_SOURCES =	\
254
255
	glom/import_csv/csv_parser.cc	\
	glom/import_csv/csv_parser.h	\
256
257
	tests/import/utils.cc\
	tests/import/utils.h\
258
	tests/import/test_signals.cc
259
tests_import_test_signals_LDADD = $(tests_ldadd)
260
261
tests_import_test_signals_CPPFLAGS = $(tests_cppflags)

262
263
264
265
266
267
268
269
270
271
tests_translations_po_test_document_export_po_SOURCES =	\
	tests/translations_po/test_document_export_po.cc
tests_translations_po_test_document_export_po_LDADD = $(tests_ldadd)
tests_translations_po_test_document_export_po_CPPFLAGS = $(tests_cppflags)

tests_translations_po_test_document_import_po_SOURCES =	\
	tests/translations_po/test_document_import_po.cc
tests_translations_po_test_document_import_po_LDADD = $(tests_ldadd)
tests_translations_po_test_document_import_po_CPPFLAGS = $(tests_cppflags) $(glom_test_translations_po_defines)

272
# Note that wherever we use this we must also use glom_test_image_defines.
273
274
275
sources_test_utils = tests/test_utils.h \
	tests/test_utils.cc

Murray Cumming's avatar
Murray Cumming committed
276
277
278
sources_test_selfhosting_utils = tests/test_selfhosting_utils.h \
	tests/test_selfhosting_utils.cc

279
280
281
282
tests_test_fake_connection_SOURCES = tests/test_fake_connection.cc
tests_test_fake_connection_LDADD = $(tests_ldadd)
tests_test_fake_connection_CPPFLAGS = $(tests_cppflags)

283
284
285
286
tests_test_script_check_for_problems_SOURCES = tests/test_script_check_for_problems.cc
tests_test_script_check_for_problems_LDADD = $(tests_ldadd)
tests_test_script_check_for_problems_CPPFLAGS = $(tests_cppflags)

287
tests_test_selfhosting_new_empty_SOURCES = tests/test_selfhosting_new_empty.cc $(sources_test_selfhosting_utils)
288
tests_test_selfhosting_new_empty_LDADD = $(tests_ldadd)
289
tests_test_selfhosting_new_empty_CPPFLAGS = $(tests_cppflags)
290
291
292
293

tests_test_selfhosting_new_empty_change_sysprefs_SOURCES = tests/test_selfhosting_new_empty_change_sysprefs.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_empty_change_sysprefs_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_empty_change_sysprefs_CPPFLAGS = $(tests_cppflags)
294

295
296
297
298
tests_test_selfhosting_new_empty_then_add_tables_SOURCES = tests/test_selfhosting_new_empty_then_add_tables.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_empty_then_add_tables_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_empty_then_add_tables_CPPFLAGS = $(tests_cppflags)

299
300
301
302
tests_test_selfhosting_new_empty_then_users_SOURCES = tests/test_selfhosting_new_empty_then_users.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_empty_then_users_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_empty_then_users_CPPFLAGS = $(tests_cppflags)

Murray Cumming's avatar
Murray Cumming committed
303
tests_test_selfhosting_new_from_example_SOURCES = tests/test_selfhosting_new_from_example.cc $(sources_test_selfhosting_utils)
304
tests_test_selfhosting_new_from_example_LDADD = $(tests_ldadd)
305
tests_test_selfhosting_new_from_example_CPPFLAGS = $(tests_cppflags)
306

307
308
309
310
tests_test_selfhosting_new_from_example_defaultvalues_SOURCES = tests/test_selfhosting_new_from_example_defaultvalues.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_from_example_defaultvalues_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_from_example_defaultvalues_CPPFLAGS = $(tests_cppflags)

311
312
313
314
tests_test_selfhosting_new_from_example_float_SOURCES = tests/test_selfhosting_new_from_example_float.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_from_example_float_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_from_example_float_CPPFLAGS = $(tests_cppflags)

315
316
317
318
tests_test_selfhosting_new_from_example_operator_SOURCES = tests/test_selfhosting_new_from_example_operator.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_from_example_operator_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_from_example_operator_CPPFLAGS = $(tests_cppflags)

319
320
321
322
tests_test_selfhosting_new_from_example_strangepath_SOURCES = tests/test_selfhosting_new_from_example_strangepath.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_from_example_strangepath_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_from_example_strangepath_CPPFLAGS = $(tests_cppflags)

323
324
325
326
tests_test_selfhosting_new_from_example_table_name_with_space_SOURCES = tests/test_selfhosting_new_from_example_table_name_with_space.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_from_example_table_name_with_space_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_from_example_table_name_with_space_CPPFLAGS = $(tests_cppflags)

327
328
329
tests_export_test_selfhosting_new_then_export_SOURCES = tests/export/test_selfhosting_new_then_export.cc $(sources_test_selfhosting_utils)
tests_export_test_selfhosting_new_then_export_LDADD = $(tests_ldadd)
tests_export_test_selfhosting_new_then_export_CPPFLAGS = $(tests_cppflags)
Murray Cumming's avatar
Murray Cumming committed
330

331
332
333
tests_export_test_selfhosting_new_then_export_with_big_num_SOURCES = tests/export/test_selfhosting_new_then_export_with_big_num.cc $(sources_test_selfhosting_utils)
tests_export_test_selfhosting_new_then_export_with_big_num_LDADD = $(tests_ldadd)
tests_export_test_selfhosting_new_then_export_with_big_num_CPPFLAGS = $(tests_cppflags)
334

Murray Cumming's avatar
Murray Cumming committed
335
336
337
338
tests_test_selfhosting_new_then_report_SOURCES = tests/test_selfhosting_new_then_report.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_then_report_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_then_report_CPPFLAGS = $(tests_cppflags)

339
340
341
342
tests_test_selfhosting_new_then_report_summary_SOURCES = tests/test_selfhosting_new_then_report_summary.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_then_report_summary_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_then_report_summary_CPPFLAGS = $(tests_cppflags)

343
344
345
346
347
348
tests_test_selfhosting_new_then_image_SOURCES = tests/test_selfhosting_new_then_image.cc \
	$(sources_test_selfhosting_utils) \
	$(sources_test_utils) \
	$(sources_test_utils_images)
tests_test_selfhosting_new_then_image_LDADD = $(tests_ldadd) $(GDKMM_LIBS)
tests_test_selfhosting_new_then_image_CPPFLAGS = $(tests_cppflags) $(GDKMM_CFLAGS) $(glom_test_image_defines)
Murray Cumming's avatar
Murray Cumming committed
349

350
351
352
353
tests_test_selfhosting_new_then_lookup_SOURCES = tests/test_selfhosting_new_then_lookup.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_then_lookup_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_then_lookup_CPPFLAGS = $(tests_cppflags)

354
355
tests_test_selfhosting_new_then_choices_SOURCES = tests/test_selfhosting_new_then_choices.cc $(sources_test_selfhosting_utils) $(sources_test_utils)
tests_test_selfhosting_new_then_choices_LDADD = $(tests_ldadd)
356
tests_test_selfhosting_new_then_choices_CPPFLAGS = $(tests_cppflags) $(glom_test_image_defines)
357

358
359
360
361
tests_test_selfhosting_new_then_backup_restore_SOURCES = tests/test_selfhosting_new_then_backup_restore.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_then_backup_restore_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_then_backup_restore_CPPFLAGS = $(tests_cppflags)

362
363
364
365
tests_test_selfhosting_new_then_get_privs_SOURCES = tests/test_selfhosting_new_then_get_privs.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_then_get_privs_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_then_get_privs_CPPFLAGS = $(tests_cppflags)

366
367
368
369
tests_test_selfhosting_new_then_alter_table_SOURCES = tests/test_selfhosting_new_then_alter_table.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_then_alter_table_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_then_alter_table_CPPFLAGS = $(tests_cppflags)

370
371
372
373
tests_test_selfhosting_new_then_change_columns_SOURCES = tests/test_selfhosting_new_then_change_columns.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_then_change_columns_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_then_change_columns_CPPFLAGS = $(tests_cppflags)

374
375
376
377
tests_test_selfhosting_non_numeric_primary_keys_SOURCES = tests/test_selfhosting_non_numeric_primary_keys.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_non_numeric_primary_keys_LDADD = $(tests_ldadd)
tests_test_selfhosting_non_numeric_primary_keys_CPPFLAGS = $(tests_cppflags)

378
379
380
tests_test_selfhosting_sqlinjection_SOURCES = tests/test_selfhosting_sqlinjection.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_sqlinjection_LDADD = $(tests_ldadd)
tests_test_selfhosting_sqlinjection_CPPFLAGS = $(tests_cppflags)
381

Murray Cumming's avatar
Murray Cumming committed
382
383
# Tests of code used by the application,
# and not just the library or the command-line utilities.
384
385
386
387
388
if GLOM_ENABLE_UI

# TODO: Shouldn't test_pyembed be non-UI?
check_PROGRAMS += \
	glom/utility_widgets/test_flowtable			\
Murray Cumming's avatar
Murray Cumming committed
389
	glom/utility_widgets/eggspreadtablemm/test_spreadtablednd \
390
	glom/test_pyembed \
391
	tests/ui/test_glade_derived_instantiation \
Murray Cumming's avatar
Murray Cumming committed
392
	tests/ui/test_imageglom_widget \
393
	tests/ui/glade_toplevels_instantiation \
394
395
396
397
	tests/python/test_python_execute_func \
	tests/python/test_python_execute_func_bad_syntax \
	tests/python/test_python_execute_func_date \
	tests/python/test_python_execute_func_change_result_type \
398
	tests/python/test_python_execute_func_with_record \
399
	tests/python/test_python_execute_func_with_record_field_types \
400
401
	tests/python/test_python_execute_script \
	tests/test_iso_codes
402
#	glom/mode_data/test_flowtablewithfields
Murray Cumming's avatar
Murray Cumming committed
403
#	glom/utility_widgets/canvas/test_canvas_editable
Murray Cumming's avatar
Murray Cumming committed
404

Murray Cumming's avatar
Murray Cumming committed
405
	
406
TESTS += \
407
408
409
410
	tests/python/test_python_execute_func \
	tests/python/test_python_execute_func_bad_syntax \
	tests/python/test_python_execute_func_date \
	tests/python/test_python_execute_func_change_result_type \
411
	tests/python/test_python_execute_func_with_record \
412
	tests/python/test_python_execute_func_with_record_field_types \
413
414
	tests/python/test_python_execute_script \
	tests/test_iso_codes
415

416
# Note that the *_in_locales.sh tests require us to have certain locales 
Murray Cumming's avatar
Murray Cumming committed
417
418
# installed and configured.

Murray Cumming's avatar
Murray Cumming committed
419
420
# Some continuous-integration systems won't have an X server,
# so they will want to disable these in configure.
421
422
423
424
#
# These are only in the UI tests because it use the glom executable,
# and GtkApplication will not let us handle the command-line argument 
# before initializing GTK+. See the comments in the code.
Murray Cumming's avatar
Murray Cumming committed
425
426
if GLOM_ENABLE_UI_TESTS
TESTS += \
427
428
	tests/ui/test_glade_toplevels_instantiation.sh \
	tests/ui/test_glade_derived_instantiation \
Murray Cumming's avatar
Murray Cumming committed
429
	tests/ui/test_imageglom_widget \
430
431
	tests/test_glom_date_in_locales.sh \
	tests/test_glom_date_in_locales_lc_time.sh
Murray Cumming's avatar
Murray Cumming committed
432
433
434
endif #GLOM_ENABLE_UI_TESTS


Murray Cumming's avatar
Murray Cumming committed
435
436
437
glom_utility_widgets_test_flowtable_SOURCES =	\
	glom/utility_widgets/flowtable.cc	\
	glom/utility_widgets/flowtable.h	\
Murray Cumming's avatar
Murray Cumming committed
438
	$(glom_eggspreadtable_files) \
Murray Cumming's avatar
Murray Cumming committed
439
440
	glom/utility_widgets/test_flowtable.cc
glom_utility_widgets_test_flowtable_LDADD = $(GLOM_LIBS)
441
442
glom_utility_widgets_test_flowtable_CPPFLAGS = $(tests_cppflags_ui)

Murray Cumming's avatar
Murray Cumming committed
443
444
445
446
447
448
glom_utility_widgets_eggspreadtablemm_test_spreadtablednd_SOURCES =	\
	$(glom_eggspreadtable_files) \
	glom/utility_widgets/eggspreadtablemm/test_spreadtablednd.cc
glom_utility_widgets_eggspreadtablemm_test_spreadtablednd_LDADD = $(GLOM_LIBS)
glom_utility_widgets_eggspreadtablemm_test_spreadtablednd_CPPFLAGS = $(tests_cppflags_ui)

Murray Cumming's avatar
Murray Cumming committed
449
450
451
452
453
454
# Disabled because it slows down the build, because it builds all Glom files again, using its own flags:
#glom_utility_widgets_canvas_test_canvas_editable_SOURCES =	\
#        $(glom_source_files) \
#	glom/utility_widgets/canvas/test_canvas_editable.cc
#glom_utility_widgets_canvas_test_canvas_editable_LDADD = $(glom_all_libs)
#glom_utility_widgets_canvas_test_canvas_editable_CPPFLAGS = $(tests_cppflags_ui)
Murray Cumming's avatar
Murray Cumming committed
455

456
457
458
459
460
461
# Disabled because it slows down the build, because it builds all Glom files again, using its own flags:
#glom_mode_data_test_flowtablewithfields_SOURCES =	\
#	$(glom_source_files) \
#	glom/mode_data/test_flowtablewithfields.cc
#glom_mode_data_test_flowtablewithfields_LDADD = $(glom_all_libs)
#glom_mode_data_test_flowtablewithfields_CPPFLAGS = $(tests_cppflags_ui)
Murray Cumming's avatar
Murray Cumming committed
462

463

464
tests_python_test_python_execute_func_SOURCES = tests/python/test_python_execute_func.cc \
Murray Cumming's avatar
Murray Cumming committed
465
  glom/python_embed/glom_python.cc
466
tests_python_test_python_execute_func_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
467
468
469
tests_python_test_python_execute_func_CPPFLAGS = $(tests_cppflags_ui)
tests_python_test_python_execute_func_CFLAGS = $(tests_cflags)
tests_python_test_python_execute_func_CXXFLAGS = $(tests_cxxflags)
470

471
tests_python_test_python_execute_func_bad_syntax_SOURCES = tests/python/test_python_execute_func_bad_syntax.cc \
Murray Cumming's avatar
Murray Cumming committed
472
  glom/python_embed/glom_python.cc
473
tests_python_test_python_execute_func_bad_syntax_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
474
tests_python_test_python_execute_func_bad_syntax_CPPFLAGS = $(tests_cppflags_ui)
475

476
tests_python_test_python_execute_func_date_SOURCES = tests/python/test_python_execute_func_date.cc \
Murray Cumming's avatar
Murray Cumming committed
477
  glom/python_embed/glom_python.cc
478
tests_python_test_python_execute_func_date_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
479
tests_python_test_python_execute_func_date_CPPFLAGS = $(tests_cppflags_ui)
480

481
tests_python_test_python_execute_func_change_result_type_SOURCES = tests/python/test_python_execute_func_change_result_type.cc \
Murray Cumming's avatar
Murray Cumming committed
482
  glom/python_embed/glom_python.cc
483
tests_python_test_python_execute_func_change_result_type_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
484
tests_python_test_python_execute_func_change_result_type_CPPFLAGS = $(tests_cppflags_ui)
485

486
487
tests_python_test_python_execute_func_with_record_SOURCES = tests/python/test_python_execute_func_with_record.cc \
  glom/python_embed/glom_python.cc
488
tests_python_test_python_execute_func_with_record_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
Murray Cumming's avatar
Murray Cumming committed
489
tests_python_test_python_execute_func_with_record_CPPFLAGS = $(tests_cppflags) $(tests_cppflags_ui)
490

491
492
493
494
495
496
tests_python_test_python_execute_func_with_record_field_types_SOURCES = tests/python/test_python_execute_func_with_record_field_types.cc \
  glom/python_embed/glom_python.cc \
  $(sources_test_selfhosting_utils)
tests_python_test_python_execute_func_with_record_field_types_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
tests_python_test_python_execute_func_with_record_field_types_CPPFLAGS = $(tests_cppflags) $(tests_cppflags_ui)

497
tests_python_test_python_execute_script_SOURCES = tests/python/test_python_execute_script.cc \
Murray Cumming's avatar
Murray Cumming committed
498
  glom/python_embed/glom_python.cc
499
500
tests_python_test_python_execute_script_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
tests_python_test_python_execute_script_CPPFLAGS = $(tests_cppflags_ui)
501

502
503
504
505
506
507
tests_test_iso_codes_SOURCES = tests/test_iso_codes.cc \
  glom/mode_design/iso_codes.cc \
  glom/mode_design/iso_codes.h
tests_test_iso_codes_LDADD = $(tests_ldadd) $(GLOM_LIBS)
tests_test_iso_codes_CPPFLAGS = $(tests_cppflags_ui)

Murray Cumming's avatar
Murray Cumming committed
508
# You must remove PlaceholderGlom::get_application() to avoid having to specify
509
# a huge set of .cc files when building this test:
Murray Cumming's avatar
1.12.4    
Murray Cumming committed
510
511
512
513
514
515
516
517
518
519
520
521
#glom_utility_widgets_test_flowtable_dnd_SOURCES =	\
#	glom/utility_widgets/flowtable.cc	\
#	glom/utility_widgets/flowtable.h	\
#	glom/utility_widgets/flowtable_dnd.cc	\
#	glom/utility_widgets/flowtable_dnd.h	\
#	glom/utility_widgets/layoutwidgetutils.h \
#	glom/utility_widgets/layoutwidgetutils.cc \
#	glom/utility_widgets/layoutwidgetbase.h \
#	glom/utility_widgets/layoutwidgetbase.cc \
#	glom/utility_widgets/placeholder-glom.h \
#	glom/utility_widgets/placeholder-glom.cc \
#	glom/utility_widgets/test_flowtable_dnd.cc
522

523
524
525
tests_ui_test_glade_derived_instantiation_SOURCES = tests/ui/test_glade_derived_instantiation.cc $(glom_source_files)
tests_ui_test_glade_derived_instantiation_LDADD = $(glom_all_libs)
tests_ui_test_glade_derived_instantiation_CPPFLAGS = $(tests_cppflags_ui)
526

Murray Cumming's avatar
Murray Cumming committed
527
528
529
530
531
532
533
534
# TODO: Find a subset of glom_source_files that is enough:
tests_ui_test_imageglom_widget_SOURCES = tests/ui/test_imageglom_widget.cc \
  $(glom_source_files) \
  $(sources_test_utils) \
  $(sources_test_utils_images)
tests_ui_test_imageglom_widget_LDADD = $(glom_all_libs)
tests_ui_test_imageglom_widget_CPPFLAGS = $(tests_cppflags_ui) $(glom_test_image_defines)

535
536
537
tests_ui_glade_toplevels_instantiation_SOURCES = tests/ui/glade_toplevels_instantiation.cc
tests_ui_glade_toplevels_instantiation_LDADD = $(tests_ldadd) $(GLOM_LIBS)
tests_ui_glade_toplevels_instantiation_CPPFLAGS = $(tests_cppflags_ui)
Murray Cumming's avatar
Murray Cumming committed
538

539
glom_test_pyembed_SOURCES = glom/test_pyembed.cc
540
glom_test_pyembed_LDADD = $(LIBGLOM_LIBS) $(PYTHON_LIBS)
541
glom_test_pyembed_CPPFLAGS = $(tests_cppflags_ui)
Murray Cumming's avatar
Murray Cumming committed
542

543
endif #GLOM_ENABLE_UI