Commit f9c50e84 authored by Marvin Scholz's avatar Marvin Scholz

First try at tests with autotools stuff

parent fa86f2de
......@@ -27,3 +27,10 @@ missing
mkinstalldirs
*.tar.gz
config.h.in~
# Ignore test output files
/tests/*.log
/tests/*.trs
# Ignore auxiliary files
/tap-driver.sh
......@@ -3,7 +3,7 @@
AUTOMAKE_OPTIONS = foreign dist-zip
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src conf doc web admin win32 examples
SUBDIRS = src conf doc web admin win32 examples tests
EXTRA_DIST = README.md HACKING m4/acx_pthread.m4 m4/ogg.m4 \
m4/theora.m4 m4/vorbis.m4 m4/speex.m4 \
......
......@@ -3,6 +3,7 @@ AC_INIT([Icecast], [2.4.99.1], [icecast@xiph.org])
AC_PREREQ([2.54])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
dnl Process this file with autoconf to produce a configure script.
AM_INIT_AUTOMAKE
......@@ -10,6 +11,7 @@ AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_AWK
AC_CANONICAL_HOST
AC_PROG_LIBTOOL
AC_SYS_LARGEFILE
......@@ -165,4 +167,4 @@ src/common/net/Makefile src/common/timing/Makefile doc/Makefile doc/img/Makefile
doc/assets/Makefile doc/assets/css/Makefile doc/assets/font/Makefile
doc/assets/img/Makefile web/Makefile web/assets/Makefile web/assets/css/Makefile
web/assets/font/Makefile admin/Makefile admin/includes/Makefile win32/Makefile
examples/Makefile])
examples/Makefile tests/Makefile])
## Process this file with automake to produce Makefile.in
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
$(top_srcdir)/tap-driver.sh
TESTS = \
startup.test
EXTRA_DIST = $(TESTS)
EXTRA_DIST += \
icecast.xml \
on-connect.sh
This diff is collapsed.
......@@ -41,6 +41,11 @@
<password>hackmemore</password>
</mount>
<mount type="normal">
<mount-name>/test-on-connect.ogg</mount-name>
<on-connect>on-connect.sh</on-connect>
</mount>
<mount type="normal">
<mount-name>/foo.ogg</mount-name>
<authentication type="htpasswd">
......
#!/bin/bash
touch "on-connect-success"
exit 0
#!/bin/sh
../src/icecast -c ./icecast.xml 2> /dev/null &
ICECAST_PID=$!
echo 'ok 1 - Icecast started'
sleep 3
if kill -0 $ICECAST_PID > /dev/null 2>&1; then
echo 'ok 2 - Icecast running'
else
echo 'not ok 2 - Icecast not running'
fi
if kill $ICECAST_PID > /dev/null 2>&1; then
echo 'ok 3 - Icecast stopped'
else
echo 'not ok 3 - Icecast not stopped'
fi
echo 1..3 # Number of tests to be executed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment