aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/oap
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-10-12 11:57:35 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-02 12:56:43 +0100
commitf06046b6afd3dd9db60bab55f167d6056af5885e (patch)
tree2334a54a47f9b99bd21bb6dd1521909f01c92367 /openbsc/tests/oap
parentd739f092be82fb01e53404b0a67bc0158063a843 (diff)
oap: add oap testsuite skeleton
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/oap')
-rw-r--r--openbsc/tests/oap/Makefile.am19
-rw-r--r--openbsc/tests/oap/oap_test.c58
-rw-r--r--openbsc/tests/oap/oap_test.ok2
3 files changed, 79 insertions, 0 deletions
diff --git a/openbsc/tests/oap/Makefile.am b/openbsc/tests/oap/Makefile.am
new file mode 100644
index 000000000..e1609029d
--- /dev/null
+++ b/openbsc/tests/oap/Makefile.am
@@ -0,0 +1,19 @@
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
+AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
+
+EXTRA_DIST = oap_test.ok
+
+noinst_PROGRAMS = oap_test
+
+oap_test_SOURCES = oap_test.c
+
+oap_test_LDADD = \
+ $(top_builddir)/src/gprs/oap.o \
+ $(top_builddir)/src/gprs/oap_messages.o \
+ $(top_builddir)/src/gprs/gprs_utils.o \
+ $(top_builddir)/src/gprs/gsm_04_08_gprs.o \
+ $(top_builddir)/src/libcommon/libcommon.a \
+ $(LIBOSMOCORE_LIBS) \
+ $(LIBOSMOGSM_LIBS) \
+ -lrt
+
diff --git a/openbsc/tests/oap/oap_test.c b/openbsc/tests/oap/oap_test.c
new file mode 100644
index 000000000..b03c8dc90
--- /dev/null
+++ b/openbsc/tests/oap/oap_test.c
@@ -0,0 +1,58 @@
+/* Test Osmocom Authentication Protocol */
+/*
+ * (C) 2015 by sysmocom s.f.m.c. GmbH
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <osmocom/core/application.h>
+
+#include <openbsc/debug.h>
+
+#include <openbsc/oap.h>
+#include <openbsc/oap_messages.h>
+
+#include <stdio.h>
+
+
+static void test_oap(void)
+{
+ printf("not implemented\n");
+}
+
+static struct log_info_cat gprs_categories[] = {
+ [DGPRS] = {
+ .name = "DGPRS",
+ .description = "GPRS Packet Service",
+ .enabled = 1, .loglevel = LOGL_DEBUG,
+ },
+};
+
+static struct log_info info = {
+ .cat = gprs_categories,
+ .num_cat = ARRAY_SIZE(gprs_categories),
+};
+
+int main(int argc, char **argv)
+{
+ osmo_init_logging(&info);
+
+ test_oap();
+ printf("Done\n");
+
+ return 0;
+}
+
diff --git a/openbsc/tests/oap/oap_test.ok b/openbsc/tests/oap/oap_test.ok
new file mode 100644
index 000000000..e411ad92d
--- /dev/null
+++ b/openbsc/tests/oap/oap_test.ok
@@ -0,0 +1,2 @@
+not implemented
+Done