Commit c74da6e6 authored by Sylvain Berfini's avatar Sylvain Berfini

Fix some tests for Android

parent 52149310
EXTRA_DIST= empty_rc laure_rc marie_early_rc marie_no_sdp_rc marie_rc multi_account_lrc pauline_alt_rc \
marie_remote_rc pauline_remote_rc marie_remote_404_rc marie_remote_invalid_rc \
pauline_rc pauline_wild_rc pauline_rc_tcp tester_hosts sounds images certificates
pauline_rc pauline_wild_rc pauline_tcp_rc tester_hosts sounds images certificates
if BUILD_CUNIT_TESTS
......
......@@ -25,8 +25,8 @@
static void subscribe_forking(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline2 = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* pauline2 = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneContent content={0};
LinphoneEvent *lev;
int expires= 600;
......@@ -59,7 +59,7 @@ static void subscribe_forking(void) {
}
static void message_forking(void) {
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
MSList* lcs=ms_list_append(NULL,marie->lc);
......@@ -83,7 +83,7 @@ static void message_forking(void) {
}
static void message_forking_with_unreachable_recipients(void) {
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
......@@ -125,7 +125,7 @@ static void message_forking_with_unreachable_recipients(void) {
}
static void message_forking_with_all_recipients_unreachable(void) {
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
......@@ -175,7 +175,7 @@ static void message_forking_with_all_recipients_unreachable(void) {
}
static void call_forking(void){
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
......@@ -221,7 +221,7 @@ static void call_forking(void){
}
static void call_forking_with_urgent_reply(void){
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
......@@ -266,7 +266,7 @@ static void call_forking_with_urgent_reply(void){
}
static void call_forking_cancelled(void){
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
......@@ -306,7 +306,7 @@ static void call_forking_cancelled(void){
}
static void call_forking_declined(bool_t declined_globaly){
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
......@@ -369,7 +369,7 @@ static void call_forking_declined_localy(void){
}
static void call_forking_with_push_notification_single(void){
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
......@@ -411,7 +411,7 @@ static void call_forking_with_push_notification_single(void){
}
static void call_forking_with_push_notification_multiple(void){
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
......@@ -463,7 +463,7 @@ static void call_forking_with_push_notification_multiple(void){
}
void call_forking_not_responded(void){
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
......@@ -503,7 +503,7 @@ void call_forking_not_responded(void){
static void early_media_call_forking(void) {
LinphoneCoreManager* marie1 = linphone_core_manager_new("marie_early_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new("marie_early_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_rc_tcp");
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_tcp_rc");
MSList *lcs=NULL;
LinphoneCallParams *params=linphone_core_create_default_call_parameters(pauline->lc);
LinphoneVideoPolicy pol;
......
......@@ -42,26 +42,29 @@ static void remote_provisioning_skipped(void) {
}
static void remote_provisioning_http(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_remote_rc");
LinphoneCoreManager* marie = linphone_core_manager_new2("marie_remote_rc", FALSE);
CU_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneConfiguringSuccessful,1));
CU_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneRegistrationOk,1));
linphone_core_manager_destroy(marie);
}
static void remote_provisioning_https(void) {
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_remote_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new2("pauline_remote_rc", FALSE);
char rootcapath[256] = {0};
snprintf(rootcapath, sizeof(rootcapath), "%s/rootca.pem", liblinphone_tester_file_prefix);
linphone_core_set_root_ca(pauline->lc, rootcapath);
CU_ASSERT_TRUE(wait_for(pauline->lc,NULL,&pauline->stat.number_of_LinphoneConfiguringSuccessful,1));
linphone_core_manager_destroy(pauline);
}
static void remote_provisioning_not_found(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_remote_404_rc");
LinphoneCoreManager* marie = linphone_core_manager_new2("marie_remote_404_rc", FALSE);
CU_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneConfiguringFailed,1));
linphone_core_manager_destroy(marie);
}
static void remote_provisioning_invalid(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_remote_invalid_rc");
LinphoneCoreManager* marie = linphone_core_manager_new2("marie_remote_invalid_rc", FALSE);
CU_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneConfiguringFailed,1));
linphone_core_manager_destroy(marie);
}
......
......@@ -47,8 +47,8 @@ static void core_sip_transport_test(void) {
CU_ASSERT_PTR_NOT_NULL_FATAL(lc);
linphone_core_get_sip_transports(lc,&tr);
CU_ASSERT_EQUAL(tr.udp_port,5060); /*default config*/
CU_ASSERT_EQUAL(tr.tcp_port,0); /*default config*/
CU_ASSERT_EQUAL(tr.tls_port,0); /*default config*/
CU_ASSERT_EQUAL(tr.tcp_port,5060); /*default config*/
CU_ASSERT_EQUAL(tr.tls_port,LC_SIP_TRANSPORT_RANDOM); /*default config*/
tr.udp_port=LC_SIP_TRANSPORT_RANDOM;
tr.tcp_port=LC_SIP_TRANSPORT_RANDOM;
......@@ -58,8 +58,7 @@ static void core_sip_transport_test(void) {
linphone_core_get_sip_transports(lc,&tr);
CU_ASSERT_NOT_EQUAL(tr.udp_port,5060); /*default config*/
CU_ASSERT_NOT_EQUAL(tr.tcp_port,0); /*default config*/
CU_ASSERT_NOT_EQUAL(tr.tls_port,0); /*default config*/
CU_ASSERT_NOT_EQUAL(tr.tcp_port,5060); /*default config*/
CU_ASSERT_EQUAL(lp_config_get_int(linphone_core_get_config(lc),"sip","sip_port",-2),LC_SIP_TRANSPORT_RANDOM);
CU_ASSERT_EQUAL(lp_config_get_int(linphone_core_get_config(lc),"sip","sip_tcp_port",-2),LC_SIP_TRANSPORT_RANDOM);
......
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