summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-09-12 15:26:31 +0300
committerVadim Yanitskiy <axilirator@gmail.com>2017-12-31 12:21:00 +0100
commitf069eb37fe48df4e6897d0614e008b676e06db8e (patch)
tree397fd2a82a1473decdc3291590f70bdf646127c8
parentf496a998e520c3ab99d09cf279e64b0b9e52318e (diff)
Init automake test environment
-rw-r--r--.gitignore9
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--tests/Makefile.am58
-rw-r--r--tests/common.sh (renamed from test/common.sh)0
-rwxr-xr-xtests/play_all_formats.sh (renamed from test/play_all_formats.sh)0
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16 (renamed from test/ref-files/hhgttg_part1_5.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.amr-efr (renamed from test/ref-files/hhgttg_part1_5.s16.amr-efr)bin8006 -> 8006 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.amr-efr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.amr-efr.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.gsm (renamed from test/ref-files/hhgttg_part1_5.s16.gsm)bin8250 -> 8250 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.gsm.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.gsm.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.racal-efr (renamed from test/ref-files/hhgttg_part1_5.s16.racal-efr)bin7750 -> 7750 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.racal-efr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.racal-efr.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.racal-fr (renamed from test/ref-files/hhgttg_part1_5.s16.racal-fr)bin8250 -> 8250 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.racal-fr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.racal-fr.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.racal-hr (renamed from test/ref-files/hhgttg_part1_5.s16.racal-hr)bin3500 -> 3500 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.racal-hr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.racal-hr.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.rtp-efr (renamed from test/ref-files/hhgttg_part1_5.s16.rtp-efr)bin7750 -> 7750 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.rtp-efr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.rtp-efr.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi (renamed from test/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi)bin3500 -> 3500 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf (renamed from test/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf)bin3750 -> 3750 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.ti-efr (renamed from test/ref-files/hhgttg_part1_5.s16.ti-efr)bin8250 -> 8250 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.ti-efr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.ti-efr.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.ti-fr (renamed from test/ref-files/hhgttg_part1_5.s16.ti-fr)bin8250 -> 8250 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.ti-fr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.ti-fr.s16)bin80000 -> 80000 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.ti-hr (renamed from test/ref-files/hhgttg_part1_5.s16.ti-hr)bin8250 -> 8250 bytes
-rw-r--r--tests/ref-files/hhgttg_part1_5.s16.ti-hr.s16 (renamed from test/ref-files/hhgttg_part1_5.s16.ti-hr.s16)bin80000 -> 80000 bytes
-rwxr-xr-xtests/test_all_formats.sh (renamed from test/test_all_formats.sh)0
-rw-r--r--tests/testsuite.at2
-rwxr-xr-xtests/update_ref_files.sh (renamed from test/update_ref_files.sh)0
32 files changed, 72 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 456b782..298604e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,15 @@ stamp-h1
libgsmhr/refsrc
+# GNU autotest
+tests/package.m4
+tests/atconfig
+tests/atlocal
+tests/testsuite
+tests/testsuite.dir/
+tests/testsuite.log
+tests/*/*_test
+
# final executables
src/osmo-gapk
diff --git a/Makefile.am b/Makefile.am
index 4242427..0093f0e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,4 +12,4 @@ if ENABLE_GSMHR
SUBDIRS += libgsmhr
endif
-SUBDIRS += src
+SUBDIRS += src tests
diff --git a/configure.ac b/configure.ac
index 16c8bb4..180e380 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR([src/app_osmo_gapk.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([
Makefile
src/Makefile
@@ -19,6 +20,7 @@ AC_CONFIG_FILES([
include/Makefile
include/gsmhr/Makefile
libosmogapk.pc
+ tests/Makefile
])
# Options
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..940e350
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,58 @@
+AM_CPPFLAGS = \
+ $(all_includes) \
+ -I$(top_builddir) \
+ -I$(top_srcdir)/include \
+ $(NULL)
+
+AM_CFLAGS = \
+ -Wall \
+ $(LIBOSMOCORE_CFLAGS) \
+ $(LIBOSMOCODEC_CFLAGS) \
+ $(NULL)
+
+check_PROGRAMS = \
+ $(NULL)
+
+# 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 \
+ $(TESTSUITE) \
+ $(srcdir)/package.m4 \
+ $(NULL)
+
+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 $@
diff --git a/test/common.sh b/tests/common.sh
index 5fded94..5fded94 100644
--- a/test/common.sh
+++ b/tests/common.sh
diff --git a/test/play_all_formats.sh b/tests/play_all_formats.sh
index 5cebffb..5cebffb 100755
--- a/test/play_all_formats.sh
+++ b/tests/play_all_formats.sh
diff --git a/test/ref-files/hhgttg_part1_5.s16 b/tests/ref-files/hhgttg_part1_5.s16
index 80a594d..80a594d 100644
--- a/test/ref-files/hhgttg_part1_5.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.amr-efr b/tests/ref-files/hhgttg_part1_5.s16.amr-efr
index 00a11b0..00a11b0 100644
--- a/test/ref-files/hhgttg_part1_5.s16.amr-efr
+++ b/tests/ref-files/hhgttg_part1_5.s16.amr-efr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.amr-efr.s16 b/tests/ref-files/hhgttg_part1_5.s16.amr-efr.s16
index 829ed67..829ed67 100644
--- a/test/ref-files/hhgttg_part1_5.s16.amr-efr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.amr-efr.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.gsm b/tests/ref-files/hhgttg_part1_5.s16.gsm
index ad3cf8f..ad3cf8f 100644
--- a/test/ref-files/hhgttg_part1_5.s16.gsm
+++ b/tests/ref-files/hhgttg_part1_5.s16.gsm
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.gsm.s16 b/tests/ref-files/hhgttg_part1_5.s16.gsm.s16
index 28aa317..28aa317 100644
--- a/test/ref-files/hhgttg_part1_5.s16.gsm.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.gsm.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.racal-efr b/tests/ref-files/hhgttg_part1_5.s16.racal-efr
index b96be2e..b96be2e 100644
--- a/test/ref-files/hhgttg_part1_5.s16.racal-efr
+++ b/tests/ref-files/hhgttg_part1_5.s16.racal-efr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.racal-efr.s16 b/tests/ref-files/hhgttg_part1_5.s16.racal-efr.s16
index 829ed67..829ed67 100644
--- a/test/ref-files/hhgttg_part1_5.s16.racal-efr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.racal-efr.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.racal-fr b/tests/ref-files/hhgttg_part1_5.s16.racal-fr
index e0a5397..e0a5397 100644
--- a/test/ref-files/hhgttg_part1_5.s16.racal-fr
+++ b/tests/ref-files/hhgttg_part1_5.s16.racal-fr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.racal-fr.s16 b/tests/ref-files/hhgttg_part1_5.s16.racal-fr.s16
index 28aa317..28aa317 100644
--- a/test/ref-files/hhgttg_part1_5.s16.racal-fr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.racal-fr.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.racal-hr b/tests/ref-files/hhgttg_part1_5.s16.racal-hr
index 95881af..95881af 100644
--- a/test/ref-files/hhgttg_part1_5.s16.racal-hr
+++ b/tests/ref-files/hhgttg_part1_5.s16.racal-hr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.racal-hr.s16 b/tests/ref-files/hhgttg_part1_5.s16.racal-hr.s16
index 27dfd5f..27dfd5f 100644
--- a/test/ref-files/hhgttg_part1_5.s16.racal-hr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.racal-hr.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.rtp-efr b/tests/ref-files/hhgttg_part1_5.s16.rtp-efr
index 9e4615e..9e4615e 100644
--- a/test/ref-files/hhgttg_part1_5.s16.rtp-efr
+++ b/tests/ref-files/hhgttg_part1_5.s16.rtp-efr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.rtp-efr.s16 b/tests/ref-files/hhgttg_part1_5.s16.rtp-efr.s16
index 829ed67..829ed67 100644
--- a/test/ref-files/hhgttg_part1_5.s16.rtp-efr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.rtp-efr.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi
index 9a145d3..9a145d3 100644
--- a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi
+++ b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi.s16 b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi.s16
index 27dfd5f..27dfd5f 100644
--- a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-etsi.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf
index e956e9d..e956e9d 100644
--- a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf
+++ b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf.s16 b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf.s16
index 27dfd5f..27dfd5f 100644
--- a/test/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.rtp-hr-ietf.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.ti-efr b/tests/ref-files/hhgttg_part1_5.s16.ti-efr
index 9dd01ae..9dd01ae 100644
--- a/test/ref-files/hhgttg_part1_5.s16.ti-efr
+++ b/tests/ref-files/hhgttg_part1_5.s16.ti-efr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.ti-efr.s16 b/tests/ref-files/hhgttg_part1_5.s16.ti-efr.s16
index e8f759f..e8f759f 100644
--- a/test/ref-files/hhgttg_part1_5.s16.ti-efr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.ti-efr.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.ti-fr b/tests/ref-files/hhgttg_part1_5.s16.ti-fr
index 5bf4b83..5bf4b83 100644
--- a/test/ref-files/hhgttg_part1_5.s16.ti-fr
+++ b/tests/ref-files/hhgttg_part1_5.s16.ti-fr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.ti-fr.s16 b/tests/ref-files/hhgttg_part1_5.s16.ti-fr.s16
index 28aa317..28aa317 100644
--- a/test/ref-files/hhgttg_part1_5.s16.ti-fr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.ti-fr.s16
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.ti-hr b/tests/ref-files/hhgttg_part1_5.s16.ti-hr
index 29a16bf..29a16bf 100644
--- a/test/ref-files/hhgttg_part1_5.s16.ti-hr
+++ b/tests/ref-files/hhgttg_part1_5.s16.ti-hr
Binary files differ
diff --git a/test/ref-files/hhgttg_part1_5.s16.ti-hr.s16 b/tests/ref-files/hhgttg_part1_5.s16.ti-hr.s16
index 27dfd5f..27dfd5f 100644
--- a/test/ref-files/hhgttg_part1_5.s16.ti-hr.s16
+++ b/tests/ref-files/hhgttg_part1_5.s16.ti-hr.s16
Binary files differ
diff --git a/test/test_all_formats.sh b/tests/test_all_formats.sh
index 6da27af..6da27af 100755
--- a/test/test_all_formats.sh
+++ b/tests/test_all_formats.sh
diff --git a/tests/testsuite.at b/tests/testsuite.at
new file mode 100644
index 0000000..09a77c3
--- /dev/null
+++ b/tests/testsuite.at
@@ -0,0 +1,2 @@
+AT_INIT
+AT_BANNER([Regression tests.])
diff --git a/test/update_ref_files.sh b/tests/update_ref_files.sh
index 1d095ef..1d095ef 100755
--- a/test/update_ref_files.sh
+++ b/tests/update_ref_files.sh