aboutsummaryrefslogtreecommitdiffstats
path: root/tests/codec_pref/Makefile.am
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-07-13 09:17:07 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-22 06:16:11 +0000
commit844876f8d5b3be161b6694e274692679608bad50 (patch)
tree2ca798db65c7333ba8f29be33b4c39a4d6f3501f /tests/codec_pref/Makefile.am
parent16dd64a078783fd9077b6b4f5cc36f0bd90df3d3 (diff)
codec_pref: move match_codec_pref() to separate c-file and add unit-test
At the moment there are three sources that may advertise a list of supported audio codec/rate settings. There is the MS that advertises advertises a speech codec list and the MSC that sends a channel type information element over A and there are also settings in the bsc configuration file that may restrict the codec/rate types that are allowed to use. The function match_codec_pref() looks at all of the three buckets and selects a codec that satisfies all three. This is already a somewhat complicated process, overit is very isolated, so lets give it its own c-file. Due to the lack of unit-tests it is very hard to make changes here so lets add also unit-test to make sure that regressions are catched early. - Put match_codec_pref() and all its helper functions into a separate c-file. - Add a unit test. Change-Id: Iabedfdcec8b99a319f2d57cbea45c5e36c7b6e29 Related: OS#3361
Diffstat (limited to 'tests/codec_pref/Makefile.am')
-rw-r--r--tests/codec_pref/Makefile.am34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/codec_pref/Makefile.am b/tests/codec_pref/Makefile.am
new file mode 100644
index 0000000..e000252
--- /dev/null
+++ b/tests/codec_pref/Makefile.am
@@ -0,0 +1,34 @@
+AM_CPPFLAGS = \
+ $(all_includes) \
+ -I$(top_srcdir)/include \
+ $(NULL)
+
+AM_CFLAGS = \
+ -Wall \
+ $(LIBOSMOCORE_CFLAGS) \
+ $(LIBOSMOGSM_CFLAGS) \
+ $(LIBOSMOABIS_CFLAGS) \
+ $(LIBOSMOSIGTRAN_CFLAGS) \
+ $(NULL)
+
+AM_LDFLAGS = \
+ $(NULL)
+
+EXTRA_DIST = \
+ codec_pref_test.ok \
+ $(NULL)
+
+noinst_PROGRAMS = \
+ codec_pref_test \
+ $(NULL)
+
+codec_pref_test_SOURCES = \
+ codec_pref_test.c \
+ $(NULL)
+
+codec_pref_test_LDADD = \
+ $(top_builddir)/src/osmo-bsc/codec_pref.o \
+ $(LIBOSMOCORE_LIBS) \
+ $(LIBOSMOGSM_LIBS) \
+ -lrt \
+ $(NULL)