Commit b1a3ebfc authored by François Grisez's avatar François Grisez Committed by johan
Browse files

Add a new test suite (External domain)

parent 38bf5cfb
......@@ -105,11 +105,14 @@ set(RC_FILES
rcfiles/account_creator_rc
rcfiles/assistant_create.rc
rcfiles/carddav_rc
rcfiles/claire_sips_rc
rcfiles/chloe_lime_x3dh_rc
rcfiles/chloe_rc
rcfiles/conference_focus_rc
rcfiles/empty_rc
rcfiles/friends_rc
rcfiles/groupchat_lime_x3dh_rc
rcfiles/groupchat_rc
rcfiles/invalid_friends_rc
rcfiles/invalid_friends_xml
rcfiles/laure_call_logs_rc
......@@ -117,18 +120,18 @@ set(RC_FILES
rcfiles/laure_rc_udp
rcfiles/laure_tcp_rc
rcfiles/lime_x3dh_xml_rc
rcfiles/marie2_rc
rcfiles/marie_bodyless_rc
rcfiles/marie_dependent_proxy_rc
rcfiles/marie_dual_proxy_2_rc
rcfiles/marie_dual_proxy_rc
rcfiles/marie_early_rc
rcfiles/marie_h264_rc
rcfiles/marie_lime_x3dh_rc
rcfiles/marie_lime_x3dh_no_server_rc
rcfiles/marie_lime_x3dh_rc
rcfiles/marie_nat64_rc
rcfiles/marie_quality_reporting_rc
rcfiles/marie_rc
rcfiles/marie_dual_proxy_rc
rcfiles/marie_dual_proxy_2_rc
rcfiles/marie_dependent_proxy_rc
rcfiles/marie_session_timers_rc
rcfiles/marie2_rc
rcfiles/marie_rc_rtcp_xr
rcfiles/marie_remote_404_rc
rcfiles/marie_remote_default_values_rc
......@@ -140,24 +143,25 @@ set(RC_FILES
rcfiles/marie_remote_localfile_rc
rcfiles/marie_remote_localfile_win10_rc
rcfiles/marie_remote_rc
rcfiles/marie_session_timers_rc
rcfiles/marie_sips_rc
rcfiles/marie_transient_remote_rc
rcfiles/marie_v4proxy_rc
rcfiles/marie_well_known_port_rc
rcfiles/marie_zrtp_aes256_rc
rcfiles/marie_zrtp_b256_rc
rcfiles/marie_zrtp_srtpsuite_aes256_rc
rcfiles/marie_zrtp_ecdh255_rc
rcfiles/marie_zrtp_ecdh448_rc
rcfiles/marie_zrtp_srtpsuite_aes256_rc
rcfiles/michelle_rc_udp
rcfiles/multi_account_rc
rcfiles/pauline_alt_rc
rcfiles/pauline_as_friend_rc
rcfiles/pauline_external_rc
rcfiles/pauline_h264_rc
rcfiles/pauline_lime_x3dh_rc
rcfiles/pauline_nat64_rc
rcfiles/pauline_rc
rcfiles/pauline_external_rc
rcfiles/pauline_rc_rtcp_xr
rcfiles/pauline_sips_rc
rcfiles/pauline_tcp_rc
......@@ -168,9 +172,9 @@ set(RC_FILES
rcfiles/pauline_wild_rc
rcfiles/pauline_zrtp_aes256_rc
rcfiles/pauline_zrtp_b256_rc
rcfiles/pauline_zrtp_srtpsuite_aes256_rc
rcfiles/pauline_zrtp_ecdh255_rc
rcfiles/pauline_zrtp_ecdh448_rc
rcfiles/pauline_zrtp_srtpsuite_aes256_rc
rcfiles/remote_zero_length_params_rc
rcfiles/stun_rc
rcfiles/zero_length_params_rc
......@@ -210,27 +214,29 @@ set(IOS_RESOURCES_FILES
)
set(SOURCE_FILES_C
tester.c
accountmanager.c
account_creator_tester.c
accountmanager.c
audio_bypass_tester.c
audio_routes_tester.c
audio_video_conference_tester.c
call_ice_tester.c
call_multicast_tester.c
call_multi_tester.c
call_single_tester.c
call_push_incoming_tester.c
call_video_tester.c
call_recovery_tester.c
call_ice_tester.c
call_secure_tester.c
complex_sip_case_tester.c
call_single_tester.c
call_video_tester.c
call_with_rtp_bundle_tester.c
complex_sip_case_tester.c
dtmf_tester.c
eventapi_tester.c
external_domain_tester.c
flexisip_tester.c
group_chat_tester.c
group_chat_ephemeral_tester.c
group_chat_secure_tester.c
group_chat_tester.c
liblinphone_tester.c
log_collection_tester.c
message_tester.c
......@@ -244,13 +250,15 @@ set(SOURCE_FILES_C
remote_provisioning_tester.c
session_timers_tester.c
setup_tester.c
shared_core_tester.c
stun_tester.c
tester.c
tunnel_tester.c
vcard_tester.c
video_tester.c
video_quality_tester.c
shared_core_tester.c
local_conference_tester.cpp
video_tester.c
)
if(ENABLE_LIME_X3DH)
list(APPEND SOURCE_FILES_C group_chat_secure_tester.c)
......
......@@ -156,7 +156,7 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana
static const char *info_content = "<somexml>blabla</somexml>";
void simple_call_base(bool_t enable_multicast_recv_side, bool_t disable_soundcard, bool_t use_multipart_invite_body) {
void simple_call_base_with_rcs(const char *caller_rc, const char *callee_rc, bool_t enable_multicast_recv_side, bool_t disable_soundcard, bool_t use_multipart_invite_body) {
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
const LinphoneAddress *from;
......@@ -167,8 +167,10 @@ void simple_call_base(bool_t enable_multicast_recv_side, bool_t disable_soundcar
ms_snd_card_manager_bypass_soundcard_detection(TRUE);
}
marie = linphone_core_manager_new("marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
marie = linphone_core_manager_new(caller_rc ? caller_rc : "marie_rc");
pauline = linphone_core_manager_new(
callee_rc ? callee_rc : (transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc")
);
/* with the account manager, we might lose the identity */
marie_cfg = linphone_core_get_default_proxy_config(marie->lc);
......@@ -263,6 +265,10 @@ void simple_call_base(bool_t enable_multicast_recv_side, bool_t disable_soundcar
}
}
void simple_call_base(bool_t enable_multicast_recv_side, bool_t disable_soundcard, bool_t use_multipart_invite_body) {
simple_call_base_with_rcs(NULL, NULL, enable_multicast_recv_side, disable_soundcard, use_multipart_invite_body);
}
static void simple_call(void) {
simple_call_base(FALSE, FALSE, FALSE);
}
......
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of Liblinphone.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "liblinphone_tester.h"
static void simple_call(void) {
simple_call_base_with_rcs("claire_sips_rc", "pauline_sips_rc", FALSE, FALSE, FALSE);
};
test_t external_domain_tests[] = {
TEST_NO_TAG("Simple call", simple_call)
};
test_suite_t external_domain_test_suite = {"External domain", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each,
sizeof(external_domain_tests) / sizeof(external_domain_tests[0]), external_domain_tests};
......@@ -446,6 +446,7 @@ void liblinphone_tester_add_suites() {
bc_tester_add_suite(&call_with_rtp_bundle_test_suite);
bc_tester_add_suite(&shared_core_test_suite);
bc_tester_add_suite(&vfs_encryption_test_suite);
bc_tester_add_suite(&external_domain_test_suite);
}
void liblinphone_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args)) {
......
......@@ -97,6 +97,7 @@ extern test_suite_t shared_core_test_suite;
extern test_suite_t lime_server_auth_test_suite;
extern test_suite_t vfs_encryption_test_suite;
extern test_suite_t local_conference_test_suite;
extern test_suite_t external_domain_test_suite;
#ifdef VCARD_ENABLED
extern test_suite_t vcard_test_suite;
......@@ -521,6 +522,7 @@ void configure_core_for_callbacks(LinphoneCoreManager *lcm, LinphoneCoreCbs *cbs
void liblinphone_tester_set_next_video_frame_decoded_cb(LinphoneCall *call);
void call_paused_resumed_base(bool_t multicast,bool_t with_losses);
void simple_call_base(bool_t enable_multicast_recv_side, bool_t disable_soundcard, bool_t use_multipart_invite_body);
void simple_call_base_with_rcs(const char *caller_rc, const char *callee_rc, bool_t enable_multicast_recv_side, bool_t disable_soundcard, bool_t use_multipart_invite_body);
void _call_with_rtcp_mux(bool_t caller_rtcp_mux, bool_t callee_rtcp_mux, bool_t with_ice,bool_t with_ice_reinvite);
void call_base_with_configfile(LinphoneMediaEncryption mode, bool_t enable_video,bool_t enable_relay,LinphoneFirewallPolicy policy,bool_t enable_tunnel, const char *marie_rc, const char *pauline_rc);
void call_base_with_configfile_play_nothing(LinphoneMediaEncryption mode, bool_t enable_video,bool_t enable_relay,LinphoneFirewallPolicy policy,bool_t enable_tunnel, const char *marie_rc, const char *pauline_rc);
......
[sip]
sip_port=-1
sip_tcp_port=-1
sip_tls_port=-1
default_proxy=0
ping_with_options=0
composing_idle_timeout=1
[auth_info_0]
username=claire
userid=claire
passwd=secret
realm=sip.external-domain.org
[proxy_0]
reg_proxy=sips:sip.external-domain.org:5069
reg_route=sips:sip.external-domain.org:5069
reg_identity="Claire" <sips:claire@sip.external-domain.org>
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[friend_0]
url="Paupoche" <sip:pauline@sip.example.org>
pol=accept
subscribe=0
[rtp]
audio_rtp_port=18070-28000
video_rtp_port=28070-38000
[video]
display=0
capture=0
show_local=0
size=vga
enabled=0
self_view=0
automatically_initiate=0
automatically_accept=0
device=StaticImage: Static picture
[sound]
echocancellation=0 #to not overload cpu in case of VG
[net]
dns_srv_enabled=0 #no srv needed in general
stun_server=stun.example.org
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