mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Update: Separate integration and unit tests
- Unit tests are now in `src/tests` - Integration tests are in `tests`
This commit is contained in:
parent
e35f9c930d
commit
d9793f4e33
12
.gitignore
vendored
12
.gitignore
vendored
@ -40,6 +40,18 @@ config.h.in~
|
||||
/tests/.libs/
|
||||
/tests/ctest_*.test
|
||||
|
||||
# Ignore test output files
|
||||
/src/ctest_*.log
|
||||
/src/ctest_*.trs
|
||||
/src/test-suite.log
|
||||
|
||||
# Ignore test build artifacts
|
||||
/src/tests/*.lo
|
||||
/src/libice_ctest.la
|
||||
/src/ctest_*.test
|
||||
/src/tests/.deps/
|
||||
/src/tests/.dirstamp
|
||||
|
||||
# Ignore auxiliary files
|
||||
/tap-driver.sh
|
||||
|
||||
|
@ -39,7 +39,7 @@ AS_CASE("${host_os}",
|
||||
[SYS="${host_os}"]
|
||||
)
|
||||
|
||||
AM_INIT_AUTOMAKE([tar-ustar foreign dist-zip])
|
||||
AM_INIT_AUTOMAKE([tar-ustar foreign dist-zip subdir-objects])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
@ -140,3 +140,5 @@ icecast_DEPENDENCIES = \
|
||||
|
||||
icecast_LDADD = $(icecast_DEPENDENCIES)
|
||||
icecast_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/common
|
||||
|
||||
include $(srcdir)/tests/Makefile.am
|
||||
|
40
src/tests/Makefile.am
Normal file
40
src/tests/Makefile.am
Normal file
@ -0,0 +1,40 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
######################
|
||||
# Icecast unit tests #
|
||||
######################
|
||||
|
||||
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 = %reldir%/ctest_lib.c %reldir%/ctest_lib.h
|
||||
noinst_LTLIBRARIES = libice_ctest.la
|
||||
|
||||
#
|
||||
# Test programs
|
||||
#
|
||||
|
||||
ctest_suite_test_SOURCES = %reldir%/ctest_suite.c
|
||||
ctest_suite_test_LDADD = libice_ctest.la
|
||||
check_PROGRAMS += ctest_suite.test
|
||||
|
||||
ctest_resourcematch_test_SOURCES = %reldir%/ctest_resourcematch.c
|
||||
ctest_resourcematch_test_LDADD = libice_ctest.la icecast-resourcematch.o
|
||||
check_PROGRAMS += ctest_resourcematch.test
|
||||
|
||||
ctest_refobject_test_SOURCES = %reldir%/ctest_refobject.c
|
||||
ctest_refobject_test_LDADD = libice_ctest.la \
|
||||
common/thread/libicethread.la \
|
||||
common/avl/libiceavl.la \
|
||||
icecast-refobject.o
|
||||
check_PROGRAMS += ctest_refobject.test
|
||||
|
||||
|
||||
# Add all programs to TESTS
|
||||
TESTS = $(check_PROGRAMS)
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "ctest_lib.h"
|
||||
|
||||
#include "../src/refobject.h"
|
||||
#include "../refobject.h"
|
||||
|
||||
static void test_ptr(void)
|
||||
{
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "ctest_lib.h"
|
||||
|
||||
#include "../src/resourcematch.h"
|
||||
#include "../resourcematch.h"
|
||||
|
||||
struct test {
|
||||
const char *pattern;
|
@ -1,17 +1,12 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
#############################
|
||||
# Icecast integration tests #
|
||||
#############################
|
||||
|
||||
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
|
||||
@ -22,26 +17,6 @@ TESTS = \
|
||||
admin.test
|
||||
|
||||
|
||||
#
|
||||
# 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
|
||||
ctest_resourcematch_test_LDADD = libice_ctest.la ../src/icecast-resourcematch.o
|
||||
check_PROGRAMS += ctest_resourcematch.test
|
||||
|
||||
ctest_refobject_test_SOURCES = ctest_refobject.c
|
||||
ctest_refobject_test_LDADD = libice_ctest.la \
|
||||
../src/common/thread/libicethread.la \
|
||||
../src/common/avl/libiceavl.la \
|
||||
../src/icecast-refobject.o
|
||||
check_PROGRAMS += ctest_refobject.test
|
||||
|
||||
|
||||
#
|
||||
# Extra files needed by tests
|
||||
#
|
||||
@ -49,5 +24,3 @@ check_PROGRAMS += ctest_refobject.test
|
||||
EXTRA_DIST = $(TESTS) \
|
||||
icecast.xml \
|
||||
on-connect.sh
|
||||
|
||||
TESTS += $(check_PROGRAMS)
|
||||
|
Loading…
Reference in New Issue
Block a user