[sofia-sip] Build internal tests
This commit is contained in:
parent
598d52d5fb
commit
2dced93d94
|
@ -1 +1 @@
|
|||
Thu Apr 16 17:42:40 UTC 2020
|
||||
Thu Apr 30 14:02:03 UTC 2020
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
AUTOMAKE_OPTIONS = foreign 1.7
|
||||
|
||||
SUBDIRS = libsofia-sip-ua $(GLIB_SUBDIRS) packages # tests s2check utils
|
||||
SUBDIRS = libsofia-sip-ua $(GLIB_SUBDIRS) packages tests s2check utils
|
||||
DIST_SUBDIRS = s2check libsofia-sip-ua libsofia-sip-ua-glib utils packages \
|
||||
tests win32 open_c
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ LDADD = libnta.la \
|
|||
../msg/libmsg.la \
|
||||
../bnf/libbnf.la \
|
||||
../su/libsu.la \
|
||||
${top_builddir}/s2check/libs2.a
|
||||
${top_builddir}/s2check/libs2.a -lz
|
||||
|
||||
test_nta_LDFLAGS = -static
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ check_nua_SOURCES = check_nua.c check_nua.h \
|
|||
check_etsi.c check_simple.c
|
||||
|
||||
check_nua_LDADD = $(nua_libs) ${top_builddir}/s2check/libs2.a \
|
||||
@CHECK_LIBS@
|
||||
@CHECK_LIBS@ -lz
|
||||
|
||||
nua_libs = libnua.la \
|
||||
../iptsec/libiptsec.la \
|
||||
|
|
|
@ -14,6 +14,7 @@ AUTOMAKE_OPTIONS = foreign
|
|||
# Header paths
|
||||
|
||||
AM_CPPFLAGS = $(INTERNAL_INCLUDES)
|
||||
LD_FLAGS = -lz
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Build targets
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
# Header paths
|
||||
|
||||
AM_CPPFLAGS = $(INTERNAL_INCLUDES)
|
||||
AM_LDFLAGS = -ldl
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Build targets
|
||||
|
|
|
@ -66,7 +66,7 @@ s2_getlocalinfo(su_localinfo_t const *hints,
|
|||
su_localinfo_t **return_localinfo)
|
||||
{
|
||||
int error = 0, ip4 = 0, ip6 = 0, i;
|
||||
su_localinfo_t *result = NULL, **rr = &result;
|
||||
su_localinfo_t *result = NULL, **rr;
|
||||
su_localinfo_t hh[1] = {{ 0 }};
|
||||
|
||||
assert(return_localinfo);
|
||||
|
|
|
@ -195,7 +195,7 @@ s2_sip_next_request(sip_method_t method, char const *name)
|
|||
struct message *m;
|
||||
|
||||
for (m = s2sip->received; m; m = m->next) {
|
||||
if (m->sip->sip_request)
|
||||
if (m->sip->sip_request) {
|
||||
if (method == sip_method_unknown && name == NULL)
|
||||
return s2_sip_remove_message(m);
|
||||
|
||||
|
@ -203,6 +203,7 @@ s2_sip_next_request(sip_method_t method, char const *name)
|
|||
strcmp(m->sip->sip_request->rq_method_name, name) == 0)
|
||||
return s2_sip_remove_message(m);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name,
|
|||
if (strcmp(*patterns, "*")) {
|
||||
printf("%s: selected\n", name);
|
||||
}
|
||||
_tcase_add_test(tc, tf, name, signo, start, end);
|
||||
_tcase_add_test(tc, tf, name, signo, 0, start, end);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name,
|
|||
if (strcmp(*patterns, "*")) {
|
||||
printf("%s: selected\n", name);
|
||||
}
|
||||
_tcase_add_test(tc, tf, name, signo, start, end);
|
||||
_tcase_add_test(tc, tf, name, signo, 0, start, end);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ s2_timed_logger(void *stream, char const *fmt, va_list ap)
|
|||
{
|
||||
char buffer[4096];
|
||||
su_time_t now = su_now();
|
||||
size_t prefix, wrote;
|
||||
size_t prefix;
|
||||
int n;
|
||||
|
||||
snprintf(buffer, sizeof buffer,
|
||||
|
@ -70,5 +70,5 @@ s2_timed_logger(void *stream, char const *fmt, va_list ap)
|
|||
prefix = strlen(buffer);
|
||||
n = vsnprintf(buffer + prefix, (sizeof buffer) - prefix, fmt, ap);
|
||||
if (n > 0)
|
||||
wrote = fwrite(buffer, prefix + n, 1, stream);
|
||||
fwrite(buffer, prefix + n, 1, stream);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ EXTRA_DIST = check_sofia.h check_sofia.c suite_for_nua.c
|
|||
test_nua_SOURCES = test_nua.c
|
||||
|
||||
test_nua_LDADD = $(check_LIBRARIES) \
|
||||
${sofiabuilddir}/libsofia-sip-ua.la
|
||||
${sofiabuilddir}/libsofia-sip-ua.la -ldl
|
||||
|
||||
check_LIBRARIES = libtestnua.a libtestproxy.a libtestnat.a
|
||||
|
||||
|
@ -47,7 +47,7 @@ check_sofia_LDADD = $(check_LIBRARIES) \
|
|||
@CHECK_LIBS@
|
||||
|
||||
check_dlopen_sofia_CFLAGS = -I$(top_srcdir)/s2check @CHECK_CFLAGS@
|
||||
check_dlopen_sofia_LDADD = ${top_builddir}/s2check/libs2.a @CHECK_LIBS@
|
||||
check_dlopen_sofia_LDADD = ${top_builddir}/s2check/libs2.a @CHECK_LIBS@ -ldl
|
||||
|
||||
CLEANFILES = tmp_sippasswd.??????
|
||||
|
||||
|
|
|
@ -206,7 +206,9 @@ int main(int argc, char *argv[])
|
|||
int exitcode = 0;
|
||||
int o_sctp = 1, o_tls_sctp = 1, o_verbatim = 1;
|
||||
int family = 0, multiple = 0;
|
||||
/*
|
||||
char const *dnsserver = NULL;
|
||||
*/
|
||||
char const *string;
|
||||
url_t *uri = NULL;
|
||||
|
||||
|
@ -272,8 +274,10 @@ int main(int argc, char *argv[])
|
|||
if (!family)
|
||||
dig->ip4 = 1, dig->ip6 = 2;
|
||||
|
||||
/*
|
||||
if (argv[1] && argv[1][0] == '@')
|
||||
dnsserver = argv++[1] + 1;
|
||||
*/
|
||||
|
||||
if (!argv[1])
|
||||
usage(2);
|
||||
|
|
|
@ -398,6 +398,7 @@ char *readfile(FILE *f)
|
|||
len += fread(buffer + len, 1, 8192, f);
|
||||
}
|
||||
|
||||
if (buffer)
|
||||
buffer[len] = '\0';
|
||||
|
||||
return buffer;
|
||||
|
|
Loading…
Reference in New Issue