Makefile_tests.am 23.8 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/example_document_load \
21
	glom/libglom/test_sharedptr_layoutitem		\
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 31
	tests/test_parsing_time			\
	tests/test_signal_reemit			\
32 33
	tests/python/test_load_python_library\
	tests/python/test_python_module \
34
	tests/test_fake_connection \
35
	tests/test_script_check_for_problems \
Murray Cumming's avatar
Murray Cumming committed
36
	tests/test_selfhosting_new_empty \
37
	tests/test_selfhosting_new_empty_change_sysprefs \
38
	tests/test_selfhosting_new_empty_then_users \
39
	tests/test_selfhosting_new_from_example \
40
	tests/test_selfhosting_new_from_example_defaultvalues \
41
	tests/test_selfhosting_new_from_example_float \
42
	tests/test_selfhosting_new_from_example_operator \
43
	tests/test_selfhosting_new_from_example_strangepath \
Murray Cumming's avatar
Murray Cumming committed
44
	tests/test_selfhosting_new_then_report \
45
	tests/test_selfhosting_new_then_report_summary \
46
	tests/test_selfhosting_new_then_image \
47
	tests/test_selfhosting_new_then_lookup \
48
	tests/test_selfhosting_new_then_choices \
49
	tests/test_selfhosting_new_then_backup_restore \
50
	tests/test_selfhosting_new_then_get_privs \
51
	tests/test_selfhosting_new_then_alter_table \
52
	tests/test_selfhosting_new_then_change_columns \
53
	tests/test_selfhosting_non_numeric_primary_keys \
54
	tests/test_selfhosting_sqlinjection \
55 56
	tests/test_conversions \
	tests/test_xml_utils \
57
	tests/import/test_parsing \
58 59 60
	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
61

62
TESTS =	tests/test_document_load	\
63
	tests/test_document_load_and_change	\
64
	tests/test_document_load_and_save_all.sh \
65
	tests/test_document_load_image \
66
	tests/test_document_load_translations	\
67
	tests/test_document_change	\
Murray Cumming's avatar
Murray Cumming committed
68
	tests/test_document_autosave	\
69
	tests/test_field_file_format \
70
	tests/test_field_file_format_in_locales.sh \
71
	tests/test_parsing_time	\
72
	tests/test_signal_reemit \
73 74
	tests/test_dtd_file_validation.sh \
	tests/test_glade_file_validation.sh \
75
	tests/test_xslt_file_validation.sh \
76 77
	tests/python/test_load_python_library \
	tests/python/test_python_module \
78
	tests/test_fake_connection \
79
	tests/test_script_check_for_problems \
Murray Cumming's avatar
Murray Cumming committed
80
	tests/test_selfhosting_new_empty \
81
	tests/test_selfhosting_new_empty_change_sysprefs \
82
	tests/test_selfhosting_new_empty_then_users \
83
	tests/test_selfhosting_new_from_example \
84
	tests/test_selfhosting_new_from_example_defaultvalues \
85
	tests/test_selfhosting_new_from_example_float \
86
	tests/test_selfhosting_new_from_example_operator \
87
	tests/test_selfhosting_new_from_example_in_locales.sh \
88
	tests/test_selfhosting_new_from_example_strangepath \
Murray Cumming's avatar
Murray Cumming committed
89
	tests/test_selfhosting_new_then_report \
90
	tests/test_selfhosting_new_then_report_summary \
91
	tests/test_selfhosting_new_then_backup_restore \
92
	tests/test_selfhosting_new_then_image \
93
	tests/test_selfhosting_new_then_lookup \
94
	tests/test_selfhosting_new_then_choices \
95
	tests/test_selfhosting_new_then_get_privs \
96
	tests/test_selfhosting_new_then_alter_table \
97
	tests/test_selfhosting_new_then_change_columns \
98
	tests/test_selfhosting_non_numeric_primary_keys \
99
	tests/test_selfhosting_sqlinjection \
100 101
	tests/test_conversions \
	tests/test_xml_utils \
102
	tests/import/test_parsing \
103 104 105 106
	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
107

108
# We also set this in Makefile.am, with +=,
Murray Cumming's avatar
Murray Cumming committed
109
# but this is the first use, where we must use =
110
dist_noinst_SCRIPTS = tests/test_dtd_file_validation.sh \
111
	tests/test_glade_file_validation.sh \
112
	tests/test_xslt_file_validation.sh \
113
	tests/test_glade_toplevels_instantiation.sh \
114
	tests/test_glom_date_in_locales.sh.in \
115
	tests/test_glom_date_in_locales_lc_time.sh.in \
116
	tests/test_selfhosting_new_from_example_in_locales.sh \
117 118
	tests/test_document_load_and_save_all.sh \
	tests/test_field_file_format_in_locales.sh
Murray Cumming's avatar
Murray Cumming committed
119

120
#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
121

122 123 124 125 126
# 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

127
tests_ldadd = glom/libglom/libglom-$(GLOM_ABI_VERSION).la $(libglom_all_libs)
Murray Cumming's avatar
Murray Cumming committed
128 129
tests_cppflags = $(glom_includes) $(LIBGLOM_CFLAGS)  $(boost_python_cflags) $(glom_defines) \
	-DGLOM_DOCDIR_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/examples"\" \
130
	-DGLOM_TEST_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/tests"\"
131
tests_cppflags_ui = $(glom_includes) $(GLOM_CFLAGS)  $(boost_python_cflags) $(glom_defines)
Murray Cumming's avatar
Murray Cumming committed
132

Murray Cumming's avatar
Murray Cumming committed
133

Johannes Schmid's avatar
Johannes Schmid committed
134
glom_libglom_test_connectionpool_SOURCES = glom/libglom/test_connectionpool.cc
135 136 137
glom_libglom_test_connectionpool_LDADD = $(tests_ldadd)
glom_libglom_test_connectionpool_CPPFLAGS = $(tests_cppflags)

138
glom_libglom_example_document_load_SOURCES = glom/libglom/example_document_load.cc
139 140
glom_libglom_example_document_load_LDADD = $(tests_ldadd)
glom_libglom_example_document_load_CPPFLAGS = $(tests_cppflags)
141

142 143 144
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)
145

146
tests_test_document_load_SOURCES = tests/test_document_load.cc $(sources_test_utils)
147
tests_test_document_load_LDADD = $(tests_ldadd)
148
tests_test_document_load_CPPFLAGS = $(tests_cppflags) $(glom_test_image_defines)
149

150
tests_test_document_load_and_change_SOURCES = tests/test_document_load_and_change.cc $(sources_test_utils)
151
tests_test_document_load_and_change_LDADD = $(tests_ldadd)
152
tests_test_document_load_and_change_CPPFLAGS = $(tests_cppflags) $(glom_test_image_defines)
153

154 155 156 157
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)

158 159 160 161 162
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)
163 164 165
tests_test_document_load_image_LDADD = $(tests_ldadd) $(GDKMM_LIBS)
tests_test_document_load_image_CPPFLAGS = $(tests_cppflags) $(GDKMM_CFLAGS)

166 167 168 169
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)

170 171 172 173
tests_test_document_change_SOURCES = tests/test_document_change.cc
tests_test_document_change_LDADD = $(tests_ldadd)
tests_test_document_change_CPPFLAGS = $(tests_cppflags)

174
tests_test_document_autosave_SOURCES = tests/test_document_autosave.cc
175 176 177
tests_test_document_autosave_LDADD = $(tests_ldadd)
tests_test_document_autosave_CPPFLAGS = $(tests_cppflags)

178 179 180 181 182
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)
183

184
tests_test_parsing_time_SOURCES = tests/test_parsing_time.cc
185 186 187
tests_test_parsing_time_LDADD = $(tests_ldadd)
tests_test_parsing_time_CPPFLAGS = $(tests_cppflags)

188
tests_test_signal_reemit_SOURCES = tests/test_signal_reemit.cc
189 190 191
tests_test_signal_reemit_LDADD = $(LIBGLOM_LIBS)
tests_test_signal_reemit_CPPFLAGS = $(tests_cppflags)

192 193 194 195 196 197 198 199
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)

200
tests_python_test_load_python_library_SOURCES = tests/python/test_load_python_library.cc
201
tests_python_test_load_python_library_LDADD = $(LIBGLOM_LIBS) $(DL_LIB)
202
tests_python_test_load_python_library_CPPFLAGS = $(tests_cppflags)
203

204
tests_python_test_python_module_SOURCES = tests/python/test_python_module.cc
205
tests_python_test_python_module_LDADD = $(tests_ldadd) $(PYTHON_LDFLAGS)
206
tests_python_test_python_module_CPPFLAGS = $(tests_cppflags)
207 208 209


# Distribute the tests data:
Murray Cumming's avatar
Murray Cumming committed
210 211
dist_noinst_DATA = \
	tests/import/data/albums.csv \
212
	tests/translations_po/data/test.po \
Murray Cumming's avatar
Murray Cumming committed
213 214
	tests/test_image.jpg \
	tests/test_example_music_collection_text_pk_fields.glom
215

216
# Let the .cc source code know about this path:
217
glom_test_import_defines = -DGLOM_TESTS_IMPORT_DATA_NOTINSTALLED=\""$(abs_top_srcdir)/tests/import/data/"\"
218
glom_test_image_defines = -DGLOM_TESTS_IMAGE_DATA_NOTINSTALLED=\""$(abs_top_srcdir)/tests/"\"
219

220 221 222
# 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/"\"

223

224
tests_import_test_parsing_SOURCES =	\
225 226
	glom/import_csv/csv_parser.cc	\
	glom/import_csv/csv_parser.h	\
227 228
	tests/import/utils.cc\
	tests/import/utils.h\
229
	tests/import/test_parsing.cc
230
tests_import_test_parsing_LDADD = $(tests_ldadd)
231
tests_import_test_parsing_CPPFLAGS = $(tests_cppflags) $(glom_test_import_defines)
232

233
tests_import_test_signals_SOURCES =	\
234 235
	glom/import_csv/csv_parser.cc	\
	glom/import_csv/csv_parser.h	\
236 237
	tests/import/utils.cc\
	tests/import/utils.h\
238
	tests/import/test_signals.cc
239
tests_import_test_signals_LDADD = $(tests_ldadd)
240 241
tests_import_test_signals_CPPFLAGS = $(tests_cppflags)

242 243 244 245 246 247 248 249 250 251
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)

252
# Note that wherever we use this we must also use glom_test_image_defines.
253 254 255
sources_test_utils = tests/test_utils.h \
	tests/test_utils.cc

Murray Cumming's avatar
Murray Cumming committed
256 257 258
sources_test_selfhosting_utils = tests/test_selfhosting_utils.h \
	tests/test_selfhosting_utils.cc

259 260 261 262
tests_test_fake_connection_SOURCES = tests/test_fake_connection.cc
tests_test_fake_connection_LDADD = $(tests_ldadd)
tests_test_fake_connection_CPPFLAGS = $(tests_cppflags)

263 264 265 266
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)

267
tests_test_selfhosting_new_empty_SOURCES = tests/test_selfhosting_new_empty.cc $(sources_test_selfhosting_utils)
268
tests_test_selfhosting_new_empty_LDADD = $(tests_ldadd)
269
tests_test_selfhosting_new_empty_CPPFLAGS = $(tests_cppflags)
270 271 272 273

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)
274

275 276 277 278
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
279
tests_test_selfhosting_new_from_example_SOURCES = tests/test_selfhosting_new_from_example.cc $(sources_test_selfhosting_utils)
280
tests_test_selfhosting_new_from_example_LDADD = $(tests_ldadd)
281
tests_test_selfhosting_new_from_example_CPPFLAGS = $(tests_cppflags)
282

283 284 285 286
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)

287 288 289 290
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)

291 292 293 294
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)

295 296 297 298
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)

Murray Cumming's avatar
Murray Cumming committed
299 300 301 302
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)

303 304 305 306
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)

307 308 309 310 311 312
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)
313

314 315 316 317
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)

318 319
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)
320
tests_test_selfhosting_new_then_choices_CPPFLAGS = $(tests_cppflags) $(glom_test_image_defines)
321

322 323 324 325
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)

326 327 328 329
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)

330 331 332 333
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)

334 335 336 337
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)

338 339 340 341
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)

342 343 344
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)
345

Murray Cumming's avatar
Murray Cumming committed
346 347
# Tests of code used by the application,
# and not just the library or the command-line utilities.
348 349 350 351 352
if GLOM_ENABLE_UI

# TODO: Shouldn't test_pyembed be non-UI?
check_PROGRAMS += \
	glom/utility_widgets/test_flowtable			\
353
	glom/utility_widgets/eggspreadtablemm/test_spreadtablednd \
354 355 356
	glom/test_pyembed \
	tests/test_glade_derived_instantiation \
	tests/glade_toplevels_instantiation \
357 358 359 360
	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 \
361
	tests/python/test_python_execute_func_with_record \
362
	tests/python/test_python_execute_func_with_record_field_types \
363 364
	tests/python/test_python_execute_script \
	tests/test_iso_codes
365
#	glom/mode_data/test_flowtablewithfields
Murray Cumming's avatar
Murray Cumming committed
366
#	glom/utility_widgets/canvas/test_canvas_editable
Murray Cumming's avatar
Murray Cumming committed
367

Murray Cumming's avatar
Murray Cumming committed
368
	
369
TESTS += \
370 371 372 373
	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 \
374
	tests/python/test_python_execute_func_with_record \
375
	tests/python/test_python_execute_func_with_record_field_types \
376 377
	tests/python/test_python_execute_script \
	tests/test_iso_codes
378

379
# Note that the *_in_locales.sh tests require us to have certain locales 
380 381
# installed and configured.

Murray Cumming's avatar
Murray Cumming committed
382 383
# Some continuous-integration systems won't have an X server,
# so they will want to disable these in configure.
384 385 386 387
#
# 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
388 389 390
if GLOM_ENABLE_UI_TESTS
TESTS += \
	tests/test_glade_toplevels_instantiation.sh \
391
	tests/test_glade_derived_instantiation \
392 393
	tests/test_glom_date_in_locales.sh \
	tests/test_glom_date_in_locales_lc_time.sh
Murray Cumming's avatar
Murray Cumming committed
394 395 396
endif #GLOM_ENABLE_UI_TESTS


Murray Cumming's avatar
Murray Cumming committed
397 398 399
glom_utility_widgets_test_flowtable_SOURCES =	\
	glom/utility_widgets/flowtable.cc	\
	glom/utility_widgets/flowtable.h	\
Murray Cumming's avatar
Murray Cumming committed
400
	$(glom_eggspreadtable_files) \
Murray Cumming's avatar
Murray Cumming committed
401 402
	glom/utility_widgets/test_flowtable.cc
glom_utility_widgets_test_flowtable_LDADD = $(GLOM_LIBS)
403 404
glom_utility_widgets_test_flowtable_CPPFLAGS = $(tests_cppflags_ui)

405 406 407 408 409 410
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
411 412 413 414 415 416
# 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
417

418 419 420 421 422 423
# 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
424

425

426
tests_python_test_python_execute_func_SOURCES = tests/python/test_python_execute_func.cc \
Murray Cumming's avatar
Murray Cumming committed
427
  glom/python_embed/glom_python.cc
428
tests_python_test_python_execute_func_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
429 430 431
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)
432

433
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
434
  glom/python_embed/glom_python.cc
435
tests_python_test_python_execute_func_bad_syntax_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
436
tests_python_test_python_execute_func_bad_syntax_CPPFLAGS = $(tests_cppflags_ui)
437

438
tests_python_test_python_execute_func_date_SOURCES = tests/python/test_python_execute_func_date.cc \
Murray Cumming's avatar
Murray Cumming committed
439
  glom/python_embed/glom_python.cc
440
tests_python_test_python_execute_func_date_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
441
tests_python_test_python_execute_func_date_CPPFLAGS = $(tests_cppflags_ui)
442

443
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
444
  glom/python_embed/glom_python.cc
445
tests_python_test_python_execute_func_change_result_type_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
446
tests_python_test_python_execute_func_change_result_type_CPPFLAGS = $(tests_cppflags_ui)
447

448 449
tests_python_test_python_execute_func_with_record_SOURCES = tests/python/test_python_execute_func_with_record.cc \
  glom/python_embed/glom_python.cc
450
tests_python_test_python_execute_func_with_record_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
Murray Cumming's avatar
Murray Cumming committed
451
tests_python_test_python_execute_func_with_record_CPPFLAGS = $(tests_cppflags) $(tests_cppflags_ui)
452

453 454 455 456 457 458
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)

459
tests_python_test_python_execute_script_SOURCES = tests/python/test_python_execute_script.cc \
Murray Cumming's avatar
Murray Cumming committed
460
  glom/python_embed/glom_python.cc
461 462
tests_python_test_python_execute_script_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
tests_python_test_python_execute_script_CPPFLAGS = $(tests_cppflags_ui)
463

464 465 466 467 468 469
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)

470
# You must remove PlaceholderGlom::get_application() to avoid having to specify
471
# a huge set of .cc files when building this test:
Murray Cumming's avatar
Murray Cumming committed
472 473 474 475 476 477 478 479 480 481 482 483
#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
484

485 486
tests_test_glade_derived_instantiation_SOURCES = tests/test_glade_derived_instantiation.cc $(glom_source_files)
tests_test_glade_derived_instantiation_LDADD = $(glom_all_libs)
487
tests_test_glade_derived_instantiation_CPPFLAGS = $(tests_cppflags_ui)
488

489
tests_glade_toplevels_instantiation_SOURCES = tests/glade_toplevels_instantiation.cc
David King's avatar
David King committed
490
tests_glade_toplevels_instantiation_LDADD = $(tests_ldadd) $(GLOM_LIBS)
491
tests_glade_toplevels_instantiation_CPPFLAGS = $(tests_cppflags_ui)
492

493
glom_test_pyembed_SOURCES = glom/test_pyembed.cc
494
glom_test_pyembed_LDADD = $(LIBGLOM_LIBS) $(PYTHON_LDFLAGS)
495
glom_test_pyembed_CPPFLAGS = $(tests_cppflags_ui)
Murray Cumming's avatar
Murray Cumming committed
496

497
endif #GLOM_ENABLE_UI