mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 00:59:20 +00:00
robustize tests for windows
This commit is contained in:
parent
e1291ba3ea
commit
097cae673a
4 changed files with 20 additions and 16 deletions
|
|
@ -62,9 +62,9 @@ static void linphone_remote_provisioning_apply(LinphoneCore *lc, const char *xml
|
|||
|
||||
int linphone_remote_provisioning_load_file( LinphoneCore* lc, const char* file_path){
|
||||
int status = -1;
|
||||
FILE* f = fopen(file_path, "r");
|
||||
FILE* f = fopen(file_path, "rb");
|
||||
|
||||
if( f ){
|
||||
if ( f ){
|
||||
long fsize;
|
||||
char* provisioning;
|
||||
|
||||
|
|
|
|||
|
|
@ -3072,7 +3072,7 @@ static void multiple_early_media(void) {
|
|||
marie2_call=linphone_core_get_current_call(marie2->lc);
|
||||
|
||||
/*wait a bit that streams are established*/
|
||||
wait_for_list(lcs,&dummy,1,3000);
|
||||
wait_for_list(lcs,&dummy,1,6000);
|
||||
CU_ASSERT_TRUE(linphone_call_get_audio_stats(pauline_call)->download_bandwidth>70);
|
||||
CU_ASSERT_TRUE(linphone_call_get_audio_stats(marie1_call)->download_bandwidth>70);
|
||||
CU_ASSERT_TRUE(linphone_call_get_audio_stats(marie2_call)->download_bandwidth>70);
|
||||
|
|
@ -3085,18 +3085,18 @@ static void multiple_early_media(void) {
|
|||
CU_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneCallEnd,1,1000));
|
||||
|
||||
/*wait a bit that streams are established*/
|
||||
wait_for_list(lcs,&dummy,1,1000);
|
||||
wait_for_list(lcs,&dummy,1,3000);
|
||||
CU_ASSERT_TRUE(linphone_call_get_audio_stats(pauline_call)->download_bandwidth>71);
|
||||
CU_ASSERT_TRUE(linphone_call_get_audio_stats(marie1_call)->download_bandwidth>71);
|
||||
|
||||
/*send an INFO in reverse side to check that dialogs are properly established*/
|
||||
info=linphone_core_create_info_message(marie1->lc);
|
||||
linphone_call_send_info_message(marie1_call,info);
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_inforeceived,1,2000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_inforeceived,1,3000));
|
||||
|
||||
linphone_core_terminate_all_calls(pauline->lc);
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallEnd,1,2000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallEnd,1,2000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallEnd,1,3000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallEnd,1,3000));
|
||||
|
||||
ms_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie1);
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ static void call_forking_with_push_notification_multiple(void){
|
|||
linphone_core_manager_destroy(marie2);
|
||||
}
|
||||
|
||||
void call_forking_not_responded(void){
|
||||
static void call_forking_not_responded(void){
|
||||
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");
|
||||
|
|
@ -551,7 +551,7 @@ static void early_media_call_forking(void) {
|
|||
marie2_call=linphone_core_get_current_call(marie2->lc);
|
||||
|
||||
/*wait a bit that streams are established*/
|
||||
wait_for_list(lcs,&dummy,1,3000);
|
||||
wait_for_list(lcs,&dummy,1,6000);
|
||||
CU_ASSERT_TRUE(linphone_call_get_audio_stats(pauline_call)->download_bandwidth>60
|
||||
&& linphone_call_get_audio_stats(pauline_call)->download_bandwidth<99);
|
||||
CU_ASSERT_TRUE(linphone_call_get_audio_stats(marie1_call)->download_bandwidth>60
|
||||
|
|
@ -663,6 +663,9 @@ static void call_with_ipv6(void) {
|
|||
LinphoneCoreManager* pauline;
|
||||
LinphoneCall *pauline_call;
|
||||
|
||||
/*calling ortp_init() here is done to have WSAStartup() done, otherwise liblinphone_tester_ipv6_available() will not work.*/
|
||||
ortp_init();
|
||||
|
||||
if (!liblinphone_tester_ipv6_available()){
|
||||
ms_warning("Call with ipv6 not tested, no ipv6 connectivity");
|
||||
return;
|
||||
|
|
@ -708,6 +711,7 @@ static void call_with_ipv6(void) {
|
|||
if (leaked_objects>0){
|
||||
belle_sip_object_dump_active_objects();
|
||||
}
|
||||
ortp_exit();
|
||||
}
|
||||
|
||||
test_t flexisip_tests[] = {
|
||||
|
|
|
|||
|
|
@ -96,9 +96,8 @@ static void linphone_interpret_url_test()
|
|||
}
|
||||
|
||||
static void linphone_lpconfig_from_buffer(){
|
||||
|
||||
static const char* buffer = "[buffer]\ntest=ok";
|
||||
static const char* buffer_linebreaks = "[buffer_linebreaks]\n\n\n\r\n\n\r\ntest=ok";
|
||||
const char* buffer = "[buffer]\ntest=ok";
|
||||
const char* buffer_linebreaks = "[buffer_linebreaks]\n\n\n\r\n\n\r\ntest=ok";
|
||||
LpConfig* conf;
|
||||
|
||||
conf = lp_config_new_from_buffer(buffer);
|
||||
|
|
@ -112,7 +111,7 @@ static void linphone_lpconfig_from_buffer(){
|
|||
|
||||
static void linphone_lpconfig_from_buffer_zerolen_value(){
|
||||
/* parameters that have no value should return NULL, not "". */
|
||||
static const char* zerolen = "[test]\nzero_len=\nnon_zero_len=test";
|
||||
const char* zerolen = "[test]\nzero_len=\nnon_zero_len=test";
|
||||
LpConfig* conf;
|
||||
|
||||
conf = lp_config_new_from_buffer(zerolen);
|
||||
|
|
@ -128,7 +127,7 @@ static void linphone_lpconfig_from_buffer_zerolen_value(){
|
|||
|
||||
static void linphone_lpconfig_from_file_zerolen_value(){
|
||||
/* parameters that have no value should return NULL, not "". */
|
||||
static const char* zero_rc_file = "zero_length_params_rc";
|
||||
const char* zero_rc_file = "zero_length_params_rc";
|
||||
char* rc_path = ms_strdup_printf("%s/rcfiles/%s", liblinphone_tester_file_prefix, zero_rc_file);
|
||||
LpConfig* conf;
|
||||
|
||||
|
|
@ -144,11 +143,12 @@ static void linphone_lpconfig_from_file_zerolen_value(){
|
|||
lp_config_set_string(conf, "test", "non_zero_len", ""); /* should remove "non_zero_len" */
|
||||
CU_ASSERT_STRING_EQUAL(lp_config_get_string(conf,"test","non_zero_len","LOL"), "LOL");
|
||||
|
||||
ms_free(rc_path);
|
||||
lp_config_destroy(conf);
|
||||
}
|
||||
|
||||
static void linphone_lpconfig_from_xml_zerolen_value(){
|
||||
static const char* zero_xml_file = "remote_zero_length_params_rc";
|
||||
const char* zero_xml_file = "remote_zero_length_params_rc";
|
||||
char* xml_path = ms_strdup_printf("%s/rcfiles/%s", liblinphone_tester_file_prefix, zero_xml_file);
|
||||
LpConfig* conf;
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ static void linphone_lpconfig_from_xml_zerolen_value(){
|
|||
CU_ASSERT_STRING_EQUAL(lp_config_get_string(conf,"test","non_zero_len","LOL"), "LOL");
|
||||
|
||||
linphone_core_manager_destroy(mgr);
|
||||
|
||||
ms_free(xml_path);
|
||||
}
|
||||
|
||||
void linphone_proxy_config_address_equal_test() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue