diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index 5e5767bab..152dd6dd3 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -1,11 +1,11 @@ /* - liblinphone_tester - liblinphone test suite - Copyright (C) 2013 Belledonne Communications SARL + liblinphone_tester - liblinphone test suite + Copyright (C) 2013 Belledonne Communications SARL - 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 2 of the License, or - (at your option) any later version. + 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 2 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 @@ -67,6 +67,7 @@ extern int liblinphone_tester_test_index(const char *suite_name, const char *tes extern void liblinphone_tester_init(void); extern void liblinphone_tester_uninit(void); extern int liblinphone_tester_run_tests(const char *suite_name, const char *test_name); +extern void liblinphone_tester_set_fileprefix(const char* file_prefix); #ifdef __cplusplus }; @@ -177,7 +178,7 @@ typedef struct _stats { int number_of_LinphonePublishExpiring; int number_of_LinphonePublishError; int number_of_LinphonePublishCleared; - + int number_of_LinphoneConfiguringSkipped; int number_of_LinphoneConfiguringFailed; int number_of_LinphoneConfiguringSuccessful; @@ -230,7 +231,7 @@ const char *liblinphone_tester_get_notify_content(void); void liblinphone_tester_chat_message_state_change(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud); void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreManager* callee); void liblinphone_tester_clock_start(MSTimeSpec *start); -bool_t liblinphone_tester_clock_elapsed(const MSTimeSpec *start, int value_ms); +bool_t liblinphone_tester_clock_elapsed(const MSTimeSpec *start, int value_ms); #endif /* LIBLINPHONE_TESTER_H_ */ diff --git a/tester/tester.c b/tester/tester.c index 3623073e4..3e09be635 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -80,8 +80,8 @@ LinphoneAddress * create_linphone_address(const char * domain) { static void auth_info_requested(LinphoneCore *lc, const char *realm, const char *username, const char *domain) { stats* counters; ms_message("Auth info requested for user id [%s] at realm [%s]\n" - ,username - ,realm); + ,username + ,realm); counters = get_stats(lc); counters->number_of_auth_info_requested++; } @@ -147,7 +147,7 @@ bool_t wait_for(LinphoneCore* lc_1, LinphoneCore* lc_2,int* counter,int value) { bool_t wait_for_list(MSList* lcs,int* counter,int value,int timeout_ms) { MSList* iterator; MSTimeSpec start; - + liblinphone_tester_clock_start(&start); while ((counter==NULL || *counternext) { @@ -164,7 +164,7 @@ static void set_codec_enable(LinphoneCore* lc,const char* type,int rate,bool_t e MSList* codecs_it; PayloadType* pt; for (codecs_it=codecs;codecs_it!=NULL;codecs_it=codecs_it->next) { - linphone_core_enable_payload_type(lc,(PayloadType*)codecs_it->data,0); + linphone_core_enable_payload_type(lc,(PayloadType*)codecs_it->data,0); } if((pt = linphone_core_find_payload_type(lc,type,rate,1))) { linphone_core_enable_payload_type(lc,pt, enable); @@ -322,6 +322,11 @@ const char * liblinphone_tester_test_name(const char *suite_name, int test_index return test_suite[suite_index]->tests[test_index].name; } +void liblinphone_tester_set_fileprefix(const char* file_prefix){ + liblinphone_tester_file_prefix = file_prefix; +} + + void liblinphone_tester_init(void) { add_test_suite(&setup_test_suite); add_test_suite(®ister_test_suite);