aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2013-05-23 19:58:28 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-05-24 02:20:50 +0200
commit479fba171ba5d3877fc4024f4df03183ffc363b3 (patch)
tree25af744f32993b4ef2de3c50d85b738ac7763ae2 /tests/Makefile.am
parentdd34adea7a385b2246e6a7445d2bf71dc86e046b (diff)
add testsuite infrastructure and osmux test
This patch adds the testsuite infrastructure and it populates it with one test for osmux. The osmux tests makes sure that: * We get the same number of RTP messages in the input and the output path. * The payload of the RTP message is reconstructed correctly. * The reconstructed timing is correct.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..7189324
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,48 @@
+AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include
+
+check_PROGRAMS = osmux/osmux_test
+
+osmux_osmux_test_SOURCES = osmux/osmux_test.c
+osmux_osmux_test_LDADD = -losmocore -losmonetif
+
+# The `:;' works around a Bash 3.2 bug when the output is not writeable.
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+ :;{ \
+ echo '# Signature of the current package.' && \
+ echo 'm4_define([AT_PACKAGE_NAME],' && \
+ echo ' [$(PACKAGE_NAME)])' && \
+ echo 'm4_define([AT_PACKAGE_TARNAME],' && \
+ echo ' [$(PACKAGE_TARNAME)])' && \
+ echo 'm4_define([AT_PACKAGE_VERSION],' && \
+ echo ' [$(PACKAGE_VERSION)])' && \
+ echo 'm4_define([AT_PACKAGE_STRING],' && \
+ echo ' [$(PACKAGE_STRING)])' && \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \
+ echo ' [$(PACKAGE_BUGREPORT)])'; \
+ echo 'm4_define([AT_PACKAGE_URL],' && \
+ echo ' [$(PACKAGE_URL)])'; \
+ } >'$(srcdir)/package.m4'
+
+EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \
+ osmux_test.ok
+
+DISTCLEANFILES = atconfig
+
+TESTSUITE = $(srcdir)/testsuite
+
+check-local: atconfig $(TESTSUITE)
+ $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
+
+installcheck-local: atconfig $(TESTSUITE)
+ $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
+ $(TESTSUITEFLAGS)
+
+clean-local:
+ test ! -f '$(TESTSUITE)' || \
+ $(SHELL) '$(TESTSUITE)' --clean
+
+AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
+ $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+ mv $@.tmp $@