Commit 7ffbf949 authored by Martti Mela's avatar Martti Mela

updated test_nua to support Core Foundation run loop

darcs-hash:20061012121449-1b897-c250f0241cd9984668a4a403dc72c66fcffbd5dd.gz
parent acec36d8
......@@ -70,7 +70,13 @@ int test_nua_init(struct context *ctx,
a_bind = a_bind2 = "sip:0.0.0.0:*";
ctx->root = su_root_create(NULL); TEST_1(ctx->root);
#if SU_HAVE_OSX_CF_API
if (ctx->osx_runloop)
ctx->root = su_root_osx_runloop_create(NULL);
else
#endif
ctx->root = su_root_create(NULL);
TEST_1(ctx->root);
/* Disable threading by command line switch? */
su_root_threading(ctx->root, ctx->threading);
......
......@@ -197,6 +197,11 @@ int main(int argc, char *argv[])
else if (strcmp(argv[i], "--no-alarm") == 0) {
o_alarm = 0;
}
#if SU_HAVE_OSX_CF_API /* If compiled with CoreFoundation events */
else if (strcmp(argv[i], "--osx-runloop") == 0) {
ctx->osx_runloop = 1;
}
#endif
else if (strcmp(argv[i], "-") == 0) {
i++; break;
}
......
......@@ -50,6 +50,10 @@ struct call;
#include <sofia-sip/su_tagarg.h>
#include <sofia-sip/su_tag_io.h>
#if __APPLE_CC__
#include <sofia-sip/su_osx_runloop.h>
#endif
#include <test_proxy.h>
#include <test_nat.h>
#include <sofia-sip/auth_module.h>
......@@ -119,7 +123,7 @@ struct context
su_home_t home[1];
su_root_t *root;
int threading, proxy_tests, expensive, quit_on_single_failure;
int threading, proxy_tests, expensive, quit_on_single_failure, osx_runloop;
char const *external_proxy;
struct endpoint {
......
......@@ -96,7 +96,13 @@ int test_nua_params(struct context *ctx)
if (print_headings)
printf("TEST NUA-1.1: PARAMETERS\n");
ctx->root = su_root_create(NULL); TEST_1(ctx->root);
#if SU_HAVE_OSX_CF_API
if (ctx->osx_runloop)
ctx->root = su_root_osx_runloop_create(NULL);
else
#endif
ctx->root = su_root_create(NULL);
TEST_1(ctx->root);
/* Disable threading by command line switch? */
su_root_threading(ctx->root, ctx->threading);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment