## Copyright (c) 2009, 2010  Openismus GmbH  <http://www.openismus.com/>
##
## 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			\
	glom/libglom/example_document_load \
	glom/libglom/test_sharedptr_layoutitem		\
	tests/test_document_load			\
	tests/test_document_load_and_change		\
	tests/test_document_load_and_save		\
	tests/test_document_load_image			\
	tests/test_document_load_translations		\
	tests/test_document_change			\
	tests/test_document_autosave			\
	tests/test_field_file_format			\
	tests/test_parsing_time			\
	tests/test_signal_reemit			\
	tests/python/test_load_python_library\
	tests/python/test_python_module \
	tests/test_fake_connection \
	tests/test_script_check_for_problems \
	tests/test_selfhosting_new_empty \
	tests/test_selfhosting_new_empty_change_sysprefs \
	tests/test_selfhosting_new_empty_then_users \
	tests/test_selfhosting_new_from_example \
	tests/test_selfhosting_new_from_example_float \
	tests/test_selfhosting_new_from_example_operator \
	tests/test_selfhosting_new_from_example_strangepath \
	tests/test_selfhosting_new_then_report \
	tests/test_selfhosting_new_then_report_summary \
	tests/test_selfhosting_new_then_image \
	tests/test_selfhosting_new_then_lookup \
	tests/test_selfhosting_new_then_choices \
	tests/test_selfhosting_new_then_backup_restore \
	tests/test_selfhosting_new_then_get_privs \
	tests/test_selfhosting_new_then_alter_table \
	tests/test_selfhosting_new_then_change_columns \
	tests/test_selfhosting_non_numeric_primary_keys \
	tests/test_selfhosting_sqlinjection \
	tests/import/test_parsing \
	tests/import/test_signals \
	tests/translations_po/test_document_export_po \
	tests/translations_po/test_document_import_po

TESTS =	tests/test_document_load	\
	tests/test_document_load_and_change	\
	tests/test_document_load_and_save_all.sh \
	tests/test_document_load_image \
	tests/test_document_load_translations	\
	tests/test_document_change	\
	tests/test_document_autosave	\
	tests/test_field_file_format \
	tests/test_parsing_time	\
	tests/test_signal_reemit \
	tests/test_dtd_file_validation.sh \
	tests/test_glade_file_validation.sh \
	tests/test_xslt_file_validation.sh \
	tests/python/test_load_python_library \
	tests/python/test_python_module \
	tests/test_fake_connection \
	tests/test_script_check_for_problems \
	tests/test_selfhosting_new_empty \
	tests/test_selfhosting_new_empty_change_sysprefs \
	tests/test_selfhosting_new_empty_then_users \
	tests/test_selfhosting_new_from_example \
	tests/test_selfhosting_new_from_example_float \
	tests/test_selfhosting_new_from_example_operator \
	tests/test_selfhosting_new_from_example_in_locales.sh \
	tests/test_selfhosting_new_from_example_strangepath \
	tests/test_selfhosting_new_then_report \
	tests/test_selfhosting_new_then_report_summary \
	tests/test_selfhosting_new_then_backup_restore \
	tests/test_selfhosting_new_then_image \
	tests/test_selfhosting_new_then_lookup \
	tests/test_selfhosting_new_then_choices \
	tests/test_selfhosting_new_then_get_privs \
	tests/test_selfhosting_new_then_alter_table \
	tests/test_selfhosting_new_then_change_columns \
	tests/test_selfhosting_non_numeric_primary_keys \
	tests/test_selfhosting_sqlinjection \
	tests/import/test_parsing \
	tests/import/test_signals \
	tests/translations_po/test_document_export_po \
	tests/translations_po/test_document_import_po


# We also set this in Makefile.am, with +=,
# but this is the first use, where we must use =
dist_noinst_SCRIPTS = tests/test_dtd_file_validation.sh \
	tests/test_glade_file_validation.sh \
	tests/test_xslt_file_validation.sh \
	tests/test_glade_toplevels_instantiation.sh \
	tests/test_glom_date_in_locales.sh.in \
	tests/test_selfhosting_new_from_example_in_locales.sh \
	tests/test_document_load_and_save_all.sh

#TESTS_ENVIRONMENT=which valgrind && valgrind --tool=memcheck --leak-check=full --leak-resolution=high --trace-children=yes --num-callers=30

# 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

tests_ldadd = glom/libglom/libglom-$(GLOM_ABI_VERSION).la $(libglom_all_libs)
tests_cppflags = $(glom_includes) $(LIBGLOM_CFLAGS)  $(boost_python_cflags) $(glom_defines) \
	-DGLOM_DOCDIR_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/examples"\" \
	-DGLOM_TEST_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/tests"\"
tests_cppflags_ui = $(glom_includes) $(GLOM_CFLAGS)  $(boost_python_cflags) $(glom_defines)


glom_libglom_test_connectionpool_SOURCES = glom/libglom/test_connectionpool.cc
glom_libglom_test_connectionpool_LDADD = $(tests_ldadd)
glom_libglom_test_connectionpool_CPPFLAGS = $(tests_cppflags)

glom_libglom_example_document_load_SOURCES = glom/libglom/example_document_load.cc
glom_libglom_example_document_load_LDADD = $(tests_ldadd)
glom_libglom_example_document_load_CPPFLAGS = $(tests_cppflags)

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)

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

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

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)

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)
tests_test_document_load_image_LDADD = $(tests_ldadd) $(GDKMM_LIBS)
tests_test_document_load_image_CPPFLAGS = $(tests_cppflags) $(GDKMM_CFLAGS)

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)

tests_test_document_change_SOURCES = tests/test_document_change.cc
tests_test_document_change_LDADD = $(tests_ldadd)
tests_test_document_change_CPPFLAGS = $(tests_cppflags)

tests_test_document_autosave_SOURCES = tests/test_document_autosave.cc
tests_test_document_autosave_LDADD = $(tests_ldadd)
tests_test_document_autosave_CPPFLAGS = $(tests_cppflags)

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)

tests_test_parsing_time_SOURCES = tests/test_parsing_time.cc
tests_test_parsing_time_LDADD = $(tests_ldadd)
tests_test_parsing_time_CPPFLAGS = $(tests_cppflags)

tests_test_signal_reemit_SOURCES = tests/test_signal_reemit.cc
tests_test_signal_reemit_LDADD = $(LIBGLOM_LIBS)
tests_test_signal_reemit_CPPFLAGS = $(tests_cppflags)

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

tests_python_test_python_module_SOURCES = tests/python/test_python_module.cc
tests_python_test_python_module_LDADD = $(tests_ldadd) $(PYTHON_LDFLAGS)
tests_python_test_python_module_CPPFLAGS = $(tests_cppflags)


# Distribute the tests data:
dist_noinst_DATA = \
	tests/import/data/albums.csv \
	tests/translations_po/data/test.po \
	tests/test_image.jpg \
	tests/test_example_music_collection_text_pk_fields.glom

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

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


tests_import_test_parsing_SOURCES =	\
	glom/import_csv/csv_parser.cc	\
	glom/import_csv/csv_parser.h	\
	tests/import/utils.cc\
	tests/import/utils.h\
	tests/import/test_parsing.cc
tests_import_test_parsing_LDADD = $(tests_ldadd)
tests_import_test_parsing_CPPFLAGS = $(tests_cppflags) $(glom_test_import_defines)

tests_import_test_signals_SOURCES =	\
	glom/import_csv/csv_parser.cc	\
	glom/import_csv/csv_parser.h	\
	tests/import/utils.cc\
	tests/import/utils.h\
	tests/import/test_signals.cc
tests_import_test_signals_LDADD = $(tests_ldadd)
tests_import_test_signals_CPPFLAGS = $(tests_cppflags)

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)

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

sources_test_selfhosting_utils = tests/test_selfhosting_utils.h \
	tests/test_selfhosting_utils.cc

tests_test_fake_connection_SOURCES = tests/test_fake_connection.cc
tests_test_fake_connection_LDADD = $(tests_ldadd)
tests_test_fake_connection_CPPFLAGS = $(tests_cppflags)

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)

tests_test_selfhosting_new_empty_SOURCES = tests/test_selfhosting_new_empty.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_empty_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_empty_CPPFLAGS = $(tests_cppflags)

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)

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)

tests_test_selfhosting_new_from_example_SOURCES = tests/test_selfhosting_new_from_example.cc $(sources_test_selfhosting_utils)
tests_test_selfhosting_new_from_example_LDADD = $(tests_ldadd)
tests_test_selfhosting_new_from_example_CPPFLAGS = $(tests_cppflags)

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)

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)

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)

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)

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)

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)

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)

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)
tests_test_selfhosting_new_then_choices_CPPFLAGS = $(tests_cppflags) $(glom_test_image_defines)

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)

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)

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)

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)

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)

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)

# Tests of code used by the application,
# and not just the library or the command-line utilities.
if GLOM_ENABLE_UI

# TODO: Shouldn't test_pyembed be non-UI?
check_PROGRAMS += \
	glom/utility_widgets/test_flowtable			\
	glom/utility_widgets/eggspreadtablemm/test_spreadtablednd \
	glom/test_pyembed \
	tests/test_glade_derived_instantiation \
	tests/glade_toplevels_instantiation \
	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 \
	tests/python/test_python_execute_func_with_record \
	tests/python/test_python_execute_script \
	tests/test_iso_codes
#	glom/mode_data/test_flowtablewithfields
#	glom/utility_widgets/canvas/test_canvas_editable

	
TESTS += \
	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 \
	tests/python/test_python_execute_func_with_record \
	tests/python/test_python_execute_script \
	tests/test_iso_codes

# Note that test_glom_date_in_locales.sh requires us to have certain locales 
# installed and configured.
# Also note: This is 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.

# Some continuous-integration systems won't have an X server,
# so they will want to disable these in configure.
if GLOM_ENABLE_UI_TESTS
TESTS += \
	tests/test_glade_toplevels_instantiation.sh \
	tests/test_glade_derived_instantiation \
	tests/test_glom_date_in_locales.sh
endif #GLOM_ENABLE_UI_TESTS


glom_utility_widgets_test_flowtable_SOURCES =	\
	glom/utility_widgets/flowtable.cc	\
	glom/utility_widgets/flowtable.h	\
	$(glom_eggspreadtable_files) \
	glom/utility_widgets/test_flowtable.cc
glom_utility_widgets_test_flowtable_LDADD = $(GLOM_LIBS)
glom_utility_widgets_test_flowtable_CPPFLAGS = $(tests_cppflags_ui)

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)

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

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


tests_python_test_python_execute_func_SOURCES = tests/python/test_python_execute_func.cc \
  glom/python_embed/glom_python.cc
tests_python_test_python_execute_func_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
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)

tests_python_test_python_execute_func_bad_syntax_SOURCES = tests/python/test_python_execute_func_bad_syntax.cc \
  glom/python_embed/glom_python.cc
tests_python_test_python_execute_func_bad_syntax_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
tests_python_test_python_execute_func_bad_syntax_CPPFLAGS = $(tests_cppflags_ui)

tests_python_test_python_execute_func_date_SOURCES = tests/python/test_python_execute_func_date.cc \
  glom/python_embed/glom_python.cc
tests_python_test_python_execute_func_date_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
tests_python_test_python_execute_func_date_CPPFLAGS = $(tests_cppflags_ui)

tests_python_test_python_execute_func_change_result_type_SOURCES = tests/python/test_python_execute_func_change_result_type.cc \
  glom/python_embed/glom_python.cc
tests_python_test_python_execute_func_change_result_type_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
tests_python_test_python_execute_func_change_result_type_CPPFLAGS = $(tests_cppflags_ui)

tests_python_test_python_execute_func_with_record_SOURCES = tests/python/test_python_execute_func_with_record.cc \
  glom/python_embed/glom_python.cc
tests_python_test_python_execute_func_with_record_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(boost_python_libs)
tests_python_test_python_execute_func_with_record_CPPFLAGS = $(tests_cppflags) $(tests_cppflags_ui)

tests_python_test_python_execute_script_SOURCES = tests/python/test_python_execute_script.cc \
  glom/python_embed/glom_python.cc
tests_python_test_python_execute_script_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
tests_python_test_python_execute_script_CPPFLAGS = $(tests_cppflags_ui)

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)

# You must remove PlaceholderGlom::get_application() to avoid having to specify
# a huge set of .cc files when building this test:
#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

tests_test_glade_derived_instantiation_SOURCES = tests/test_glade_derived_instantiation.cc $(glom_source_files)
tests_test_glade_derived_instantiation_LDADD = $(glom_all_libs)
tests_test_glade_derived_instantiation_CPPFLAGS = $(tests_cppflags_ui)

tests_glade_toplevels_instantiation_SOURCES = tests/glade_toplevels_instantiation.cc
tests_glade_toplevels_instantiation_LDADD = $(tests_ldadd) $(GLOM_LIBS)
tests_glade_toplevels_instantiation_CPPFLAGS = $(tests_cppflags_ui)

glom_test_pyembed_SOURCES = glom/test_pyembed.cc
glom_test_pyembed_LDADD = $(LIBGLOM_LIBS) $(PYTHON_LDFLAGS)
glom_test_pyembed_CPPFLAGS = $(tests_cppflags_ui)

endif #GLOM_ENABLE_UI
