Commit 79dc7a2a authored by jehan's avatar jehan

split Call suite into Single call & Multi call

parent d783aedf
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="0.2079208171">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.2079208171" moduleId="org.eclipse.cdt.core.settings" name="Default">
......@@ -44,6 +42,7 @@
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="gtk"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tester"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tools"/>
</sourceEntries>
</configuration>
</storageModule>
......
......@@ -29,7 +29,8 @@ liblinphonetester_la_SOURCES = tester.c \
dtmf_tester.c \
accountmanager.c \
offeranswer_tester.c \
video_tester.c
video_tester.c \
multi_call.c
liblinphonetester_la_LDFLAGS= -no-undefined
liblinphonetester_la_LIBADD= ../coreapi/liblinphone.la $(CUNIT_LIBS)
......
......@@ -1242,7 +1242,7 @@ static void call_paused_resumed_with_loss(void) {
linphone_core_manager_destroy(pauline);
}
static bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCoreManager* mgr_2,LinphoneCall* call_2) {
bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCoreManager* mgr_2,LinphoneCall* call_2) {
stats initial_call_stat_1=mgr_1->stat;
stats initial_call_stat_2=mgr_2->stat;
linphone_core_pause_call(mgr_1->lc,call_1);
......@@ -3722,6 +3722,18 @@ void static call_state_changed_2(LinphoneCore *lc, LinphoneCall *call, LinphoneC
linphone_core_set_sip_transports(lc,&sip_tr);
}
}
void static call_state_changed_3(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *msg){
/*just to check multi listener in such situation*/
char* to=linphone_address_as_string(linphone_call_get_call_log(call)->to);
char* from=linphone_address_as_string(linphone_call_get_call_log(call)->from);
ms_message("Third call listener reports: %s call from [%s] to [%s], new state is [%s]" ,linphone_call_get_call_log(call)->dir==LinphoneCallIncoming?"Incoming":"Outgoing"
,from
,to
,linphone_call_state_to_string(cstate));
ms_free(to);
ms_free(from);
}
static void call_with_transport_change_base(bool_t succesfull_call) {
int begin;
......@@ -3737,6 +3749,9 @@ static void call_with_transport_change_base(bool_t succesfull_call) {
marie = linphone_core_manager_new("marie_rc");
pauline = linphone_core_manager_new( "pauline_rc");
linphone_core_add_listener(marie->lc,v_table);
v_table = linphone_core_v_table_new();
v_table->call_state_changed=call_state_changed_3;
linphone_core_add_listener(marie->lc,v_table);
sip_tr.udp_port = 0;
sip_tr.tcp_port = 45875;
......@@ -3844,14 +3859,6 @@ test_t call_tests[] = {
{ "Call rejected because of wrong credential", call_rejected_because_wrong_credentials},
{ "Call rejected without 403 because of wrong credential", call_rejected_without_403_because_wrong_credentials},
{ "Call rejected without 403 because of wrong credential and no auth req cb", call_rejected_without_403_because_wrong_credentials_no_auth_req_cb},
{ "Call waiting indication", call_waiting_indication },
{ "Call waiting indication with privacy", call_waiting_indication_with_privacy },
{ "Simple conference", simple_conference },
{ "Simple conference with ICE",simple_conference_with_ice},
{ "Simple call transfer", simple_call_transfer },
{ "Unattended call transfer", unattended_call_transfer },
{ "Unattended call transfer with error", unattended_call_transfer_with_error },
{ "Call transfer existing call outgoing call", call_transfer_existing_call_outgoing_call },
{ "Call with ICE", call_with_ice },
{ "Call with ICE without SDP", call_with_ice_no_sdp },
{ "Call with ICE (random ports)", call_with_ice_random_ports },
......@@ -3882,7 +3889,7 @@ test_t call_tests[] = {
};
test_suite_t call_test_suite = {
"Call",
"Single Call",
NULL,
NULL,
sizeof(call_tests) / sizeof(call_tests[0]),
......
......@@ -68,6 +68,7 @@ extern test_suite_t dtmf_test_suite;
extern test_suite_t offeranswer_test_suite;
extern test_suite_t video_test_suite;
extern test_suite_t multicast_call_test_suite;
extern test_suite_t multi_call_test_suite;
extern int liblinphone_tester_nb_test_suites(void);
......@@ -326,5 +327,7 @@ void linphone_call_cb(LinphoneCall *call,void * user_data);
void call_paused_resumed_base(bool_t multicast);
void simple_call_base(bool_t enable_multicast_recv_side);
void call_base(LinphoneMediaEncryption mode, bool_t enable_video,bool_t enable_relay,LinphoneFirewallPolicy policy,bool_t enable_tunnel);
bool_t call_with_caller_params(LinphoneCoreManager* caller_mgr,LinphoneCoreManager* callee_mgr, const LinphoneCallParams *params);
bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCoreManager* mgr_2,LinphoneCall* call_2);
#endif /* LIBLINPHONE_TESTER_H_ */
This diff is collapsed.
......@@ -459,6 +459,7 @@ void liblinphone_tester_init(void) {
add_test_suite(&register_test_suite);
add_test_suite(&offeranswer_test_suite);
add_test_suite(&call_test_suite);
add_test_suite(&multi_call_test_suite);
add_test_suite(&message_test_suite);
add_test_suite(&presence_test_suite);
#ifdef UPNP
......@@ -572,7 +573,11 @@ int liblinphone_tester_run_tests(const char *suite_name, const char *test_name)
ms_warning("Tester compiled without CU_get_suite() function, running all tests instead of suite '%s'\n", suite_name);
}
#else
if (suite_name){
if (!test_name && suite_name && strcmp("Call",suite_name) == 0) {
/*special case for suite Call which is now splitted into simple and multi*/
CU_run_suite(CU_get_suite("Single call"));
CU_run_suite(CU_get_suite("Multi call"));
} else if (suite_name){
CU_pSuite suite;
suite=CU_get_suite(suite_name);
if (!suite) {
......
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