SUBDIRS = . # Add to the tarball: EXTRA_DIST = testdata/get_config.json EXTRA_DIST += testdata/hiddenp EXTRA_DIST += testdata/hiddens EXTRA_DIST += testdata/hiddenu TESTS_ENVIRONMENT = $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND) # Shell tests SHTESTS = ca_process_tests.sh # As with every file generated by ./configure, clean them up when running # "make distclean", but not on "make clean". DISTCLEANFILES = $(SHTESTS) DISTCLEANFILES += test_basic_auth_libraries.h DISTCLEANFILES += test_callout_libraries.h DISTCLEANFILES += test_data_files_config.h if HAVE_GTEST # C++ tests PROGRAM_TESTS = ca_unittests AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/agent/tests\" AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\" AM_CPPFLAGS += -DCFG_EXAMPLES=\"$(abs_top_srcdir)/doc/examples/agent\" AM_CPPFLAGS += -DSYNTAX_FILE=\"$(abs_srcdir)/../agent_parser.yy\" AM_CXXFLAGS = $(KEA_CXXFLAGS) if USE_STATIC_LINK AM_LDFLAGS = -static endif ca_unittests_SOURCES = ca_cfg_mgr_unittests.cc ca_unittests_SOURCES += ca_command_mgr_unittests.cc ca_unittests_SOURCES += ca_controller_unittests.cc ca_unittests_SOURCES += ca_process_unittests.cc ca_unittests_SOURCES += ca_response_creator_unittests.cc ca_unittests_SOURCES += ca_response_creator_factory_unittests.cc ca_unittests_SOURCES += ca_unittests.cc ca_unittests_SOURCES += parser_unittests.cc ca_unittests_SOURCES += get_config_unittest.cc ca_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) ca_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS) ca_unittests_LDADD = $(top_builddir)/src/bin/agent/libagent.la ca_unittests_LDADD += $(top_builddir)/src/lib/process/testutils/libprocesstest.la ca_unittests_LDADD += $(top_builddir)/src/lib/process/libkea-process.la ca_unittests_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la ca_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la ca_unittests_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la ca_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la ca_unittests_LDADD += $(top_builddir)/src/lib/http/libkea-http.la ca_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la ca_unittests_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la ca_unittests_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la ca_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la ca_unittests_LDADD += $(top_builddir)/src/lib/asiolink/testutils/libasiolinktest.la ca_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la ca_unittests_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la ca_unittests_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la ca_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la ca_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la ca_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la ca_unittests_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) ca_unittests_LDADD += $(BOOST_LIBS) $(GTEST_LDADD) # The basic callout library - contains standard callouts libcallout_la_SOURCES = callout_library.cc libcallout_la_CXXFLAGS = $(AM_CXXFLAGS) libcallout_la_CPPFLAGS = $(AM_CPPFLAGS) libcallout_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la libcallout_la_LIBADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la libcallout_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la libcallout_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere # The basic HTTP auth as a callout library libbasicauth_la_SOURCES = basic_auth_library.cc libbasicauth_la_CXXFLAGS = $(AM_CXXFLAGS) libbasicauth_la_CPPFLAGS = $(AM_CPPFLAGS) libbasicauth_la_LIBADD = $(top_builddir)/src/lib/http/libkea-http.la libbasicauth_la_LIBADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la libbasicauth_la_LIBADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la libbasicauth_la_LIBADD += $(top_builddir)/src/lib/cc/libkea-cc.la libbasicauth_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la libbasicauth_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la libbasicauth_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la libbasicauth_la_LIBADD += $(LOG4CPLUS_LIBS) $(BOOST_LIBS) libbasicauth_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere nodist_ca_unittests_SOURCES = test_data_files_config.h nodist_ca_unittests_SOURCES += test_basic_auth_libraries.h nodist_ca_unittests_SOURCES += test_callout_libraries.h # Run C++ tests on "make check". TESTS = $(PROGRAM_TESTS) # Run shell tests on "make check". check_SCRIPTS = $(SHTESTS) TESTS += $(SHTESTS) # Don't install test libraries. noinst_LTLIBRARIES = libcallout.la libbasicauth.la # Don't install C++ tests. noinst_PROGRAMS = $(PROGRAM_TESTS) endif # Don't install shell tests. noinst_SCRIPTS = $(SHTESTS)