summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-09-15 19:34:44 +0430
committerVadim Yanitskiy <axilirator@gmail.com>2017-12-31 12:21:00 +0100
commitf59f3f1ba8bc1cdf7c406867e3611f810ddc28c7 (patch)
tree23f56365c022fe9dad9aa453a76d982f2120ade8
parent10076f0acce2274fdb363cd69ee83becdef6d6c8 (diff)
tests: add format / codec transcoding tests
This test group is intended to check the format / codec transcoding capabilities of the library. The reference files are used to ensure that encoding or decoding was successful. The following formats are currently being tested: - amr_efr - gsm - racal_hr - racal_fr - racal_efr - ti_hr - ti_fr - ti_efr - rtp_efr - rtp_hr_etsi - rtp_hr_ietf
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/testsuite.at220
2 files changed, 221 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8f53787..cda5c2d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -69,6 +69,7 @@ EXTRA_DIST += \
io/pq_file_test.ok \
io/pq_rtp_test.ok \
io/io_sample.txt \
+ ref-files/* \
$(NULL)
DISTCLEANFILES = atconfig
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 1127f2b..7367bc5 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -22,3 +22,223 @@ cat $abs_srcdir/io/pq_rtp_test.ok > expout
AT_CHECK([
$abs_top_builddir/tests/io/pq_rtp_test], [0], [expout])
AT_CLEANUP
+
+AT_SETUP([conv/enc/amr_efr])
+AT_KEYWORDS([amr_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.amr-efr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g amr-efr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/gsm])
+AT_KEYWORDS([gsm])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.gsm > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g gsm
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/racal_hr])
+AT_KEYWORDS([racal_hr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-hr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g racal-hr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/racal_fr])
+AT_KEYWORDS([racal_fr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-fr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g racal-fr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/racal_efr])
+AT_KEYWORDS([racal_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-efr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g racal-efr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/ti_hr])
+AT_KEYWORDS([ti_hr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-hr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g ti-hr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/ti_fr])
+AT_KEYWORDS([ti_fr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-fr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g ti-fr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/ti_efr])
+AT_KEYWORDS([ti_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-efr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g ti-efr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/rtp_efr])
+AT_KEYWORDS([rtp_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-efr > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g rtp-efr
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/rtp_hr_etsi])
+AT_KEYWORDS([rtp_hr_etsi])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g rtp-hr-etsi
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/enc/rtp_hr_ietf])
+AT_KEYWORDS([rtp_hr_ietf])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16 \
+ -f rawpcm-s16le -g rtp-hr-ietf
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/amr_efr])
+AT_KEYWORDS([amr_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.amr-efr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.amr-efr \
+ -f amr-efr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/gsm])
+AT_KEYWORDS([gsm])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.gsm.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.gsm \
+ -f gsm -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/racal_hr])
+AT_KEYWORDS([racal_hr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-hr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-hr \
+ -f racal-hr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/racal_fr])
+AT_KEYWORDS([racal_fr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-fr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-fr \
+ -f racal-fr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/racal_efr])
+AT_KEYWORDS([racal_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-efr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.racal-efr \
+ -f racal-efr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/ti_hr])
+AT_KEYWORDS([ti_hr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-hr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-hr \
+ -f ti-hr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/ti_fr])
+AT_KEYWORDS([ti_fr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-fr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-fr \
+ -f ti-fr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/ti_efr])
+AT_KEYWORDS([ti_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-efr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.ti-efr \
+ -f ti-efr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/rtp_efr])
+AT_KEYWORDS([rtp_efr])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-efr.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-efr \
+ -f rtp-efr -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/rtp_hr_etsi])
+AT_KEYWORDS([rtp_hr_etsi])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi \
+ -f rtp-hr-etsi -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP
+
+AT_SETUP([conv/dec/rtp_hr_ietf])
+AT_KEYWORDS([rtp_hr_ietf])
+cat $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf.s16 > expout
+AT_CHECK([
+ $abs_top_builddir/src/osmo-gapk \
+ -i $abs_srcdir/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf \
+ -f rtp-hr-ietf -g rawpcm-s16le
+], [0], [expout], [ignore])
+AT_CLEANUP