diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-05-20 21:41:08 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-29 13:20:45 +0200 |
commit | 9df6c1b9826fc7a5cee6b86693fb93951a76ac37 (patch) | |
tree | cd556fb7ab7c9feb307290b0f769d521fdc1518e /openbsc | |
parent | b8afb85f9b9ae66ee793554084e44df23e4f7553 (diff) |
add libiudummy, to avoid linking Iu deps in tests
Change-Id: I4a66c4122011dbc87c6fcb336ab0461b86522c98
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/configure.ac | 1 | ||||
-rw-r--r-- | openbsc/tests/Makefile.am | 1 | ||||
-rw-r--r-- | openbsc/tests/db/Makefile.am | 1 | ||||
-rw-r--r-- | openbsc/tests/libiudummy/Makefile.am | 16 | ||||
-rw-r--r-- | openbsc/tests/libiudummy/README | 2 | ||||
-rw-r--r-- | openbsc/tests/libiudummy/iudummy.c | 35 |
6 files changed, 56 insertions, 0 deletions
diff --git a/openbsc/configure.ac b/openbsc/configure.ac index f45db83d0..80fefb5f1 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -214,6 +214,7 @@ AC_OUTPUT( src/gprs/Makefile tests/Makefile tests/atlocal + tests/libiudummy/Makefile tests/gsm0408/Makefile tests/db/Makefile tests/channel/Makefile diff --git a/openbsc/tests/Makefile.am b/openbsc/tests/Makefile.am index 0ebd2e2bb..a707712e1 100644 --- a/openbsc/tests/Makefile.am +++ b/openbsc/tests/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS = \ + libiudummy \ gsm0408 \ db \ channel \ diff --git a/openbsc/tests/db/Makefile.am b/openbsc/tests/db/Makefile.am index 2f04d5b9b..a4c9dafff 100644 --- a/openbsc/tests/db/Makefile.am +++ b/openbsc/tests/db/Makefile.am @@ -38,6 +38,7 @@ db_test_LDADD = \ $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/tests/libiudummy/libiudummy.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/openbsc/tests/libiudummy/Makefile.am b/openbsc/tests/libiudummy/Makefile.am new file mode 100644 index 000000000..38664a2b6 --- /dev/null +++ b/openbsc/tests/libiudummy/Makefile.am @@ -0,0 +1,16 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + -I$(top_builddir) \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(NULL) + +noinst_LIBRARIES = libiudummy.a + +libiudummy_a_SOURCES = \ + iudummy.c \ + $(NULL) diff --git a/openbsc/tests/libiudummy/README b/openbsc/tests/libiudummy/README new file mode 100644 index 000000000..b90bf8c8b --- /dev/null +++ b/openbsc/tests/libiudummy/README @@ -0,0 +1,2 @@ +libiudummy, for convenience, implements iu_tx() as a mere dummy data logger, +for linking scopes that want to avoid linking against libasn1c, osmo-iuh etc. diff --git a/openbsc/tests/libiudummy/iudummy.c b/openbsc/tests/libiudummy/iudummy.c new file mode 100644 index 000000000..7052de82c --- /dev/null +++ b/openbsc/tests/libiudummy/iudummy.c @@ -0,0 +1,35 @@ +#include <stdint.h> + +#include <osmocom/core/logging.h> +#include <osmocom/vty/logging.h> +#include <osmocom/core/msgb.h> + +struct msgb; +struct ue_conn_ctx; +struct gsm_auth_tuple; + +int iu_tx(struct msgb *msg, uint8_t sapi) +{ + LOGP(DLGLOBAL, LOGL_INFO, "iu_tx() dummy called, NOT transmitting %d bytes: %s\n", + msg->len, osmo_hexdump(msg->data, msg->len)); + return 0; +} + +int iu_tx_sec_mode_cmd(struct ue_conn_ctx *uectx, struct gsm_auth_tuple *tp, + int send_ck) +{ + LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_sec_mode_cmd() dummy called, NOT transmitting Security Mode Command\n"); + return 0; +} + +int iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac) +{ + LOGP(DLGLOBAL, LOGL_INFO, "iu_page_cs() dummy called, NOT paging\n"); + return 0; +} + +int iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t rac) +{ + LOGP(DLGLOBAL, LOGL_INFO, "iu_page_ps() dummy called, NOT paging\n"); + return 0; +} |