Commit b1ae7bf0 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

tester: add before_each and after_each functions to allow init/cleanup of tests individually

parent 448f6a71
mediastreamer2 @ a4067c18
Subproject commit d24bc5aae19921183b19e0f7bdf8378b5f75109f Subproject commit a4067c188fab858ce829c3868a2e1d7d316fc531
...@@ -1281,7 +1281,6 @@ static void call_paused_by_both() { ...@@ -1281,7 +1281,6 @@ static void call_paused_by_both() {
check_media_direction(pauline, call_pauline, lcs, LinphoneMediaDirectionInactive, LinphoneMediaDirectionInvalid); check_media_direction(pauline, call_pauline, lcs, LinphoneMediaDirectionInactive, LinphoneMediaDirectionInvalid);
check_media_direction(marie, call_marie, lcs, LinphoneMediaDirectionInactive, LinphoneMediaDirectionInvalid); check_media_direction(marie, call_marie, lcs, LinphoneMediaDirectionInactive, LinphoneMediaDirectionInvalid);
/*now pauline wants to resume*/ /*now pauline wants to resume*/
linphone_core_resume_call(pauline->lc, call_pauline); linphone_core_resume_call(pauline->lc, call_pauline);
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallResuming,1)); BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallResuming,1));
...@@ -4452,14 +4451,12 @@ static void call_with_complex_late_offering(void){ ...@@ -4452,14 +4451,12 @@ static void call_with_complex_late_offering(void){
linphone_core_enable_sdp_200_ack(marie->lc,FALSE); linphone_core_enable_sdp_200_ack(marie->lc,FALSE);
end_call(marie,pauline); end_call(marie,pauline);
end: end:
linphone_core_manager_destroy(marie); linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline); linphone_core_manager_destroy(pauline);
} }
static void simple_mono_call_opus(void){ static void simple_mono_call_opus(void){
...@@ -4719,7 +4716,6 @@ void static call_state_changed_4(LinphoneCore *lc, LinphoneCall *call, LinphoneC ...@@ -4719,7 +4716,6 @@ void static call_state_changed_4(LinphoneCore *lc, LinphoneCall *call, LinphoneC
} else if (type == MSVideo) { } else if (type == MSVideo) {
// Because the call of this test is audio only, we don't have to append our modifier to the meta RTP transport from the video stream // Because the call of this test is audio only, we don't have to append our modifier to the meta RTP transport from the video stream
} }
} }
// We save the pointer to our RtpTransportModifier in the call user_data to be able to get to it later // We save the pointer to our RtpTransportModifier in the call user_data to be able to get to it later
call->user_data = rtptm; call->user_data = rtptm;
...@@ -5198,10 +5194,5 @@ test_t call_tests[] = { ...@@ -5198,10 +5194,5 @@ test_t call_tests[] = {
#endif #endif
}; };
test_suite_t call_test_suite = { test_suite_t call_test_suite = {"Single Call", NULL, NULL, liblinphone_tester_before_each, NULL,
"Single Call", sizeof(call_tests) / sizeof(call_tests[0]), call_tests};
liblinphone_tester_setup,
NULL,
sizeof(call_tests) / sizeof(call_tests[0]),
call_tests
};
...@@ -49,7 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -49,7 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <malloc.h> #include <malloc.h>
#endif #endif
static char *bc_tester_resource_dir_prefix = NULL; static char *bc_tester_resource_dir_prefix = NULL;
static char *bc_tester_writable_dir_prefix = NULL; static char *bc_tester_writable_dir_prefix = NULL;
...@@ -82,7 +81,7 @@ void bc_tester_printf(int level, const char *fmt, ...) { ...@@ -82,7 +81,7 @@ void bc_tester_printf(int level, const char *fmt, ...) {
int bc_tester_run_suite(test_suite_t *suite) { int bc_tester_run_suite(test_suite_t *suite) {
int i; int i;
CU_pSuite pSuite = CU_add_suite(suite->name, suite->init_func, suite->cleanup_func); CU_pSuite pSuite = CU_add_suite(suite->name, suite->before_all, suite->after_all);
for (i = 0; i < suite->nb_tests; i++) { for (i = 0; i < suite->nb_tests; i++) {
if (NULL == CU_add_test(pSuite, suite->tests[i].name, suite->tests[i].func)) { if (NULL == CU_add_test(pSuite, suite->tests[i].name, suite->tests[i].func)) {
...@@ -102,7 +101,7 @@ int bc_tester_suite_index(const char *suite_name) { ...@@ -102,7 +101,7 @@ int bc_tester_suite_index(const char *suite_name) {
int i; int i;
for (i = 0; i < nb_test_suites; i++) { for (i = 0; i < nb_test_suites; i++) {
if ((strcmp(suite_name, test_suite[i]->name) == 0) && (strlen(suite_name) == strlen(test_suite[i]->name))) { if (strcmp(suite_name, test_suite[i]->name) == 0) {
return i; return i;
} }
} }
...@@ -165,25 +164,35 @@ static void suite_start_message_handler(const CU_pSuite pSuite) { ...@@ -165,25 +164,35 @@ static void suite_start_message_handler(const CU_pSuite pSuite) {
suite_start_time = time(NULL); suite_start_time = time(NULL);
} }
static void suite_complete_message_handler(const CU_pSuite pSuite, const CU_pFailureRecord pFailure) { static void suite_complete_message_handler(const CU_pSuite pSuite, const CU_pFailureRecord pFailure) {
bc_tester_printf(bc_printf_verbosity_info,"Suite [%s] ended in %lu sec\n", pSuite->pName, time(NULL) - suite_start_time); bc_tester_printf(bc_printf_verbosity_info, "Suite [%s] ended in %lu sec\n", pSuite->pName,
time(NULL) - suite_start_time);
} }
static time_t test_start_time = 0; static time_t test_start_time = 0;
static void test_start_message_handler(const CU_pTest pTest, const CU_pSuite pSuite) { static void test_start_message_handler(const CU_pTest pTest, const CU_pSuite pSuite) {
int suite_index = bc_tester_suite_index(pSuite->pName);
bc_tester_printf(bc_printf_verbosity_info,"Suite [%s] Test [%s] started", pSuite->pName,pTest->pName); bc_tester_printf(bc_printf_verbosity_info,"Suite [%s] Test [%s] started", pSuite->pName,pTest->pName);
test_start_time = time(NULL); test_start_time = time(NULL);
if (test_suite[suite_index]->before_each) {
test_suite[suite_index]->before_each();
}
} }
/*derivated from cunit*/ /*derivated from cunit*/
static void test_complete_message_handler(const CU_pTest pTest, static void test_complete_message_handler(const CU_pTest pTest, const CU_pSuite pSuite,
const CU_pSuite pSuite,
const CU_pFailureRecord pFailureList) { const CU_pFailureRecord pFailureList) {
int i; int i;
int suite_index = bc_tester_suite_index(pSuite->pName);
char result[2048]={0}; char result[2048]={0};
char buffer[2048]={0}; char buffer[2048]={0};
CU_pFailureRecord pFailure = pFailureList; CU_pFailureRecord pFailure = pFailureList;
snprintf(result, sizeof(result), "Suite [%s] Test [%s] %s in %lu secs"
, pSuite->pName, pTest->pName, pFailure?"failed":"passed",(unsigned long)(time(NULL) - test_start_time)); if (test_suite[suite_index]->after_each) {
test_suite[suite_index]->after_each();
}
snprintf(result, sizeof(result), "Suite [%s] Test [%s] %s in %lu secs", pSuite->pName, pTest->pName,
pFailure ? "failed" : "passed", (unsigned long)(time(NULL) - test_start_time));
if (pFailure) { if (pFailure) {
for (i = 1 ; (NULL != pFailure) ; pFailure = pFailure->pNext, i++) { for (i = 1 ; (NULL != pFailure) ; pFailure = pFailure->pNext, i++) {
snprintf(buffer, sizeof(buffer), "\n %d. %s:%u - %s", i, snprintf(buffer, sizeof(buffer), "\n %d. %s:%u - %s", i,
...@@ -197,15 +206,20 @@ static void test_complete_message_handler(const CU_pTest pTest, ...@@ -197,15 +206,20 @@ static void test_complete_message_handler(const CU_pTest pTest,
#ifdef __linux #ifdef __linux
/* use mallinfo() to monitor allocated space. It is linux specific but other methods don't work: /* use mallinfo() to monitor allocated space. It is linux specific but other methods don't work:
* setrlimit() RLIMIT_DATA doesn't count memory allocated via mmap() (which is used internally by malloc) * setrlimit() RLIMIT_DATA doesn't count memory allocated via mmap() (which is used internally by malloc)
* setrlimit() RLIMIT_AS works but also counts virtual memory allocated by thread stacks, which is very big and hardly controllable. * setrlimit() RLIMIT_AS works but also counts virtual memory allocated by thread stacks, which is very big and
* hardly controllable.
* setrlimit() RLIMIT_RSS does nothing interesting on linux. * setrlimit() RLIMIT_RSS does nothing interesting on linux.
* getrusage() of RSS is unreliable: memory blocks can be leaked without being read or written, which would not appear in RSS. * getrusage() of RSS is unreliable: memory blocks can be leaked without being read or written, which would not
* appear in RSS.
* mallinfo() itself is the less worse solution. Allocated bytes are returned as 'int' so limited to 2GB * mallinfo() itself is the less worse solution. Allocated bytes are returned as 'int' so limited to 2GB
*/ */
if (max_vm_kb){ if (max_vm_kb) {
struct mallinfo minfo = mallinfo(); struct mallinfo minfo = mallinfo();
if (minfo.uordblks > max_vm_kb * 1024){ if (minfo.uordblks > max_vm_kb * 1024) {
bc_tester_printf(bc_printf_verbosity_error, "The program exceeded the maximum ammount of memory allocatable (%i bytes), aborting now.\n", minfo.uordblks); bc_tester_printf(
bc_printf_verbosity_error,
"The program exceeded the maximum amount of memory allocatable (%i bytes), aborting now.\n",
minfo.uordblks);
abort(); abort();
} }
} }
...@@ -281,7 +295,8 @@ int bc_tester_run_tests(const char *suite_name, const char *test_name) { ...@@ -281,7 +295,8 @@ int bc_tester_run_tests(const char *suite_name, const char *test_name) {
} }
} }
#ifdef __linux #ifdef __linux
bc_tester_printf(bc_printf_verbosity_info, "Still %i kilobytes allocated when all tests are finished.", mallinfo().uordblks/1024); bc_tester_printf(bc_printf_verbosity_info, "Still %i kilobytes allocated when all tests are finished.",
mallinfo().uordblks / 1024);
#endif #endif
return CU_get_number_of_tests_failed()!=0; return CU_get_number_of_tests_failed()!=0;
...@@ -290,7 +305,8 @@ int bc_tester_run_tests(const char *suite_name, const char *test_name) { ...@@ -290,7 +305,8 @@ int bc_tester_run_tests(const char *suite_name, const char *test_name) {
void bc_tester_helper(const char *name, const char* additionnal_helper) { void bc_tester_helper(const char *name, const char* additionnal_helper) {
bc_tester_printf(bc_printf_verbosity_info,"%s --help\n" bc_tester_printf(bc_printf_verbosity_info,
"%s --help\n"
"\t\t\t--list-suites\n" "\t\t\t--list-suites\n"
"\t\t\t--list-tests <suite>\n" "\t\t\t--list-tests <suite>\n"
"\t\t\t--suite <suite name>\n" "\t\t\t--suite <suite name>\n"
...@@ -302,9 +318,8 @@ void bc_tester_helper(const char *name, const char* additionnal_helper) { ...@@ -302,9 +318,8 @@ void bc_tester_helper(const char *name, const char* additionnal_helper) {
"\t\t\t--xml-file <xml file name>\n" "\t\t\t--xml-file <xml file name>\n"
"\t\t\t--max-alloc <size in ko> (maximum ammount of memory obtained via malloc allocator)\n" "\t\t\t--max-alloc <size in ko> (maximum ammount of memory obtained via malloc allocator)\n"
"And additionally:\n" "And additionally:\n"
"%s" "%s",
, name name, additionnal_helper);
, additionnal_helper);
} }
void bc_tester_init(void (*ftester_printf)(int level, const char *fmt, va_list args), int iverbosity_info, int iverbosity_error) { void bc_tester_init(void (*ftester_printf)(int level, const char *fmt, va_list args), int iverbosity_info, int iverbosity_error) {
...@@ -329,12 +344,12 @@ void bc_tester_init(void (*ftester_printf)(int level, const char *fmt, va_list a ...@@ -329,12 +344,12 @@ void bc_tester_init(void (*ftester_printf)(int level, const char *fmt, va_list a
bc_printf_verbosity_info = iverbosity_info; bc_printf_verbosity_info = iverbosity_info;
} }
void bc_tester_set_max_vm(long max_vm_kb){ void bc_tester_set_max_vm(long max_vm_kb) {
#ifdef __linux #ifdef __linux
max_vm_kb = max_vm_kb; max_vm_kb = max_vm_kb;
bc_tester_printf(bc_printf_verbosity_info, "Maximum virtual memory space set to %li kilo bytes", max_vm_kb); bc_tester_printf(bc_printf_verbosity_info, "Maximum virtual memory space set to %li kilo bytes", max_vm_kb);
#else #else
bc_tester_printf(bc_printf_verbosity_error,"Maximum virtual memory space setting is only implemented on Linux."); bc_tester_printf(bc_printf_verbosity_error, "Maximum virtual memory space setting is only implemented on Linux.");
#endif #endif
} }
...@@ -364,7 +379,7 @@ int bc_tester_parse_args(int argc, char **argv, int argid) ...@@ -364,7 +379,7 @@ int bc_tester_parse_args(int argc, char **argv, int argid)
xml_enabled = 1; xml_enabled = 1;
} else if (strcmp(argv[i], "--xml") == 0){ } else if (strcmp(argv[i], "--xml") == 0){
xml_enabled = 1; xml_enabled = 1;
} else if (strcmp(argv[i], "--max-alloc") == 0){ } else if (strcmp(argv[i], "--max-alloc") == 0) {
CHECK_ARG("--max-alloc", ++i, argc); CHECK_ARG("--max-alloc", ++i, argc);
max_vm_kb = atol(argv[i]); max_vm_kb = atol(argv[i]);
} else { } else {
......
...@@ -35,9 +35,11 @@ extern int bc_printf_verbosity_info; ...@@ -35,9 +35,11 @@ extern int bc_printf_verbosity_info;
extern int bc_printf_verbosity_error; extern int bc_printf_verbosity_error;
typedef void (*test_function_t)(void); typedef void (*test_function_t)(void);
typedef int (*init_function_t)(void); /** Function used in all suites - it is invoked before all and each tests and also after each and all tests
typedef int (*cleanup_function_t)(void); * @return 0 means success, otherwise it's an error
typedef int (*test_suite_function_t)(const char *name); **/
typedef int (*pre_post_function_t)(void);
// typedef int (*test_suite_function_t)(const char *name);
typedef struct { typedef struct {
const char *name; const char *name;
...@@ -45,11 +47,14 @@ typedef struct { ...@@ -45,11 +47,14 @@ typedef struct {
} test_t; } test_t;
typedef struct { typedef struct {
const char *name; const char *name; /*suite name*/
init_function_t init_func; pre_post_function_t
cleanup_function_t cleanup_func; before_all; /*function invoked before running the suite. If not returning 0, suite is not launched. */
int nb_tests; pre_post_function_t after_all; /*function invoked at the end of the suite, even if some tests failed. */
test_t *tests; test_function_t before_each; /*function invoked before each test within this suite. */
test_function_t after_each; /*function invoked after each test within this suite, even if it failed. */
int nb_tests; /* number of tests */
test_t *tests; /* tests within this suite */
} test_suite_t; } test_suite_t;
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -74,7 +74,8 @@ static void sip_update_within_icoming_reinvite_with_no_sdp(void) { ...@@ -74,7 +74,8 @@ static void sip_update_within_icoming_reinvite_with_no_sdp(void) {
dest=linphone_address_new(NULL); dest=linphone_address_new(NULL);
wait_for(mgr->lc, mgr->lc, (int*)&addrinfo, 1); wait_for(mgr->lc, mgr->lc, (int*)&addrinfo, 1);
err=getnameinfo((struct sockaddr *)addrinfo->ai_addr,addrinfo->ai_addrlen,ipstring,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST); err=getnameinfo((struct sockaddr
*)addrinfo->ai_addr,addrinfo->ai_addrlen,ipstring,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST);
linphone_address_set_domain(dest, ipstring); linphone_address_set_domain(dest, ipstring);
if (port > 0) if (port > 0)
linphone_address_set_port(dest, port); linphone_address_set_port(dest, port);
...@@ -93,18 +94,11 @@ static void sip_update_within_icoming_reinvite_with_no_sdp(void) { ...@@ -93,18 +94,11 @@ static void sip_update_within_icoming_reinvite_with_no_sdp(void) {
pclose(sipp_out); pclose(sipp_out);
} }
linphone_core_manager_destroy(mgr); linphone_core_manager_destroy(mgr);
} }
static test_t tests[] = { static test_t tests[] = {
{ "SIP UPDATE within incoming reinvite witjout sdp", sip_update_within_icoming_reinvite_with_no_sdp}, { "SIP UPDATE within incoming reinvite witjout sdp", sip_update_within_icoming_reinvite_with_no_sdp},
}; };
test_suite_t complex_sip_call_test_suite = { test_suite_t complex_sip_call_test_suite = {"Complex SIP Call", NULL, NULL, liblinphone_tester_before_each, NULL,
"Complex SIP Call", sizeof(tests) / sizeof(tests[0]), tests};
liblinphone_tester_setup,
NULL,
sizeof(tests) / sizeof(tests[0]),
tests
};
...@@ -171,10 +171,5 @@ test_t dtmf_tests[] = { ...@@ -171,10 +171,5 @@ test_t dtmf_tests[] = {
{ "Send DTMF using RFC2833 using Opus",send_dtmf_rfc2833_opus}, { "Send DTMF using RFC2833 using Opus",send_dtmf_rfc2833_opus},
}; };
test_suite_t dtmf_test_suite = { test_suite_t dtmf_test_suite = {"DTMF", NULL, NULL, liblinphone_tester_before_each, NULL,
"DTMF", sizeof(dtmf_tests) / sizeof(dtmf_tests[0]), dtmf_tests};
liblinphone_tester_setup,
NULL,
sizeof(dtmf_tests) / sizeof(dtmf_tests[0]),
dtmf_tests
};
...@@ -367,11 +367,5 @@ test_t event_tests[] = { ...@@ -367,11 +367,5 @@ test_t event_tests[] = {
{ "Publish without automatic refresh",publish_no_auto_test } { "Publish without automatic refresh",publish_no_auto_test }
}; };
test_suite_t event_test_suite = { test_suite_t event_test_suite = {"Event", NULL, NULL, liblinphone_tester_before_each, NULL,
"Event", sizeof(event_tests) / sizeof(event_tests[0]), event_tests};
liblinphone_tester_setup,
NULL,
sizeof(event_tests) / sizeof(event_tests[0]),
event_tests
};
...@@ -926,13 +926,5 @@ test_t flexisip_tests[] = { ...@@ -926,13 +926,5 @@ test_t flexisip_tests[] = {
{ "DoS module trigger by sending a lot of chat messages", dos_module_trigger } { "DoS module trigger by sending a lot of chat messages", dos_module_trigger }
}; };
test_suite_t flexisip_test_suite = {"Flexisip", NULL, NULL, liblinphone_tester_before_each, NULL,
test_suite_t flexisip_test_suite = { sizeof(flexisip_tests) / sizeof(flexisip_tests[0]), flexisip_tests};
"Flexisip",
liblinphone_tester_setup,
NULL,
sizeof(flexisip_tests) / sizeof(flexisip_tests[0]),
flexisip_tests
};
...@@ -335,7 +335,7 @@ int linphone_core_manager_get_mean_audio_up_bw(const LinphoneCoreManager *mgr); ...@@ -335,7 +335,7 @@ int linphone_core_manager_get_mean_audio_up_bw(const LinphoneCoreManager *mgr);
void video_call_base_2(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled); void video_call_base_2(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled);
int liblinphone_tester_setup(); void liblinphone_tester_before_each();
void liblinphone_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args)); void liblinphone_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args));
void liblinphone_tester_uninit(void); void liblinphone_tester_uninit(void);
......
...@@ -324,11 +324,6 @@ test_t log_collection_tests[] = { ...@@ -324,11 +324,6 @@ test_t log_collection_tests[] = {
{ "Upload collected traces", upload_collected_traces} { "Upload collected traces", upload_collected_traces}
}; };
test_suite_t log_collection_test_suite = { test_suite_t log_collection_test_suite = {"LogCollection", NULL, NULL, liblinphone_tester_before_each, NULL,
"LogCollection",
liblinphone_tester_setup,
NULL,
sizeof(log_collection_tests) / sizeof(log_collection_tests[0]), sizeof(log_collection_tests) / sizeof(log_collection_tests[0]),
log_collection_tests log_collection_tests};
};
...@@ -1658,11 +1658,5 @@ test_t message_tests[] = { ...@@ -1658,11 +1658,5 @@ test_t message_tests[] = {
,{"file transfer io error after destroying chatroom", file_transfer_io_error_after_destroying_chatroom} ,{"file transfer io error after destroying chatroom", file_transfer_io_error_after_destroying_chatroom}
}; };
test_suite_t message_test_suite = { test_suite_t message_test_suite = {"Message", NULL, NULL, liblinphone_tester_before_each, NULL,
"Message", sizeof(message_tests) / sizeof(message_tests[0]), message_tests};
liblinphone_tester_setup,
NULL,
sizeof(message_tests) / sizeof(message_tests[0]),
message_tests
};
...@@ -553,10 +553,5 @@ test_t multi_call_tests[] = { ...@@ -553,10 +553,5 @@ test_t multi_call_tests[] = {
{ "Incoming call accepted when outgoing call in outgoing ringing early media",incoming_call_accepted_when_outgoing_call_in_outgoing_ringing_early_media}, { "Incoming call accepted when outgoing call in outgoing ringing early media",incoming_call_accepted_when_outgoing_call_in_outgoing_ringing_early_media},
}; };
test_suite_t multi_call_test_suite = { test_suite_t multi_call_test_suite = {"Multi call", NULL, NULL, liblinphone_tester_before_each, NULL,
"Multi call", sizeof(multi_call_tests) / sizeof(multi_call_tests[0]), multi_call_tests};
liblinphone_tester_setup,
NULL,
sizeof(multi_call_tests) / sizeof(multi_call_tests[0]),
multi_call_tests
};
...@@ -269,10 +269,6 @@ test_t multicast_call_tests[] = { ...@@ -269,10 +269,6 @@ test_t multicast_call_tests[] = {
#endif #endif
}; };
test_suite_t multicast_call_test_suite = { test_suite_t multicast_call_test_suite = {"Multicast Call", NULL, NULL, liblinphone_tester_before_each, NULL,
"Multicast Call",
liblinphone_tester_setup,
NULL,
sizeof(multicast_call_tests) / sizeof(multicast_call_tests[0]), sizeof(multicast_call_tests) / sizeof(multicast_call_tests[0]),
multicast_call_tests multicast_call_tests};
};
...@@ -417,10 +417,5 @@ static test_t offeranswer_tests[] = { ...@@ -417,10 +417,5 @@ static test_t offeranswer_tests[] = {
#endif #endif
}; };
test_suite_t offeranswer_test_suite = { test_suite_t offeranswer_test_suite = {"Offer-answer", NULL, NULL, liblinphone_tester_before_each, NULL,
"Offer-answer", sizeof(offeranswer_tests) / sizeof(offeranswer_tests[0]), offeranswer_tests};
liblinphone_tester_setup,
NULL,
sizeof(offeranswer_tests) / sizeof(offeranswer_tests[0]),
offeranswer_tests
};
...@@ -82,10 +82,5 @@ test_t player_tests[] = { ...@@ -82,10 +82,5 @@ test_t player_tests[] = {
{ "Local MKV file" , playing_test } { "Local MKV file" , playing_test }
}; };
test_suite_t player_test_suite = { test_suite_t player_test_suite = {"Player", NULL, NULL, liblinphone_tester_before_each, NULL,
"Player", sizeof(player_tests) / sizeof(test_t), player_tests};
liblinphone_tester_setup,
NULL,
sizeof(player_tests) / sizeof(test_t),
player_tests
};
...@@ -482,11 +482,5 @@ test_t presence_tests[] = { ...@@ -482,11 +482,5 @@ test_t presence_tests[] = {
#endif #endif
}; };
test_suite_t presence_test_suite = { test_suite_t presence_test_suite = {"Presence", NULL, NULL, liblinphone_tester_before_each, NULL,
"Presence", sizeof(presence_tests) / sizeof(presence_tests[0]), presence_tests};
liblinphone_tester_setup,
NULL,
sizeof(presence_tests) / sizeof(presence_tests[0]),
presence_tests
};
...@@ -108,10 +108,5 @@ test_t proxy_config_tests[] = { ...@@ -108,10 +108,5 @@ test_t proxy_config_tests[] = {
{ "SIP URI normalization", sip_uri_normalization }, { "SIP URI normalization", sip_uri_normalization },
}; };
test_suite_t proxy_config_test_suite = { test_suite_t proxy_config_test_suite = {"Proxy config", NULL, NULL, liblinphone_tester_before_each, NULL,
"Proxy config", sizeof(proxy_config_tests) / sizeof(proxy_config_tests[0]), proxy_config_tests};
liblinphone_tester_setup,
NULL,
sizeof(proxy_config_tests) / sizeof(proxy_config_tests[0]),
proxy_config_tests
};
...@@ -383,10 +383,6 @@ test_t quality_reporting_tests[] = { ...@@ -383,10 +383,6 @@ test_t quality_reporting_tests[] = {
{ "Sent using custom route", quality_reporting_sent_using_custom_route}, { "Sent using custom route", quality_reporting_sent_using_custom_route},
}; };
test_suite_t quality_reporting_test_suite = { test_suite_t quality_reporting_test_suite = {"QualityReporting", NULL, NULL, liblinphone_tester_before_each, NULL,
"QualityReporting",
liblinphone_tester_setup,
NULL,
sizeof(quality_reporting_tests) / sizeof(quality_reporting_tests[0]), sizeof(quality_reporting_tests) / sizeof(quality_reporting_tests[0]),
quality_reporting_tests quality_reporting_tests};
};
...@@ -894,11 +894,5 @@ test_t register_tests[] = { ...@@ -894,11 +894,5 @@ test_t register_tests[] = {
{ "Simple redirect", redirect} { "Simple redirect", redirect}
}; };
test_suite_t register_test_suite = { test_suite_t register_test_suite = {"Register", NULL, NULL, liblinphone_tester_before_each, NULL,
"Register", sizeof(register_tests) / sizeof(register_tests[0]), register_tests};
liblinphone_tester_setup,
NULL,
sizeof(register_tests) / sizeof(register_tests[0]),
register_tests
};
...@@ -134,10 +134,6 @@ test_t remote_provisioning_tests[] = { ...@@ -134,10 +134,6 @@ test_t remote_provisioning_tests[] = {
{ "Remote provisioning invalid URI", remote_provisioning_invalid_uri } { "Remote provisioning invalid URI", remote_provisioning_invalid_uri }
}; };
test_suite_t remote_provisioning_test_suite = { test_suite_t remote_provisioning_test_suite = {"RemoteProvisioning", NULL, NULL, liblinphone_tester_before_each, NULL,
"RemoteProvisioning",