aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-02-03 18:15:05 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-02-03 18:15:05 +0100
commit67f5003caa830bf51f1286c0419225075b17516c (patch)
treed646a38d08486203f6998c607c774eeb1eb3aa94 /openbsc/tests
parentcaf49b4c141f2b623da77bd7984a37e1b62fc75f (diff)
parent9377528c70fbe708d0fa7a6bb224fdc9e206dd22 (diff)
Merge branch 'master' into on-waves/sccp
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/channel/Makefile.am6
-rw-r--r--openbsc/tests/channel/channel_test.c2
-rw-r--r--openbsc/tests/debug/Makefile.am2
-rw-r--r--openbsc/tests/debug/debug_test.c21
-rw-r--r--openbsc/tests/sccp/sccp_test.c2
-rw-r--r--openbsc/tests/sms/sms_test.c1
6 files changed, 25 insertions, 9 deletions
diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am
index 50fadc582..6b9f6e3cb 100644
--- a/openbsc/tests/channel/Makefile.am
+++ b/openbsc/tests/channel/Makefile.am
@@ -12,6 +12,10 @@ channel_test_SOURCES = channel_test.c \
$(top_srcdir)/src/select.c \
$(top_srcdir)/src/talloc.c \
$(top_srcdir)/src/gsm_data.c \
- $(top_srcdir)/src/signal.c
+ $(top_srcdir)/src/signal.c \
+ $(top_srcdir)/src/statistics.c \
+ $(top_srcdir)/src/bts_ipaccess_nanobts.c \
+ $(top_srcdir)/src/bts_siemens_bs11.c \
+ $(top_srcdir)/src/tlv_parser.c
channel_test_LDADD = -ldl -ldbi
diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c
index 1b01878b5..36d057273 100644
--- a/openbsc/tests/channel/channel_test.c
+++ b/openbsc/tests/channel/channel_test.c
@@ -77,3 +77,5 @@ void nm_state_event() {}
void input_event() {}
void sms_alloc() {}
+struct tlv_definition nm_att_tlvdef;
+
diff --git a/openbsc/tests/debug/Makefile.am b/openbsc/tests/debug/Makefile.am
index 0cdf46ad5..62c906e72 100644
--- a/openbsc/tests/debug/Makefile.am
+++ b/openbsc/tests/debug/Makefile.am
@@ -1,4 +1,4 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
noinst_PROGRAMS = debug_test
-debug_test_SOURCES = debug_test.c $(top_srcdir)/src/debug.c
+debug_test_SOURCES = debug_test.c $(top_srcdir)/src/debug.c $(top_srcdir)/src/talloc.c
diff --git a/openbsc/tests/debug/debug_test.c b/openbsc/tests/debug/debug_test.c
index 77ac01532..0f0c284ab 100644
--- a/openbsc/tests/debug/debug_test.c
+++ b/openbsc/tests/debug/debug_test.c
@@ -1,6 +1,6 @@
/* simple test for the debug interface */
/*
- * (C) 2008 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -24,11 +24,18 @@
int main(int argc, char** argv)
{
- debug_parse_category_mask("DRLL");
- DEBUGP(DCC, "You should not see this\n");
+ struct debug_target *stderr_target;
- debug_parse_category_mask("DRLL:DCC");
- DEBUGP(DRLL, "You should see this\n");
- DEBUGP(DCC, "You should see this\n");
- DEBUGP(DMM, "You should not see this\n");
+ debug_init();
+ stderr_target = debug_target_create_stderr();
+ debug_add_target(stderr_target);
+ debug_set_all_filter(stderr_target, 1);
+
+ debug_parse_category_mask(stderr_target, "DRLL");
+ DEBUGP(DCC, "You should not see this\n");
+
+ debug_parse_category_mask(stderr_target, "DRLL:DCC");
+ DEBUGP(DRLL, "You should see this\n");
+ DEBUGP(DCC, "You should see this\n");
+ DEBUGP(DMM, "You should not see this\n");
}
diff --git a/openbsc/tests/sccp/sccp_test.c b/openbsc/tests/sccp/sccp_test.c
index bd28ed179..37615e0e2 100644
--- a/openbsc/tests/sccp/sccp_test.c
+++ b/openbsc/tests/sccp/sccp_test.c
@@ -722,3 +722,5 @@ int main(int argc, char **argv)
test_sccp_system_crash();
return 0;
}
+
+void db_store_counter() {}
diff --git a/openbsc/tests/sms/sms_test.c b/openbsc/tests/sms/sms_test.c
index fa0963644..2ce2cc6c4 100644
--- a/openbsc/tests/sms/sms_test.c
+++ b/openbsc/tests/sms/sms_test.c
@@ -24,6 +24,7 @@
#include <sys/types.h>
#include <openbsc/debug.h>
#include <openbsc/msgb.h>
+#include <openbsc/gsm_data.h>
#include <openbsc/gsm_utils.h>
int main(int argc, char** argv)