mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
keep tester recorded files in case of test failure
This commit is contained in:
parent
2e9036f365
commit
ea0aecc8a7
1 changed files with 11 additions and 0 deletions
|
|
@ -296,10 +296,13 @@ LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_f
|
|||
|
||||
if( manager_count >= 2){
|
||||
char hellopath[512];
|
||||
char *recordpath = ms_strdup_printf("%s/record_for_lc_%p.wav",liblinphone_tester_writable_dir_prefix,mgr->lc);
|
||||
ms_message("Manager for '%s' using files", rc_file ? rc_file : "--");
|
||||
linphone_core_use_files(mgr->lc, TRUE);
|
||||
snprintf(hellopath,sizeof(hellopath), "%s/sounds/hello8000.wav", liblinphone_tester_file_prefix);
|
||||
linphone_core_set_play_file(mgr->lc,hellopath);
|
||||
linphone_core_set_record_file(mgr->lc,recordpath);
|
||||
ms_free(recordpath);
|
||||
}
|
||||
|
||||
if (proxy_count){
|
||||
|
|
@ -334,10 +337,18 @@ void linphone_core_manager_stop(LinphoneCoreManager *mgr){
|
|||
}
|
||||
|
||||
void linphone_core_manager_destroy(LinphoneCoreManager* mgr) {
|
||||
if (linphone_core_get_record_file(mgr->lc)){
|
||||
if (CU_get_number_of_failures()>0) {
|
||||
ms_message ("Test has failed, keeping recorded file [%s]",linphone_core_get_record_file(mgr->lc));
|
||||
} else {
|
||||
unlink(linphone_core_get_record_file(mgr->lc));
|
||||
}
|
||||
}
|
||||
if (mgr->lc) linphone_core_destroy(mgr->lc);
|
||||
if (mgr->identity) linphone_address_destroy(mgr->identity);
|
||||
if (mgr->stat.last_received_chat_message) linphone_chat_message_unref(mgr->stat.last_received_chat_message);
|
||||
manager_count--;
|
||||
|
||||
ms_free(mgr);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue