diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 13 | ||||
-rw-r--r-- | tests/libsercomstub.c | 3 | ||||
-rw-r--r-- | tests/sercomm/sercomm_test.c | 4 |
5 files changed, 15 insertions, 8 deletions
@@ -90,3 +90,4 @@ tests/conv/gsm0503_test_vectors.c # vi files *.sw? +/tests/libsercomstub.a diff --git a/configure.ac b/configure.ac index 3c158962..60c177f8 100644 --- a/configure.ac +++ b/configure.ac @@ -238,6 +238,7 @@ AC_ARG_ENABLE(embedded, [embedded=$enableval], [embedded="no"]) AM_CONDITIONAL(ENABLE_STATS_TEST, true) +AM_CONDITIONAL(ENABLE_SERCOM_STUB, false) if test x"$embedded" = x"yes" then @@ -253,6 +254,7 @@ then AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) + AM_CONDITIONAL(ENABLE_SERCOM_STUB, true) AM_CONDITIONAL(ENABLE_STATS_TEST, false) AC_DEFINE([USE_GNUTLS], [0]) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) diff --git a/tests/Makefile.am b/tests/Makefile.am index e199ccce..5dd8e22b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,11 @@ AM_CFLAGS = -Wall $(TALLOC_CFLAGS) AM_LDFLAGS = LDADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS) +if ENABLE_SERCOM_STUB +noinst_LIBRARIES = libsercomstub.a +LDADD += $(top_builddir)/tests/libsercomstub.a +endif + check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \ smscb/smscb_test bits/bitrev_test a5/a5_test \ conv/conv_test auth/milenage_test lapd/lapd_test \ @@ -55,10 +60,10 @@ stats_stats_test_SOURCES = stats/stats_test.c stats_stats_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la a5_a5_test_SOURCES = a5/a5_test.c -a5_a5_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la +a5_a5_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libgsmint.la kasumi_kasumi_test_SOURCES = kasumi/kasumi_test.c -kasumi_kasumi_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la +kasumi_kasumi_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libgsmint.la comp128_comp128_test_SOURCES = comp128/comp128_test.c comp128_comp128_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la @@ -84,10 +89,10 @@ bits_bitcomp_test_SOURCES = bits/bitcomp_test.c bits_bitfield_test_SOURCES = bits/bitfield_test.c conv_conv_test_SOURCES = conv/conv_test.c conv/conv.c -conv_conv_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la +conv_conv_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libgsmint.la conv_conv_gsm0503_test_SOURCES = conv/conv_gsm0503_test.c conv/conv.c conv/gsm0503_test_vectors.c -conv_conv_gsm0503_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la +conv_conv_gsm0503_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libgsmint.la conv_conv_gsm0503_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/conv gsm0808_gsm0808_test_SOURCES = gsm0808/gsm0808_test.c diff --git a/tests/libsercomstub.c b/tests/libsercomstub.c new file mode 100644 index 00000000..99662d02 --- /dev/null +++ b/tests/libsercomstub.c @@ -0,0 +1,3 @@ +/* Stubs for embedded build */ +void sercomm_drv_lock(unsigned long __attribute__((unused)) *flags) {} +void sercomm_drv_unlock(unsigned long __attribute__((unused)) *flags) {} diff --git a/tests/sercomm/sercomm_test.c b/tests/sercomm/sercomm_test.c index 4a40f627..058c9eb4 100644 --- a/tests/sercomm/sercomm_test.c +++ b/tests/sercomm/sercomm_test.c @@ -27,10 +27,6 @@ struct osmo_sercomm_inst g_osi; -/* Locking details are not checked by this test anyway */ -void sercomm_drv_lock(unsigned long __attribute__((unused)) *flags) {} -void sercomm_drv_unlock(unsigned long __attribute__((unused)) *flags) {} - static const uint8_t valid_dlci3[] = { 0x7E, 3, 0x03, 'f', 'o', 'o', 0x7E }; static const uint8_t valid_dlci23[] = { 0x7E, 23, 0x03, '2', '3', 0x7E }; static const uint8_t valid_dlci23esc[] = { 0x7E, 23, 0x03, 0x7D, '2' ^ (1 << 5), '3', 0x7E }; |