Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
097cae67
Commit
097cae67
authored
Feb 17, 2015
by
Simon Morlat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
robustize tests for windows
parent
e1291ba3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
16 deletions
+20
-16
coreapi/remote_provisioning.c
coreapi/remote_provisioning.c
+2
-2
tester/call_tester.c
tester/call_tester.c
+5
-5
tester/flexisip_tester.c
tester/flexisip_tester.c
+6
-2
tester/setup_tester.c
tester/setup_tester.c
+7
-7
No files found.
coreapi/remote_provisioning.c
View file @
097cae67
...
...
@@ -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
,
"r
b
"
);
if
(
f
){
if
(
f
){
long
fsize
;
char
*
provisioning
;
...
...
tester/call_tester.c
View file @
097cae67
...
...
@@ -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
,
3
000
);
wait_for_list
(
lcs
,
&
dummy
,
1
,
6
000
);
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
,
1
000
);
wait_for_list
(
lcs
,
&
dummy
,
1
,
3
000
);
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
,
2
000
));
CU_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
pauline
->
stat
.
number_of_inforeceived
,
1
,
3
000
));
linphone_core_terminate_all_calls
(
pauline
->
lc
);
CU_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
pauline
->
stat
.
number_of_LinphoneCallEnd
,
1
,
2
000
));
CU_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie1
->
stat
.
number_of_LinphoneCallEnd
,
1
,
2
000
));
CU_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
pauline
->
stat
.
number_of_LinphoneCallEnd
,
1
,
3
000
));
CU_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie1
->
stat
.
number_of_LinphoneCallEnd
,
1
,
3
000
));
ms_list_free
(
lcs
);
linphone_core_manager_destroy
(
marie1
);
...
...
tester/flexisip_tester.c
View file @
097cae67
...
...
@@ -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
,
3
000
);
wait_for_list
(
lcs
,
&
dummy
,
1
,
6
000
);
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
[]
=
{
...
...
tester/setup_tester.c
View file @
097cae67
...
...
@@ -96,9 +96,8 @@ static void linphone_interpret_url_test()
}
static
void
linphone_lpconfig_from_buffer
(){
static
const
char
*
buffer
=
"[buffer]
\n
test=ok"
;
static
const
char
*
buffer_linebreaks
=
"[buffer_linebreaks]
\n\n\n\r\n\n\r\n
test=ok"
;
const
char
*
buffer
=
"[buffer]
\n
test=ok"
;
const
char
*
buffer_linebreaks
=
"[buffer_linebreaks]
\n\n\n\r\n\n\r\n
test=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]
\n
zero_len=
\n
non_zero_len=test"
;
const
char
*
zerolen
=
"[test]
\n
zero_len=
\n
non_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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment