From 6ae657228c779e24ff036cdb72518e676025d606 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 3 Feb 2010 18:10:07 +0100 Subject: [sccp] Refer to the right Company in the Copyright/Copyleft line Use On-Waves instead of the name I made up from the domain name. --- openbsc/tests/sccp/sccp_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/tests') diff --git a/openbsc/tests/sccp/sccp_test.c b/openbsc/tests/sccp/sccp_test.c index 37615e0e2..553544dab 100644 --- a/openbsc/tests/sccp/sccp_test.c +++ b/openbsc/tests/sccp/sccp_test.c @@ -2,7 +2,7 @@ * SCCP testing code * * (C) 2009 by Holger Hans Peter Freyther - * (C) 2009 by on-waves.com + * (C) 2009 by On-Waves * * All Rights Reserved * -- cgit v1.2.3 From b19dc286aafc8f803534d2dcb164475d5fba6f37 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 9 Feb 2010 22:04:09 +0100 Subject: liblaf0rge: Make the other targets depend on the liblaforge... Everything is linking fine here. --- openbsc/tests/db/Makefile.am | 2 +- openbsc/tests/gsm0408/Makefile.am | 2 +- openbsc/tests/sccp/Makefile.am | 2 +- openbsc/tests/sms/Makefile.am | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'openbsc/tests') diff --git a/openbsc/tests/db/Makefile.am b/openbsc/tests/db/Makefile.am index 8ce7e3c49..310763aec 100644 --- a/openbsc/tests/db/Makefile.am +++ b/openbsc/tests/db/Makefile.am @@ -4,5 +4,5 @@ AM_CFLAGS=-Wall -ggdb3 noinst_PROGRAMS = db_test db_test_SOURCES = db_test.c -db_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a -ldl -ldbi +db_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldl -ldbi diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index ff8caf999..69f1e4e69 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -2,4 +2,4 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include noinst_PROGRAMS = gsm0408_test gsm0408_test_SOURCES = gsm0408_test.c -gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a -ldbi +gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldbi diff --git a/openbsc/tests/sccp/Makefile.am b/openbsc/tests/sccp/Makefile.am index 5a275fc2b..3e350143a 100644 --- a/openbsc/tests/sccp/Makefile.am +++ b/openbsc/tests/sccp/Makefile.am @@ -4,5 +4,5 @@ AM_CFLAGS=-Wall -ggdb3 noinst_PROGRAMS = sccp_test sccp_test_SOURCES = sccp_test.c -sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(top_builddir)/src/libbsc.a +sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a diff --git a/openbsc/tests/sms/Makefile.am b/openbsc/tests/sms/Makefile.am index 807c674e5..c1eeec74e 100644 --- a/openbsc/tests/sms/Makefile.am +++ b/openbsc/tests/sms/Makefile.am @@ -2,4 +2,4 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include noinst_PROGRAMS = sms_test sms_test_SOURCES = sms_test.c -sms_test_LDADD = $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a -ldl -ldbi +sms_test_LDADD = $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldl -ldbi -- cgit v1.2.3 From 8a69cb2d99f0b261817c971f7c29edb62578d3b9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 12 Feb 2010 22:44:50 +0100 Subject: [sccp] Make the file includable outside of OpenBSC --- openbsc/tests/sccp/sccp_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'openbsc/tests') diff --git a/openbsc/tests/sccp/sccp_test.c b/openbsc/tests/sccp/sccp_test.c index 37615e0e2..91a80858d 100644 --- a/openbsc/tests/sccp/sccp_test.c +++ b/openbsc/tests/sccp/sccp_test.c @@ -26,9 +26,11 @@ #include -#include #include #include +#include + +#include #define MIN(x, y) ((x) < (y) ? (x) : (y)) -- cgit v1.2.3 From f98a4974d764a4b6f8da5a8a5cadacae83eb87b7 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 20 Feb 2010 17:29:27 +0100 Subject: finish openbsc / libosmocore separation * use pkg-config from openbsc to find header and library * move sms and timer tests to libosmocore itself * ensure "make distcheck" works on both packages --- openbsc/tests/Makefile.am | 2 +- openbsc/tests/channel/Makefile.am | 10 ++---- openbsc/tests/channel/channel_test.c | 2 +- openbsc/tests/db/Makefile.am | 2 +- openbsc/tests/debug/Makefile.am | 3 +- openbsc/tests/gsm0408/Makefile.am | 2 +- openbsc/tests/sccp/Makefile.am | 2 +- openbsc/tests/sccp/sccp_test.c | 2 +- openbsc/tests/sms/Makefile.am | 5 --- openbsc/tests/sms/sms_test.c | 53 --------------------------- openbsc/tests/timer/Makefile.am | 5 --- openbsc/tests/timer/timer_test.c | 70 ------------------------------------ 12 files changed, 10 insertions(+), 148 deletions(-) delete mode 100644 openbsc/tests/sms/Makefile.am delete mode 100644 openbsc/tests/sms/sms_test.c delete mode 100644 openbsc/tests/timer/Makefile.am delete mode 100644 openbsc/tests/timer/timer_test.c (limited to 'openbsc/tests') diff --git a/openbsc/tests/Makefile.am b/openbsc/tests/Makefile.am index f40105fbf..3b1b93120 100644 --- a/openbsc/tests/Makefile.am +++ b/openbsc/tests/Makefile.am @@ -1 +1 @@ -SUBDIRS = debug timer sms gsm0408 db channel sccp +SUBDIRS = debug gsm0408 db channel sccp diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am index 6b9f6e3cb..8e57b8d0c 100644 --- a/openbsc/tests/channel/Makefile.am +++ b/openbsc/tests/channel/Makefile.am @@ -8,14 +8,8 @@ channel_test_SOURCES = channel_test.c \ $(top_srcdir)/src/gsm_subscriber_base.c \ $(top_srcdir)/src/gsm_subscriber.c \ $(top_srcdir)/src/debug.c \ - $(top_srcdir)/src/timer.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/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 + $(top_srcdir)/src/bts_siemens_bs11.c +channel_test_LDADD = -ldl -ldbi $(LIBOSMOCORE_LIBS) diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index 36d057273..759001c57 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -23,7 +23,7 @@ #include -#include +#include #include #include diff --git a/openbsc/tests/db/Makefile.am b/openbsc/tests/db/Makefile.am index 310763aec..85f2c146a 100644 --- a/openbsc/tests/db/Makefile.am +++ b/openbsc/tests/db/Makefile.am @@ -4,5 +4,5 @@ AM_CFLAGS=-Wall -ggdb3 noinst_PROGRAMS = db_test db_test_SOURCES = db_test.c -db_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldl -ldbi +db_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS) -ldl -ldbi diff --git a/openbsc/tests/debug/Makefile.am b/openbsc/tests/debug/Makefile.am index 62c906e72..86cd7b323 100644 --- a/openbsc/tests/debug/Makefile.am +++ b/openbsc/tests/debug/Makefile.am @@ -1,4 +1,5 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include noinst_PROGRAMS = debug_test -debug_test_SOURCES = debug_test.c $(top_srcdir)/src/debug.c $(top_srcdir)/src/talloc.c +debug_test_SOURCES = debug_test.c $(top_srcdir)/src/debug.c +debug_test_LDADD = $(LIBOSMOCORE_LIBS) diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index 69f1e4e69..44ca96cf0 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -2,4 +2,4 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include noinst_PROGRAMS = gsm0408_test gsm0408_test_SOURCES = gsm0408_test.c -gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldbi +gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS) -ldbi diff --git a/openbsc/tests/sccp/Makefile.am b/openbsc/tests/sccp/Makefile.am index 3e350143a..4152a9a54 100644 --- a/openbsc/tests/sccp/Makefile.am +++ b/openbsc/tests/sccp/Makefile.am @@ -4,5 +4,5 @@ AM_CFLAGS=-Wall -ggdb3 noinst_PROGRAMS = sccp_test sccp_test_SOURCES = sccp_test.c -sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a +sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS) diff --git a/openbsc/tests/sccp/sccp_test.c b/openbsc/tests/sccp/sccp_test.c index 562e1345f..982c168be 100644 --- a/openbsc/tests/sccp/sccp_test.c +++ b/openbsc/tests/sccp/sccp_test.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include diff --git a/openbsc/tests/sms/Makefile.am b/openbsc/tests/sms/Makefile.am deleted file mode 100644 index c1eeec74e..000000000 --- a/openbsc/tests/sms/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -INCLUDES = $(all_includes) -I$(top_srcdir)/include -noinst_PROGRAMS = sms_test - -sms_test_SOURCES = sms_test.c -sms_test_LDADD = $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldl -ldbi diff --git a/openbsc/tests/sms/sms_test.c b/openbsc/tests/sms/sms_test.c deleted file mode 100644 index 2ce2cc6c4..000000000 --- a/openbsc/tests/sms/sms_test.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * (C) 2008 by Daniel Willmann - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char** argv) -{ - DEBUGP(DSMS, "SMS testing\n"); - struct msgb *msg; - u_int8_t *sms; - u_int8_t i; - - /* test 7-bit coding/decoding */ - const char *input = "test text"; - u_int8_t length; - u_int8_t coded[256]; - char result[256]; - - length = gsm_7bit_encode(coded, input); - gsm_7bit_decode(result, coded, length); - if (strcmp(result, input) != 0) { - printf("7 Bit coding failed... life sucks\n"); - printf("Wanted: '%s' got '%s'\n", input, result); - } -} - -/* stubs */ -void input_event(void) {} -void nm_state_event(void) {} diff --git a/openbsc/tests/timer/Makefile.am b/openbsc/tests/timer/Makefile.am deleted file mode 100644 index 9f12d23ac..000000000 --- a/openbsc/tests/timer/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -INCLUDES = $(all_includes) -I$(top_srcdir)/include -noinst_PROGRAMS = timer_test - -timer_test_SOURCES = timer_test.c $(top_srcdir)/src/timer.c $(top_srcdir)/src/select.c - diff --git a/openbsc/tests/timer/timer_test.c b/openbsc/tests/timer/timer_test.c deleted file mode 100644 index 26fcbc938..000000000 --- a/openbsc/tests/timer/timer_test.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * (C) 2008 by Holger Hans Peter Freyther - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include - -#include -#include - -static void timer_fired(unsigned long data); - -static struct timer_list timer_one = { - .cb = timer_fired, - .data = (void*)1, -}; - -static struct timer_list timer_two = { - .cb = timer_fired, - .data = (void*)2, -}; - -static struct timer_list timer_three = { - .cb = timer_fired, - .data = (void*)3, -}; - -static void timer_fired(unsigned long data) -{ - printf("Fired timer: %lu\n", data); - - if (data == 1) { - bsc_schedule_timer(&timer_one, 3, 0); - bsc_del_timer(&timer_two); - } else if (data == 2) { - printf("Should not be fired... bug in del_timer\n"); - } else if (data == 3) { - printf("Timer fired not registering again\n"); - } else { - printf("wtf... wrong data\n"); - } -} - -int main(int argc, char** argv) -{ - printf("Starting... timer\n"); - - bsc_schedule_timer(&timer_one, 3, 0); - bsc_schedule_timer(&timer_two, 5, 0); - bsc_schedule_timer(&timer_three, 4, 0); - - while (1) { - bsc_select_main(0); - } -} -- cgit v1.2.3 From 140f6e9b12fcb83d161dc1cd8c5d6972ef86fc7c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 26 Feb 2010 20:10:58 +0100 Subject: [misc] Add LIBOSMOCORE_CFLAGS to the includes --- openbsc/tests/channel/Makefile.am | 2 +- openbsc/tests/db/Makefile.am | 2 +- openbsc/tests/debug/Makefile.am | 1 + openbsc/tests/gsm0408/Makefile.am | 1 + openbsc/tests/sccp/Makefile.am | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) (limited to 'openbsc/tests') diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am index 8e57b8d0c..772965953 100644 --- a/openbsc/tests/channel/Makefile.am +++ b/openbsc/tests/channel/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 +AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) noinst_PROGRAMS = channel_test diff --git a/openbsc/tests/db/Makefile.am b/openbsc/tests/db/Makefile.am index 85f2c146a..6eb9180ce 100644 --- a/openbsc/tests/db/Makefile.am +++ b/openbsc/tests/db/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 +AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) noinst_PROGRAMS = db_test diff --git a/openbsc/tests/debug/Makefile.am b/openbsc/tests/debug/Makefile.am index 86cd7b323..8423fd178 100644 --- a/openbsc/tests/debug/Makefile.am +++ b/openbsc/tests/debug/Makefile.am @@ -1,4 +1,5 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) noinst_PROGRAMS = debug_test debug_test_SOURCES = debug_test.c $(top_srcdir)/src/debug.c diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index 44ca96cf0..f98c673ea 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -1,4 +1,5 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) noinst_PROGRAMS = gsm0408_test gsm0408_test_SOURCES = gsm0408_test.c diff --git a/openbsc/tests/sccp/Makefile.am b/openbsc/tests/sccp/Makefile.am index 4152a9a54..b35693e82 100644 --- a/openbsc/tests/sccp/Makefile.am +++ b/openbsc/tests/sccp/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 +AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) noinst_PROGRAMS = sccp_test -- cgit v1.2.3