From 1372da9628fd6a04a7ff1b74fca4db12d4bc5268 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 20 Feb 2014 11:38:55 +0100 Subject: [PATCH] Move rcfiles of tester in a subdirectory. --- tester/Makefile.am | 4 +--- tester/liblinphone_tester.c | 5 ++++- tester/{ => rcfiles}/empty_rc | 0 tester/{ => rcfiles}/laure_rc | 0 tester/{ => rcfiles}/marie_early_rc | 0 tester/{ => rcfiles}/marie_no_sdp_rc | 0 tester/{ => rcfiles}/marie_rc | 0 tester/{ => rcfiles}/marie_remote_404_rc | 0 tester/{ => rcfiles}/marie_remote_https_rc | 0 tester/{ => rcfiles}/marie_remote_invalid_rc | 0 tester/{ => rcfiles}/marie_remote_rc | 0 tester/{multi_account_lrc => rcfiles/multi_account_rc} | 0 tester/{ => rcfiles}/pauline_alt_rc | 0 tester/{ => rcfiles}/pauline_rc | 0 tester/{ => rcfiles}/pauline_tcp_rc | 0 tester/{ => rcfiles}/pauline_wild_rc | 0 tester/{ => rcfiles}/stun_rc | 0 tester/{ => rcfiles}/upnp_rc | 0 tester/register_tester.c | 4 ++-- 19 files changed, 7 insertions(+), 6 deletions(-) rename tester/{ => rcfiles}/empty_rc (100%) rename tester/{ => rcfiles}/laure_rc (100%) rename tester/{ => rcfiles}/marie_early_rc (100%) rename tester/{ => rcfiles}/marie_no_sdp_rc (100%) rename tester/{ => rcfiles}/marie_rc (100%) rename tester/{ => rcfiles}/marie_remote_404_rc (100%) rename tester/{ => rcfiles}/marie_remote_https_rc (100%) rename tester/{ => rcfiles}/marie_remote_invalid_rc (100%) rename tester/{ => rcfiles}/marie_remote_rc (100%) rename tester/{multi_account_lrc => rcfiles/multi_account_rc} (100%) rename tester/{ => rcfiles}/pauline_alt_rc (100%) rename tester/{ => rcfiles}/pauline_rc (100%) rename tester/{ => rcfiles}/pauline_tcp_rc (100%) rename tester/{ => rcfiles}/pauline_wild_rc (100%) rename tester/{ => rcfiles}/stun_rc (100%) rename tester/{ => rcfiles}/upnp_rc (100%) diff --git a/tester/Makefile.am b/tester/Makefile.am index f5344b13f..5c1f72239 100644 --- a/tester/Makefile.am +++ b/tester/Makefile.am @@ -1,6 +1,4 @@ -EXTRA_DIST= empty_rc laure_rc marie_early_rc marie_no_sdp_rc marie_rc multi_account_lrc pauline_alt_rc \ - marie_remote_rc marie_remote_https_rc marie_remote_404_rc marie_remote_invalid_rc \ - pauline_rc pauline_wild_rc pauline_tcp_rc tester_hosts sounds images certificates +EXTRA_DIST= tester_hosts sounds images certificates rcfiles if BUILD_CUNIT_TESTS diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c index 7a7346f51..6854b086d 100644 --- a/tester/liblinphone_tester.c +++ b/tester/liblinphone_tester.c @@ -184,6 +184,7 @@ LinphoneCoreManager *get_manager(LinphoneCore *lc){ LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_for_proxies) { LinphoneCoreManager* mgr= ms_new0(LinphoneCoreManager,1); LinphoneProxyConfig* proxy; + char *rc_path = NULL; int proxy_count; int retry=0; @@ -203,7 +204,8 @@ LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_f mgr->v_table.configuring_status=linphone_configuration_status; reset_counters(&mgr->stat); - mgr->lc=configure_lc_from(&mgr->v_table, liblinphone_tester_file_prefix, rc_file, mgr); + if (rc_file) rc_path = ms_strdup_printf("rcfiles/%s", rc_file); + mgr->lc=configure_lc_from(&mgr->v_table, liblinphone_tester_file_prefix, rc_path, mgr); /*CU_ASSERT_EQUAL(ms_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count);*/ if (check_for_proxies && rc_file) /**/ proxy_count=ms_list_size(linphone_core_get_proxy_config_list(mgr->lc)); @@ -222,6 +224,7 @@ LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_f mgr->identity = linphone_address_new(linphone_proxy_config_get_identity(proxy)); linphone_address_clean(mgr->identity); } + if (rc_path) ms_free(rc_path); return mgr; } diff --git a/tester/empty_rc b/tester/rcfiles/empty_rc similarity index 100% rename from tester/empty_rc rename to tester/rcfiles/empty_rc diff --git a/tester/laure_rc b/tester/rcfiles/laure_rc similarity index 100% rename from tester/laure_rc rename to tester/rcfiles/laure_rc diff --git a/tester/marie_early_rc b/tester/rcfiles/marie_early_rc similarity index 100% rename from tester/marie_early_rc rename to tester/rcfiles/marie_early_rc diff --git a/tester/marie_no_sdp_rc b/tester/rcfiles/marie_no_sdp_rc similarity index 100% rename from tester/marie_no_sdp_rc rename to tester/rcfiles/marie_no_sdp_rc diff --git a/tester/marie_rc b/tester/rcfiles/marie_rc similarity index 100% rename from tester/marie_rc rename to tester/rcfiles/marie_rc diff --git a/tester/marie_remote_404_rc b/tester/rcfiles/marie_remote_404_rc similarity index 100% rename from tester/marie_remote_404_rc rename to tester/rcfiles/marie_remote_404_rc diff --git a/tester/marie_remote_https_rc b/tester/rcfiles/marie_remote_https_rc similarity index 100% rename from tester/marie_remote_https_rc rename to tester/rcfiles/marie_remote_https_rc diff --git a/tester/marie_remote_invalid_rc b/tester/rcfiles/marie_remote_invalid_rc similarity index 100% rename from tester/marie_remote_invalid_rc rename to tester/rcfiles/marie_remote_invalid_rc diff --git a/tester/marie_remote_rc b/tester/rcfiles/marie_remote_rc similarity index 100% rename from tester/marie_remote_rc rename to tester/rcfiles/marie_remote_rc diff --git a/tester/multi_account_lrc b/tester/rcfiles/multi_account_rc similarity index 100% rename from tester/multi_account_lrc rename to tester/rcfiles/multi_account_rc diff --git a/tester/pauline_alt_rc b/tester/rcfiles/pauline_alt_rc similarity index 100% rename from tester/pauline_alt_rc rename to tester/rcfiles/pauline_alt_rc diff --git a/tester/pauline_rc b/tester/rcfiles/pauline_rc similarity index 100% rename from tester/pauline_rc rename to tester/rcfiles/pauline_rc diff --git a/tester/pauline_tcp_rc b/tester/rcfiles/pauline_tcp_rc similarity index 100% rename from tester/pauline_tcp_rc rename to tester/rcfiles/pauline_tcp_rc diff --git a/tester/pauline_wild_rc b/tester/rcfiles/pauline_wild_rc similarity index 100% rename from tester/pauline_wild_rc rename to tester/rcfiles/pauline_wild_rc diff --git a/tester/stun_rc b/tester/rcfiles/stun_rc similarity index 100% rename from tester/stun_rc rename to tester/rcfiles/stun_rc diff --git a/tester/upnp_rc b/tester/rcfiles/upnp_rc similarity index 100% rename from tester/upnp_rc rename to tester/rcfiles/upnp_rc diff --git a/tester/register_tester.c b/tester/register_tester.c index 4705ba13f..547c2cec4 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -365,7 +365,7 @@ static void authenticated_register_with_wrong_credentials_without_403() { authenticated_register_with_wrong_credentials_with_params("tester-no-403"); } static LinphoneCoreManager* configure_lcm(void) { - LinphoneCoreManager *mgr=linphone_core_manager_new( "multi_account_lrc"); + LinphoneCoreManager *mgr=linphone_core_manager_new( "multi_account_rc"); stats *counters=&mgr->stat; CU_ASSERT_TRUE(wait_for(mgr->lc,mgr->lc,&counters->number_of_LinphoneRegistrationOk,ms_list_size(linphone_core_get_proxy_config_list(mgr->lc)))); return mgr; @@ -487,7 +487,7 @@ static void io_recv_error_late_recovery(){ int number_of_udp_proxy=0; MSList* lcs; - mgr=linphone_core_manager_new2( "multi_account_lrc",FALSE); /*to make sure iterates are not call yet*/ + mgr=linphone_core_manager_new2( "multi_account_rc",FALSE); /*to make sure iterates are not call yet*/ lc=mgr->lc; sal_set_refresher_retry_after(lc->sal,1000); counters=&mgr->stat;