diff --git a/.gitignore b/.gitignore index 521b063f..5a364f7c 100644 --- a/.gitignore +++ b/.gitignore @@ -27,13 +27,18 @@ missing mkinstalldirs *.tar.gz config.h.in~ +/build-aux # Ignore test output files /tests/*.log /tests/*.trs -# Ignore test compiled binary files -/tests/tests/ctest_*.test +# Ignore test build artifacts +/tests/*.lo +/tests/*.la +/tests/.deps/ +/tests/.libs/ +/tests/ctest_*_test # Ignore auxiliary files /tap-driver.sh diff --git a/tests/Makefile.am b/tests/Makefile.am index 74ff7ab7..9bdb45f9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,24 +3,50 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/tap-driver.sh +check_PROGRAMS = + +# +# Helper library for TAP tests +# + +libice_ctest_la_SOURCES = ctest_lib.c ctest_lib.h +noinst_LTLIBRARIES = libice_ctest.la + + +# +# Script-based tests +# + TESTS = \ startup.test \ - admin.test \ - ctest_suite.test \ - ctest_resourcematch.test \ - ctest_refobject.test + admin.test -EXTRA_DIST = $(TESTS) -EXTRA_DIST += \ +# +# Test programs +# + +ctest_suite_test_SOURCES = ctest_suite.c +ctest_suite_test_LDADD = libice_ctest.la +check_PROGRAMS += ctest_suite_test + +ctest_resourcematch_test_SOURCES = ctest_resourcematch.c ../src/resourcematch.c +ctest_resourcematch_test_LDADD = libice_ctest.la +check_PROGRAMS += ctest_resourcematch_test + +ctest_refobject_test_SOURCES = ctest_refobject.c ../src/refobject.c +ctest_refobject_test_LDADD = libice_ctest.la \ + ../src/common/thread/libicethread.la \ + ../src/common/avl/libiceavl.la +check_PROGRAMS += ctest_refobject_test + + +# +# Extra files needed by tests +# + +EXTRA_DIST = $(TESTS) \ icecast.xml \ on-connect.sh -check_PROGRAMS = ctest_suite.test ctest_resourcematch.test ctest_refobject.test -noinst_HEADERS = ctest_lib.h - -ctest_suite_test_SOURCES=ctest_suite.c ctest_lib.c -ctest_resourcematch_test_SOURCES=ctest_resourcematch.c ctest_lib.c ../src/resourcematch.c -ctest_refobject_test_SOURCES=ctest_refobject.c ctest_lib.c ../src/refobject.c -ctest_refobject_test_DEPENDENCIES = ../src/common/thread/libicethread.la ../src/common/avl/libiceavl.la -ctest_refobject_test_LDADD = $(ctest_refobject_test_DEPENDENCIES) +TESTS += $(check_PROGRAMS)