From aaf064377c2ac4cdfd65bd188f52f133dda99d1d Mon Sep 17 00:00:00 2001 From: Michael Jerris <mike@jerris.com> Date: Wed, 14 May 2008 18:19:34 +0000 Subject: [PATCH] Update sofia tests: Tue May 6 13:53:21 EDT 2008 Pekka Pessi <first.last@nokia.com> * tests: added 2nd check-based test suite for nua Wed May 7 08:26:48 EDT 2008 Pekka Pessi <first.last@nokia.com> * suite2_for_nua.c: more test cases Wed May 7 13:40:05 EDT 2008 Pekka Pessi <first.last@nokia.com> * suite2_for_nua.c, s2tester.[hc]: made it easier to refactor test cases Wed May 7 14:34:54 EDT 2008 Pekka Pessi <first.last@nokia.com> * test_nua: moved to tests subdirectory Wed May 7 14:37:06 EDT 2008 Pekka Pessi <first.last@nokia.com> * check_nua: moved to libsofia-sip-ua/nua Mon May 12 19:00:26 EDT 2008 Pekka Pessi <first.last@nokia.com> * check_nua: updated Tue May 13 16:45:21 EDT 2008 Pekka Pessi <first.last@nokia.com> * test_s2.h, test_s2.c: added internal DNS server Tue May 13 16:46:08 EDT 2008 Pekka Pessi <first.last@nokia.com> * check_register.c: added test case register_1_3_3_1 using tcp pingpong git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8400 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- .../sofia-sip/libsofia-sip-ua/nua/Makefile.am | 36 ++++++++-- libs/sofia-sip/tests/Makefile.am | 66 +++++++++++++------ libs/sofia-sip/tests/suite_for_nua.c | 2 +- 4 files changed, 79 insertions(+), 27 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index ab95ca9dd7..ddca80b759 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Wed May 14 14:16:11 EDT 2008 +Wed May 14 14:17:15 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am b/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am index 0bb8cac709..65d822968c 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am +++ b/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am @@ -13,13 +13,13 @@ noinst_LTLIBRARIES = libnua.la -check_LTLIBRARIES = libtestnua.la libtestproxy.la libtestnat.la +check_PROGRAMS = +TESTS = -check_PROGRAMS = test_nua - -TESTS = test_nua - -CLEANFILES = tmp_sippasswd.?????? +if HAVE_CHECK +check_PROGRAMS += check_nua +TESTS += check_nua +endif # ---------------------------------------------------------------------- # Rules for building the targets @@ -43,6 +43,29 @@ libnua_la_SOURCES = nua.c nua_stack.h nua_common.c nua_stack.c \ COVERAGE_INPUT = $(libnua_la_SOURCES) $(include_sofia_HEADERS) +check_nua_SOURCES = check_nua.c check_nua.h \ + check_session.c check_register.c \ + test_s2.h test_s2.c + +check_nua_LDADD = $(nua_libs) @CHECK_LIBS@ + +nua_libs = libnua.la \ + ../iptsec/libiptsec.la \ + ../ipt/libipt.la \ + ../nea/libnea.la \ + ../nta/libnta.la \ + ../sresolv/libsresolv.la \ + ../tport/libtport.la \ + ../stun/libstun.la \ + ../soa/libsoa.la \ + ../sdp/libsdp.la \ + ../sip/libsip.la \ + ../http/libhttp.la \ + ../msg/libmsg.la \ + ../url/liburl.la \ + ../bnf/libbnf.la \ + ../su/libsu.la + test_nua_LDFLAGS = -static libtestnua_la_SOURCES = test_nua.h test_ops.c \ @@ -80,6 +103,7 @@ test_nua_LDADD = libnua.la libtestnua.la libtestproxy.la libtestnat.la \ ../bnf/libbnf.la \ ../su/libsu.la +^ ^ ^ ^ ^ ^ ^ # ---------------------------------------------------------------------- # Install and distribution rules diff --git a/libs/sofia-sip/tests/Makefile.am b/libs/sofia-sip/tests/Makefile.am index 6562301701..7d452f409f 100644 --- a/libs/sofia-sip/tests/Makefile.am +++ b/libs/sofia-sip/tests/Makefile.am @@ -1,35 +1,63 @@ # -# Tests using check +# Makefile.am for Sofia SIP tests # +# Copyright (C) 2007,2008 Nokia Corporation +# Contact: Pekka Pessi <pekka.pessi@nokia.com> +# Licensed under LGPL. See file COPYING. + +TESTS = test_nua +check_PROGRAMS = test_nua EXTRA_DIST = check_sofia.h check_sofia.c suite_for_nua.c -TESTS = +test_nua_SOURCES = test_nua.c + +test_nua_LDADD = $(check_LIBRARIES) \ + ${sofiabuilddir}/libsofia-sip-ua.la + +check_LIBRARIES = libtestnua.a libtestproxy.a libtestnat.a + +libtestnua_a_SOURCES = test_nua.h test_ops.c \ + test_init.c \ + test_nua_api.c test_nua_params.c \ + test_register.c test_basic_call.c \ + test_offer_answer.c \ + test_call_reject.c test_cancel_bye.c \ + test_call_hold.c test_session_timer.c \ + test_refer.c test_100rel.c \ + test_simple.c test_sip_events.c \ + test_extension.c + +libtestproxy_a_SOURCES = test_proxy.h test_proxy.c + +libtestnat_a_SOURCES = test_nat.h test_nat.c test_nat_tags.c + +# +# Install in special test package +# +testsdir = ${libdir}/tests/libsofia-sip-ua-tests tests_PROGRAMS = -testsdir := ${libdir}/tests/libsofia-sip-ua-tests - -include $(top_srcdir)/rules/sofia.am - -INCLUDES = ${INTERNAL_INCLUDES} - -AM_CFLAGS += @CHECK_CFLAGS@ if HAVE_CHECK - TESTS += check_sofia tests_PROGRAMS += check_sofia +endif + +check_sofia_CFLAGS = @CHECK_CFLAGS@ + check_sofia_SOURCES = check_sofia.c check_sofia.h \ suite_for_nua.c -CHECKLIBS = ${sofiabuilddir}/nua/libtestnua.la \ - ${sofiabuilddir}/nua/libtestproxy.la \ - ${sofiabuilddir}/nua/libtestnat.la +check_sofia_LDADD = $(check_LIBRARIES) \ + ${sofiabuilddir}/libsofia-sip-ua.la \ + @CHECK_LIBS@ -$(CHECKLIBS): - cd ${sofiabuilddir}/nua && make checklib +CLEANFILES = tmp_sippasswd.?????? -check_sofia_LDADD = \ - $(CHECKLIBS) ${sofiabuilddir}/libsofia-sip-ua.la \ - @CHECK_LIBS@ -endif +# ---------------------------------------------------------------------- +# Sofia specific rules + +include $(top_srcdir)/rules/sofia.am + +INCLUDES = ${INTERNAL_INCLUDES} diff --git a/libs/sofia-sip/tests/suite_for_nua.c b/libs/sofia-sip/tests/suite_for_nua.c index d0655a2a92..a5451868c2 100644 --- a/libs/sofia-sip/tests/suite_for_nua.c +++ b/libs/sofia-sip/tests/suite_for_nua.c @@ -22,7 +22,7 @@ * */ -/**@CFILE check_sofia.c +/**@CFILE suite_for_nua.c * * @brief Check-driven tester for Sofia SIP User Agent library *